2017-08-04 16:28:16 +02:00
< ? php
include_once __DIR__ . '/../../core.php' ;
2018-07-17 12:05:21 +02:00
include_once Modules :: filepath ( 'Interventi' , 'modutil.php' );
2017-08-04 16:28:16 +02:00
2018-02-27 08:49:10 +01:00
$report_name = 'intervento_' . $records [ 0 ][ 'codice' ] . '.pdf' ;
2017-09-07 16:51:14 +02:00
2017-08-04 16:28:16 +02:00
/*
Dati intervento
*/
2017-09-07 16:51:14 +02:00
echo '
2017-09-08 18:19:39 +02:00
< table class = " table table-bordered " >
< tr >
2017-09-13 11:15:31 +02:00
< th colspan = " 4 " style = " font-size:13pt; " class = " text-center " > '.tr(' Rapporto operazioni e interventi ', [], [' upper ' => true]).' </ th >
2017-09-08 18:19:39 +02:00
</ tr >
2017-08-04 16:28:16 +02:00
< tr >
2018-07-20 17:37:30 +02:00
< td class = " text-center " style = " width:30% " > '.tr(' Intervento num . ').' : < b > '.$records[0][' codice '].' </ b ></ td >
2017-09-11 13:08:50 +02:00
< td class = " text-center " style = " width:20% " > '.tr(' Data ').' : < b > '.Translator::dateToLocale($records[0][' data_richiesta ']).' </ b ></ td >
2018-07-20 17:37:30 +02:00
< td class = " text-center " style = " width:25% " > '.tr(' Preventivo num . ').' : < b > '.$records[0][' numero_preventivo '].' </ b ></ td >
< td class = " text-center " style = " width:25% " > '.tr(' Contratto num . ').' : < b > '.$records[0][' numero_contratto '].' </ b ></ td >
2017-09-08 18:19:39 +02:00
</ tr > ' ;
2018-03-24 21:31:49 +01:00
// Dati cliente
echo '
< tr >
< td colspan = 2 >
'.tr(' Cliente ').' : < b > '.$c_ragionesociale.' </ b >
</ td > ' ;
2017-09-08 18:19:39 +02:00
2018-03-24 21:31:49 +01:00
// Codice fiscale o P.Iva
2018-04-01 00:18:21 +02:00
if ( ! empty ( $c_piva )) {
2018-11-30 16:10:15 +01:00
echo '
2018-11-02 17:49:11 +01:00
< td colspan = 2 >
'.tr(' P . Iva ').' : < b > '.strtoupper($c_piva).' </ b >
</ td > ' ;
2018-03-24 21:31:49 +01:00
} else {
echo '
< td colspan = 2 >
'.tr(' C . F . ').' : < b > '.strtoupper($c_codicefiscale).' </ b >
2018-11-02 17:49:11 +01:00
</ td > ' ;
2018-03-24 21:31:49 +01:00
}
2018-11-30 16:10:15 +01:00
echo '</tr>' ;
//Indirizzo
if ( ! empty ( $c_indirizzo ) or ! empty ( $c_cap ) or ! empty ( $c_citta ) or ! empty ( $c_provincia )) {
echo '
2018-11-02 17:49:11 +01:00
< tr >
< td colspan = " 4 " >
'.((!empty($c_indirizzo)) ? tr(' Via ').' : < b > '.$c_indirizzo.' </ b > ' : ' ').'
'.((!empty($c_cap)) ? tr(' CAP ').' : < b > '.$c_cap.' </ b > ' : ' ').'
'.((!empty($c_citta)) ? tr(' Città ').' : < b > '.$c_citta.' </ b > ' : ' ').'
'.((!empty($c_provincia)) ? tr(' Provincia ').' : < b > '.strtoupper($c_provincia).' </ b > ' : ' ').'
</ td >
</ tr > ' ;
2018-11-30 16:10:15 +01:00
}
2017-08-04 16:28:16 +02:00
2017-09-07 16:51:14 +02:00
echo '
2017-08-04 16:28:16 +02:00
< tr >
2017-09-08 18:19:39 +02:00
< td colspan = " 4 " >
2017-09-11 13:08:50 +02:00
'.tr(' Telefono ').' : < b > '.$c_telefono.' </ b > ' ;
2018-11-30 16:10:15 +01:00
if ( ! empty ( $c_cellulare )) {
echo ' - ' . tr ( 'Cellulare' ) . ': <b>' . $c_cellulare . '</b>' ;
}
2017-09-08 18:19:39 +02:00
echo '
</ td >
</ tr > ' ;
2017-09-11 13:08:50 +02:00
// riga 3
// Elenco impianti su cui è stato fatto l'intervento
2017-09-21 15:51:39 +02:00
$rs2 = $dbo -> fetchArray ( 'SELECT *, (SELECT nome FROM my_impianti WHERE id=my_impianti_interventi.idimpianto) AS nome, (SELECT matricola FROM my_impianti WHERE id=my_impianti_interventi.idimpianto) AS matricola FROM my_impianti_interventi WHERE idintervento=' . prepare ( $id_record ));
2017-09-08 18:19:39 +02:00
$impianti = [];
2018-03-24 21:31:49 +01:00
for ( $j = 0 ; $j < count ( $rs2 ); ++ $j ) {
2017-09-08 18:19:39 +02:00
$impianti [] = '<b>' . $rs2 [ $j ][ 'nome' ] . " </b> <small style='color:#777;'>( " . $rs2 [ $j ][ 'matricola' ] . ')</small>' ;
}
echo '
2017-08-04 16:28:16 +02:00
< tr >
2017-09-08 18:19:39 +02:00
< td colspan = " 4 " >
2017-09-11 13:08:50 +02:00
'.tr(' Impianti ').' : '.implode(' , ', $impianti).'
2017-09-08 18:19:39 +02:00
</ td >
2017-08-04 16:28:16 +02:00
</ tr > ' ;
2018-01-19 22:10:37 +01:00
// Tipo intervento
echo '
< tr >
< td colspan = " 4 " >
< b > '.tr(' Tipo intervento ').' :</ b > '.$records[0][' tipointervento '].'
</ td >
</ tr > ' ;
2017-09-11 13:08:50 +02:00
// Richiesta
echo '
2017-09-08 18:19:39 +02:00
< tr >
< td colspan = " 4 " style = " height:20mm; " >
2017-09-11 13:08:50 +02:00
< b > '.tr(' Richiesta ').' :</ b >
2017-09-08 18:19:39 +02:00
< p > '.nl2br($records[0][' richiesta ']).' </ p >
</ td >
</ tr > ' ;
2017-09-11 13:08:50 +02:00
// Descrizione
echo '
2017-08-04 16:28:16 +02:00
< tr >
2017-09-11 13:08:50 +02:00
< td colspan = " 4 " style = " height:20mm; " >
< b > '.tr(' Descrizione ').' :</ b >
< p > '.nl2br($records[0][' descrizione_intervento ']).' </ p >
</ td >
2017-08-04 16:28:16 +02:00
</ tr > ' ;
2017-09-11 13:08:50 +02:00
2017-09-07 16:51:14 +02:00
echo '
2017-08-04 16:28:16 +02:00
</ table > ' ;
$totale = [];
// MATERIALE UTILIZZATO
2018-07-03 15:12:01 +02:00
$rs2 = $dbo -> fetchArray ( " SELECT *,
( SELECT codice FROM mg_articoli WHERE id = idarticolo ) AS codice_art ,
( SELECT GROUP_CONCAT ( `serial` SEPARATOR ', ' ) FROM `mg_prodotti` WHERE `id_riga_intervento` = `mg_articoli_interventi` . `idintervento` ) AS seriali
FROM `mg_articoli_interventi` WHERE idintervento = " .prepare( $id_record ). " AND NOT idarticolo = '0' ORDER BY idarticolo ASC " );
2017-08-04 16:28:16 +02:00
if ( ! empty ( $rs2 )) {
2017-09-07 16:51:14 +02:00
echo '
2017-09-11 13:08:50 +02:00
< table class = " table table-bordered " >
< thead >
< tr >
< th colspan = " 4 " class = " text-center " >
< b > '.tr(' Materiale utilizzato ', [], [' upper ' => true]).' </ b >
</ th >
</ tr >
< tr >
< th style = " font-size:8pt;width:20% " class = " text-center " >
< b > '.tr(' Codice ').' </ b >
</ th >
< th style = " font-size:8pt;width:50% " class = " text-center " >
< b > '.tr(' Descrizione ').' </ b >
</ th >
< th style = " font-size:8pt;width:15% " class = " text-center " >
< b > '.tr(' Q . tà ').' </ b >
</ th >
< th style = " font-size:8pt;width:15% " class = " text-center " >
< b > '.tr(' Prezzo ').' </ b >
</ th >
</ tr >
</ thead >
< tbody > ' ;
2017-08-04 16:28:16 +02:00
foreach ( $rs2 as $r ) {
2017-09-07 16:51:14 +02:00
echo '
2017-09-11 13:08:50 +02:00
< tr > ' ;
2017-08-04 16:28:16 +02:00
// Codice
2017-09-07 16:51:14 +02:00
echo '
2017-09-11 13:08:50 +02:00
< td >
'.$r[' codice_art '].'
</ td > ' ;
2017-08-04 16:28:16 +02:00
// Descrizione
2017-09-07 16:51:14 +02:00
echo '
2017-09-11 13:08:50 +02:00
< td >
2018-07-03 15:12:01 +02:00
'.$r[' descrizione ' ];
// Seriali
if ( ! empty ( $r [ 'seriali' ])) {
echo '
< br >< small > '.tr(' SN ').' : '.$r[' seriali '].' </ small > ' ;
}
echo '
2017-09-11 13:08:50 +02:00
</ td > ' ;
2017-08-04 16:28:16 +02:00
// Quantità
2017-09-07 16:51:14 +02:00
echo '
2017-09-11 13:08:50 +02:00
< td class = " text-center " >
2018-06-29 13:35:39 +02:00
'.Translator::numberToLocale($r[' qta '], ' qta ').' '.$r[' um '].'
2017-09-11 13:08:50 +02:00
</ td > ' ;
2017-08-04 16:28:16 +02:00
// Netto
2017-09-11 13:08:50 +02:00
$netto = $r [ 'prezzo_vendita' ] * $r [ 'qta' ] - $r [ 'sconto' ];
2017-09-07 16:51:14 +02:00
echo '
2017-09-11 13:08:50 +02:00
< td class = " text-center " >
2017-09-21 15:51:39 +02:00
'.($options[' pricing '] ? Translator::numberToLocale($netto) : ' - ').'
2017-09-11 13:08:50 +02:00
</ td >
</ tr > ' ;
2017-08-04 16:28:16 +02:00
}
2017-09-11 13:08:50 +02:00
echo '
</ tbody > ' ;
2017-08-04 16:28:16 +02:00
// Totale spesa articoli
2017-09-21 15:51:39 +02:00
if ( $options [ 'pricing' ]) {
2017-09-07 16:51:14 +02:00
echo '
2017-08-04 16:28:16 +02:00
< tr >
2017-09-11 13:08:50 +02:00
< td colspan = " 2 " class = " text-right " >
2017-09-10 14:35:41 +02:00
< b > '.tr(' Totale materiale utilizzato ', [], [' upper ' => true]).' :</ b >
2017-08-04 16:28:16 +02:00
</ td >
2017-09-11 13:08:50 +02:00
< th colspan = " 2 " class = " text-center " >
2017-09-21 10:01:07 +02:00
< b > '.Translator::numberToLocale($costi_intervento[' ricambi_scontato ']).' & euro ; </ b >
2017-09-11 13:08:50 +02:00
</ th >
2017-08-04 16:28:16 +02:00
</ tr > ' ;
}
2017-09-07 16:51:14 +02:00
echo '
2017-08-04 16:28:16 +02:00
</ table > ' ;
}
// FINE MATERIALE UTILIZZATO
// Conteggio SPESE AGGIUNTIVE
2017-09-21 15:51:39 +02:00
$rs2 = $dbo -> fetchArray ( 'SELECT * FROM in_righe_interventi WHERE idintervento=' . prepare ( $id_record ) . ' ORDER BY id ASC' );
2017-08-04 16:28:16 +02:00
if ( ! empty ( $rs2 )) {
2017-09-07 16:51:14 +02:00
echo '
2017-09-11 13:08:50 +02:00
< table class = " table table-bordered " >
< thead >
< tr >
< th colspan = " 4 " class = " text-center " >
< b > '.tr(' Spese aggiuntive ', [], [' upper ' => true]).' </ b >
</ th >
</ tr >
< tr >
< th style = " font-size:8pt;width:50% " class = " text-center " >
< b > '.tr(' Descrizione ').' </ b >
</ th >
< th style = " font-size:8pt;width:15% " class = " text-center " >
< b > '.tr(' Q . tà ').' </ b >
</ th >
< th style = " font-size:8pt;width:15% " class = " text-center " >
< b > '.tr(' Prezzo unitario ').' </ b >
</ th >
< th style = " font-size:8pt;width:20% " class = " text-center " >
< b > '.tr(' Subtot . ').' </ b >
</ th >
</ tr >
</ thead >
< tbody > ' ;
2017-08-04 16:28:16 +02:00
foreach ( $rs2 as $r ) {
// Articolo
2017-09-07 16:51:14 +02:00
echo '
2017-08-04 16:28:16 +02:00
< tr >
< td >
'.nl2br($r[' descrizione ']).'
</ td > ' ;
// Quantità
2017-09-07 16:51:14 +02:00
echo '
2017-09-11 13:08:50 +02:00
< td class = " text-center " >
2018-11-16 13:01:29 +01:00
'.Translator::numberToLocale($r[' qta '], ' qta ').' '.$r[' um '].'
2017-08-04 16:28:16 +02:00
</ td > ' ;
// Prezzo unitario
2017-09-07 16:51:14 +02:00
echo '
2017-09-11 13:08:50 +02:00
< td class = " text-center " >
2018-11-30 16:10:15 +01:00
'.($options[' pricing '] ? Translator::numberToLocale($r[' prezzo_vendita '] - $r[' sconto_unitario ']).' & euro ; ' : ' - ').'
2017-08-04 16:28:16 +02:00
</ td > ' ;
// Prezzo totale
2017-09-11 13:08:50 +02:00
$netto = $r [ 'prezzo_vendita' ] * $r [ 'qta' ] - $r [ 'sconto' ];
2017-09-07 16:51:14 +02:00
echo '
2017-09-11 13:08:50 +02:00
< td class = " text-center " >
2017-09-21 15:51:39 +02:00
'.($options[' pricing '] ? Translator::numberToLocale($netto) : ' - ').'
2017-08-04 16:28:16 +02:00
</ td >
</ tr > ' ;
}
2017-09-11 13:08:50 +02:00
echo '
</ tbody > ' ;
2017-08-04 16:28:16 +02:00
2017-09-21 15:51:39 +02:00
if ( $options [ 'pricing' ]) {
2017-08-04 16:28:16 +02:00
// Totale spese aggiuntive
2017-09-07 16:51:14 +02:00
echo '
2017-08-04 16:28:16 +02:00
< tr >
2017-09-11 13:08:50 +02:00
< td colspan = " 3 " class = " text-right " >
2017-09-10 14:35:41 +02:00
< b > '.tr(' Totale spese aggiuntive ', [], [' upper ' => true]).' :</ b >
2017-08-04 16:28:16 +02:00
</ td >
2017-09-11 13:08:50 +02:00
< th class = " text-center " >
2017-09-21 10:01:07 +02:00
< b > '.Translator::numberToLocale($costi_intervento[' altro_scontato ']).' & euro ; </ b >
2017-09-11 13:08:50 +02:00
</ th >
2017-08-04 16:28:16 +02:00
</ tr > ' ;
}
2017-09-07 16:51:14 +02:00
echo '
2017-08-04 16:28:16 +02:00
</ table > ' ;
}
// FINE SPESE AGGIUNTIVE
// INTESTAZIONE ELENCO TECNICI
2017-09-07 16:51:14 +02:00
echo '
2017-09-12 16:45:18 +02:00
< table class = " table table-bordered vertical-middle " >
2017-09-11 13:08:50 +02:00
< thead >
< tr >
< th class = " text-center " colspan = " 5 " style = " font-size:11pt; " >
< b > '.tr(' Ore tecnici ', [], [' upper ' => true]).' </ b >
</ th >
</ tr >
< tr >
2018-01-23 16:11:02 +01:00
< th class = " text-center " style = " font-size:8pt; " >
2017-09-11 13:08:50 +02:00
< b > '.tr(' Tecnico ').' </ b >
</ th >
2018-01-23 16:11:02 +01:00
< th class = " text-center " style = " font-size:8pt;width:14% " >
2017-09-11 13:08:50 +02:00
< b > '.tr(' Data ').' </ b >
</ th >
2018-01-23 16:11:02 +01:00
< th class = " text-center " style = " font-size:8pt;width:7% " >
2017-09-11 13:08:50 +02:00
< b > '.tr(' Dalle ').' </ b >
</ th >
2018-01-23 16:11:02 +01:00
< th class = " text-center " style = " font-size:8pt;width:7% " >
2017-09-11 13:08:50 +02:00
< b > '.tr(' Alle ').' </ b >
</ th >
< td class = " text-center " style = " font-size:6pt;width:35% " >
2018-09-27 17:41:24 +02:00
'.tr(' I dati del ricevente verranno trattati in base al D . lgs n . 196 / 2003 ').'
2017-09-11 13:08:50 +02:00
</ td >
</ tr >
</ thead >
< tbody > ' ;
2017-08-04 16:28:16 +02:00
// Sessioni di lavoro dei tecnici
2017-09-21 15:51:39 +02:00
$rst = $dbo -> fetchArray ( 'SELECT an_anagrafiche.*, in_interventi_tecnici.* FROM in_interventi_tecnici JOIN an_anagrafiche ON in_interventi_tecnici.idtecnico=an_anagrafiche.idanagrafica WHERE in_interventi_tecnici.idintervento=' . prepare ( $id_record ) . ' ORDER BY in_interventi_tecnici.orario_inizio' );
2017-08-04 16:28:16 +02:00
2017-09-11 13:08:50 +02:00
foreach ( $rst as $i => $r ) {
2017-09-07 16:51:14 +02:00
echo '
2017-08-04 16:28:16 +02:00
< tr > ' ;
// nome tecnico
2017-09-07 16:51:14 +02:00
echo '
2017-09-12 16:45:18 +02:00
< td >
2017-08-04 16:28:16 +02:00
'.$r[' ragione_sociale '].'
</ td > ' ;
// data
2017-09-07 16:51:14 +02:00
echo '
2017-09-12 16:45:18 +02:00
< td class = " text-center " >
2017-08-04 16:28:16 +02:00
'.Translator::dateToLocale($r[' orario_inizio '], ' - ').'
</ td > ' ;
// ora inizio
2017-09-07 16:51:14 +02:00
echo '
2017-09-12 16:45:18 +02:00
< td class = " text-center " >
2017-08-04 16:28:16 +02:00
'.Translator::timeToLocale($r[' orario_inizio '], ' - ').'
</ td > ' ;
// ora fine
2017-09-07 16:51:14 +02:00
echo '
2017-09-12 16:45:18 +02:00
< td class = " text-center " >
2017-08-04 16:28:16 +02:00
'.Translator::timeToLocale($r[' orario_fine '], ' - ').'
2017-09-11 13:08:50 +02:00
</ td > ' ;
// Spazio aggiuntivo
if ( $i == 0 ) {
echo '
< td class = " text-center " style = " font-size:8pt; " >
'.tr(' Si dichiara che i lavori sono stati eseguiti ed i materiali installati ').'
</ td > ' ;
} else {
echo '
< td class = " text-center " style = " border-bottom:0px;border-top:0px; " ></ td > ' ;
}
2017-08-04 16:28:16 +02:00
2017-09-07 16:51:14 +02:00
echo '
2017-08-04 16:28:16 +02:00
</ tr > ' ;
}
2017-09-11 13:08:50 +02:00
// Ore lavorate
2018-04-13 17:56:59 +02:00
$ore = get_ore_intervento ( $id_record );
2017-08-04 16:28:16 +02:00
2018-01-23 16:11:02 +01:00
echo '
< tr >
2017-09-12 16:45:18 +02:00
< td class = " text-center " >
2018-01-19 22:10:37 +01:00
< small > '.tr(' Ore lavorate ').' :</ small >< br />< b > '.Translator::numberToLocale($ore).' </ b >
2017-08-04 16:28:16 +02:00
</ td > ' ;
2018-01-23 16:11:02 +01:00
// Costo totale manodopera
2018-02-03 13:55:09 +01:00
if ( $options [ 'pricing' ]) {
2017-09-11 13:08:50 +02:00
echo '
2018-01-23 16:11:02 +01:00
< td colspan = " 3 " class = " text-center " >
< small > '.tr(' Totale manodopera ').' :</ small >< br />< b > '.Translator::numberToLocale($costi_intervento[' manodopera_addebito ']).' & euro ; </ b >
2017-08-04 16:28:16 +02:00
</ td > ' ;
2017-09-11 13:08:50 +02:00
} else {
2017-09-07 16:51:14 +02:00
echo '
2018-01-23 16:11:02 +01:00
< td colspan = " 3 " class = " text-center " >-</ td > ' ;
2017-08-04 16:28:16 +02:00
}
2017-09-11 13:08:50 +02:00
// Timbro e firma
2018-11-15 17:57:34 +01:00
$firma = ! empty ( $records [ 0 ][ 'firma_file' ]) ? '<img src="' . DOCROOT . '/files/interventi/' . $records [ 0 ][ 'firma_file' ] . '" style="width:70mm;">' : '' ;
2017-09-11 13:08:50 +02:00
echo '
2018-01-19 22:10:37 +01:00
< td rowspan = " 2 " class = " text-center " style = " font-size:8pt;height:30mm;vertical-align:bottom " >
2017-09-11 13:08:50 +02:00
'.$firma.' < br >
< i > ( '.tr(' Timbro e firma leggibile ').' . ) </ i >
2017-08-04 16:28:16 +02:00
</ td >
</ tr > ' ;
2018-01-19 22:10:37 +01:00
// Totale km
echo '
2018-01-23 16:11:02 +01:00
< tr >
2018-01-19 22:10:37 +01:00
< td class = " text-center " >
2018-01-23 16:11:02 +01:00
< small > '.tr(' Km percorsi ').' :</ small >< br />< b > '.Translator::numberToLocale($records[0][' tot_km ']).' </ b >
2018-01-19 22:10:37 +01:00
</ td > ' ;
2018-01-23 16:11:02 +01:00
// Costo trasferta
2018-02-03 13:55:09 +01:00
if ( $options [ 'pricing' ]) {
2018-01-19 22:10:37 +01:00
echo '
< td class = " text-center " >
2018-01-23 16:11:02 +01:00
< small > '.tr(' Costi di trasferta ').' :</ small >< br />< b > '.Translator::numberToLocale($records[0][' tot_km_consuntivo ']).' & euro ; </ b >
2018-01-19 22:10:37 +01:00
</ td > ' ;
2018-01-23 16:11:02 +01:00
} else {
2018-01-19 22:10:37 +01:00
echo '
2018-01-23 16:11:02 +01:00
< td class = " text-center " >-</ td > ' ;
}
2018-01-19 22:10:37 +01:00
2018-01-23 16:11:02 +01:00
// Diritto di chiamata
2018-02-03 13:55:09 +01:00
if ( $options [ 'pricing' ]) {
2018-01-23 16:11:02 +01:00
echo '
< td class = " text-center " colspan = " 2 " >
< small > '.tr(' Diritto di chiamata ').' :</ small >< br />< b > '.Translator::numberToLocale($records[0][' tot_dirittochiamata ']).' & euro ; </ b >
</ td > ' ;
2018-01-19 22:10:37 +01:00
} else {
echo '
2018-01-23 16:11:02 +01:00
< td class = " text-center " colspan = " 2 " >-</ td >
' ;
2018-01-19 22:10:37 +01:00
}
2017-08-04 16:28:16 +02:00
// TOTALE COSTI FINALI
2017-09-21 15:51:39 +02:00
if ( $options [ 'pricing' ]) {
2017-08-04 16:28:16 +02:00
// Totale imponibile
2017-09-07 16:51:14 +02:00
echo '
2017-08-04 16:28:16 +02:00
< tr >
2017-09-11 13:08:50 +02:00
< td colspan = " 4 " class = " text-right " >
2017-09-10 14:35:41 +02:00
< b > '.tr(' Imponibile ', [], [' upper ' => true]).' :</ b >
2017-08-04 16:28:16 +02:00
</ td >
2017-09-11 13:08:50 +02:00
< th class = " text-center " >
2018-01-19 22:10:37 +01:00
< b > '.Translator::numberToLocale($costi_intervento[' totale_addebito ']).' & euro ; </ b >
2017-09-11 13:08:50 +02:00
</ th >
2017-08-04 16:28:16 +02:00
</ tr > ' ;
2018-06-29 13:35:39 +02:00
2018-07-03 15:12:01 +02:00
$totale_sconto = $costi_intervento [ 'totale_addebito' ] - $costi_intervento [ 'totale_scontato' ];
2018-01-19 22:38:11 +01:00
2018-01-19 22:10:37 +01:00
// Eventuale sconto totale
2018-01-19 22:38:11 +01:00
if ( ! empty ( $totale_sconto )) {
2017-09-07 16:51:14 +02:00
echo '
2018-01-19 22:10:37 +01:00
< tr >
< td colspan = " 4 " class = " text-right " >
< b > '.tr(' Sconto ', [], [' upper ' => true]).' :</ b >
</ td >
2017-08-04 16:28:16 +02:00
2018-01-19 22:10:37 +01:00
< th class = " text-center " >
2018-01-19 22:38:11 +01:00
< b >- '.Translator::numberToLocale($totale_sconto).' & euro ; </ b >
2018-01-19 22:10:37 +01:00
</ th >
</ tr > ' ;
2017-08-04 16:28:16 +02:00
// Imponibile scontato
2017-09-07 16:51:14 +02:00
echo '
2018-01-19 22:38:11 +01:00
< tr >
< td colspan = " 4 " class = " text-right " >
< b > '.tr(' Imponibile scontato ', [], [' upper ' => true]).' :</ b >
</ td >
2017-08-04 16:28:16 +02:00
2018-01-19 22:38:11 +01:00
< th class = " text-center " >
2018-06-29 11:45:45 +02:00
< b > '.Translator::numberToLocale($costi_intervento[' totale_scontato ']).' & euro ; </ b >
2018-01-19 22:38:11 +01:00
</ th >
</ tr > ' ;
2017-08-04 16:28:16 +02:00
}
// IVA
// Totale intervento
2017-09-07 16:51:14 +02:00
echo '
2017-08-04 16:28:16 +02:00
< tr >
2017-09-11 13:08:50 +02:00
< td colspan = " 4 " class = " text-right " >
2018-09-05 15:00:19 +02:00
< b > '.tr(' Iva ', [], [' upper ' => true]).' :</ b >
2017-08-04 16:28:16 +02:00
</ td >
2017-09-11 13:08:50 +02:00
< th class = " text-center " >
2018-09-05 15:00:19 +02:00
< b > '.Translator::numberToLocale($costi_intervento[' iva_totale ']).' & euro ; </ b >
2017-09-11 13:08:50 +02:00
</ th >
2017-08-04 16:28:16 +02:00
</ tr > ' ;
// TOTALE INTERVENTO
2017-09-07 16:51:14 +02:00
echo '
2017-08-04 16:28:16 +02:00
< tr >
2017-09-11 13:08:50 +02:00
< td colspan = " 4 " class = " text-right " >
2017-09-10 14:35:41 +02:00
< b > '.tr(' Totale intervento ', [], [' upper ' => true]).' :</ b >
2017-08-04 16:28:16 +02:00
</ td >
2017-09-11 13:08:50 +02:00
< th class = " text-center " >
2018-09-05 15:00:19 +02:00
< b > '.Translator::numberToLocale($costi_intervento[' totale ']).' & euro ; </ b >
2017-09-11 13:08:50 +02:00
</ th >
</ tr > ' ;
2017-08-04 16:28:16 +02:00
}
2017-09-07 16:51:14 +02:00
echo '
2017-08-04 16:28:16 +02:00
</ table > ' ;