From dbc63b93b4bfe7a13a4966cabdab76c271dd2cb9 Mon Sep 17 00:00:00 2001 From: MatteoPistorello Date: Wed, 13 Jan 2021 17:36:35 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20calcolo=20progressivo=20attivit=C3=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/interventi/src/Intervento.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/interventi/src/Intervento.php b/modules/interventi/src/Intervento.php index 78230dfaf..7d262993b 100755 --- a/modules/interventi/src/Intervento.php +++ b/modules/interventi/src/Intervento.php @@ -221,12 +221,12 @@ class Intervento extends Document if ((strpos($maschera, 'YYYY') !== false) or (strpos($maschera, 'yy') !== false)) { $ultimo = Generator::getPreviousFrom($maschera, 'in_interventi', 'codice', [ 'YEAR(data_richiesta) = '.prepare(date('Y', strtotime($data))), - ]); + ], $data); } else { $ultimo = Generator::getPreviousFrom($maschera, 'in_interventi', 'codice'); } - $numero = Generator::generate($maschera, $ultimo); + $numero = Generator::generate($maschera, $ultimo, $quantity = 1, $values = [], $data); return $numero; }