From 20c31f5fb124a6207dfbaed655767cbb7970eca0 Mon Sep 17 00:00:00 2001 From: MatteoPistorello Date: Fri, 28 Feb 2025 11:49:09 +0100 Subject: [PATCH] fix: logica creazione revisione preventivo --- modules/preventivi/buttons.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/preventivi/buttons.php b/modules/preventivi/buttons.php index 6415d6a5a..fc24b7fc4 100644 --- a/modules/preventivi/buttons.php +++ b/modules/preventivi/buttons.php @@ -19,6 +19,8 @@ */ include_once __DIR__.'/../../core.php'; + +use Modules\Interventi\Intervento; use Modules\Preventivi\Stato; $stati_abilitati = Stato::where('is_revisionabile', '=', '1')->get(); @@ -28,12 +30,14 @@ foreach ($stati_abilitati as $stato) { $stati[] = $stato->getTranslation('title'); } +$interventi_collegati = Intervento::where('id_preventivo', '=', $id_record)->count(); + // Crea revisione echo ' -
-
';