From 8b490afc8ff0426271bcc951e98c80243fcaab42 Mon Sep 17 00:00:00 2001 From: MatteoPistorello Date: Fri, 17 Jan 2025 10:18:22 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20calcolo=20codice=20attivit=C3=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/interventi/src/Intervento.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/interventi/src/Intervento.php b/modules/interventi/src/Intervento.php index 86a00f117..826b672e6 100755 --- a/modules/interventi/src/Intervento.php +++ b/modules/interventi/src/Intervento.php @@ -221,7 +221,7 @@ public static function getNextCodice($data, $id_segment) // $ultimo = Generator::getPreviousFrom($maschera, 'in_interventi', 'codice'); - if ((!str_contains($maschera, 'YYYY')) or (!str_contains($maschera, 'yy'))) { + if (str_contains($maschera, 'YYYY') || str_contains($maschera, 'yy')) { $ultimo = Generator::getPreviousFrom($maschera, 'in_interventi', 'codice', [ 'YEAR(data_richiesta) = '.prepare(date('Y', strtotime($data))), ], $data);