Fix codice intervento in fattura

This commit is contained in:
loviuz 2020-01-24 11:52:36 +01:00
parent a21db1f7ad
commit b23075a804
1 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ switch (post('op')) {
$accodare = post('accodare');
$id_segment = post('id_segment');
$interventi = $dbo->fetchArray('SELECT *, IFNULL((SELECT MIN(orario_inizio) FROM in_interventi_tecnici WHERE in_interventi_tecnici.idintervento = in_interventi.id), in_interventi.data_richiesta) AS data, in_statiintervento.descrizione AS stato FROM in_interventi INNER JOIN in_statiintervento ON in_interventi.idstatointervento=in_statiintervento.idstatointervento WHERE in_statiintervento.completato=1 AND in_interventi.id NOT IN (SELECT idintervento FROM co_righe_documenti WHERE idintervento IS NOT NULL) AND in_interventi.id_preventivo IS NULL AND in_interventi.id NOT IN (SELECT idintervento FROM co_promemoria WHERE idintervento IS NOT NULL) AND in_interventi.id IN ('.implode(',', $id_records).')');
$interventi = $dbo->fetchArray('SELECT *, IFNULL((SELECT MIN(orario_inizio) FROM in_interventi_tecnici WHERE in_interventi_tecnici.idintervento = in_interventi.id), in_interventi.data_richiesta) AS data, in_statiintervento.descrizione AS stato, in_interventi.codice AS codice_intervento FROM in_interventi INNER JOIN in_statiintervento ON in_interventi.idstatointervento=in_statiintervento.idstatointervento WHERE in_statiintervento.completato=1 AND in_interventi.id NOT IN (SELECT idintervento FROM co_righe_documenti WHERE idintervento IS NOT NULL) AND in_interventi.id_preventivo IS NULL AND in_interventi.id NOT IN (SELECT idintervento FROM co_promemoria WHERE idintervento IS NOT NULL) AND in_interventi.id IN ('.implode(',', $id_records).')');
// Lettura righe selezionate
foreach ($interventi as $intervento) {
@ -95,7 +95,7 @@ switch (post('op')) {
}
$descrizione = tr('Intervento numero _NUM_ del _DATE_ [_STATE_]', [
'_NUM_' => $intervento['codice'],
'_NUM_' => $intervento['codice_intervento'],
'_DATE_' => Translator::dateToLocale($intervento['data']),
'_STATE_' => $intervento['stato'],
]);