Skip to content

Commit

Permalink
fix: calcolo codice attività
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoPistorello committed Jan 17, 2025
1 parent 07eb529 commit 8b490af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/interventi/src/Intervento.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8b490af

Please sign in to comment.