Fix numerazione intervento per data richiesta

This commit is contained in:
Beppe 2021-03-04 16:53:30 +01:00
parent a0bad7a6af
commit 0884fe8d3f
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ class Intervento extends Document
//$ultimo = Generator::getPreviousFrom($maschera, 'in_interventi', 'codice');
if ((strpos($maschera, 'YYYY') !== false) or (strpos($maschera, 'yy') !== false)) {
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);