1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-03 09:17:37 +01:00

Fix controllo numero intervento

This commit is contained in:
MatteoPistorello 2022-01-11 17:23:01 +01:00
parent 1aaf3f2ded
commit dba7f554cc

View File

@ -343,7 +343,7 @@ function verifica_numero_intervento(Intervento $intervento)
// Recupero maschera per questo segmento
$maschera = setting('Formato codice attività');
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', [
'DATE(data_richiesta) < '.prepare($data->format('Y-m-d')),
'YEAR(data_richiesta) = '.prepare($data->format('Y')),