From 44df2c43edaa2109c65e0363640812870c88a16c Mon Sep 17 00:00:00 2001 From: Fabio Lovato Date: Wed, 1 Apr 2020 17:28:21 +0200 Subject: [PATCH] Fix minori su revisioni preventivi --- modules/preventivi/edit.php | 2 +- update/2_4_14.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/preventivi/edit.php b/modules/preventivi/edit.php index d5ade6bfd..aef9f360e 100755 --- a/modules/preventivi/edit.php +++ b/modules/preventivi/edit.php @@ -9,7 +9,7 @@ unset($_SESSION['superselect']['idanagrafica']); $_SESSION['superselect']['idanagrafica'] = $record['idanagrafica']; // Mostro un avviso se ci sono piĆ¹ revisioni del preventivo -if (count($preventivo->revisioni) > 0) { +if (count($preventivo->revisioni) > 1) { echo '
diff --git a/update/2_4_14.sql b/update/2_4_14.sql index f6af77750..34f1c49ef 100755 --- a/update/2_4_14.sql +++ b/update/2_4_14.sql @@ -299,7 +299,7 @@ FROM `co_preventivi` FROM `co_righe_preventivi` GROUP BY `idpreventivo` ) AS righe ON `co_preventivi`.`id` = `righe`.`idpreventivo` -WHERE 1=1 |date_period(custom,''|period_start|'' >= `data_bozza` AND ''|period_start|'' <= `data_conclusione`,''|period_end|'' >= `data_bozza` AND ''|period_end|'' <= `data_conclusione`,`data_bozza` >= ''|period_start|'' AND `data_bozza` <= ''|period_end|'',`data_conclusione` >= ''|period_start|'' AND `data_conclusione` <= ''|period_end|'',`data_bozza` >= ''|period_start|'' AND `data_conclusione` = ''0000-00-00'')| +WHERE 1=1 |date_period(custom,''|period_start|'' >= `data_bozza` AND ''|period_start|'' <= `data_conclusione`,''|period_end|'' >= `data_bozza` AND ''|period_end|'' <= `data_conclusione`,`data_bozza` >= ''|period_start|'' AND `data_bozza` <= ''|period_end|'',`data_conclusione` >= ''|period_start|'' AND `data_conclusione` <= ''|period_end|'',`data_bozza` >= ''|period_start|'' AND `data_conclusione` = ''0000-00-00'')| AND default_revision = 1 HAVING 2=2 ORDER BY `co_preventivi`.`id` DESC' WHERE `name` = 'Preventivi';