Skip to content

Commit a17464f

Browse files
committed
fix: avviso per ricevute di scarto
1 parent c7d2436 commit a17464f

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

modules/fatture/controller_before.php

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,17 @@
6161
if ($lista_errori) {
6262
$lista_errori = $lista_errori[0] ? $lista_errori : [$lista_errori];
6363
$errore = $lista_errori[0]['Errore'];
64-
if ($errore['Codice'] == '00404') {
65-
return;
64+
if ($errore['Codice'] != '00404') {
65+
$documenti_scarto[] = Modules::link('Fatture di vendita', $documento->id, tr('_ICON_ Fattura numero _NUM_ del _DATE_ : <b>_STATO_</b>', [
66+
'_ICON_' => '<i class="'.$stato_fe->icon.'"></i>',
67+
'_NUM_' => $documento->numero_esterno,
68+
'_DATE_' => dateFormat($documento->data),
69+
'_STATO_' => $stato_fe->name,
70+
]));
6671
}
6772
}
6873
}
6974
}
70-
$documenti_scarto[] = Modules::link('Fatture di vendita', $documento->id, tr('_ICON_ Fattura numero _NUM_ del _DATE_ : <b>_STATO_</b>', [
71-
'_ICON_' => '<i class="'.$stato_fe->icon.'"></i>',
72-
'_NUM_' => $documento->numero_esterno,
73-
'_DATE_' => dateFormat($documento->data),
74-
'_STATO_' => $stato_fe->name,
75-
]));
76-
7775
$show_avviso = $show_avviso ?: ($documento->data_stato_fe < (new Carbon())->subDays(4) ? 1 : 0);
7876
} elseif (in_array($documento->codice_stato_fe, $codici_invio)) {
7977
$is_estera = false;

0 commit comments

Comments
 (0)