From 323fa115c40efcb81f4de6b378fcb08f1d190a0f Mon Sep 17 00:00:00 2001 From: Pek5892 Date: Mon, 13 Feb 2023 09:37:38 +0100 Subject: [PATCH] =?UTF-8?q?Aggiunta=20colonna=20KM=20in=20stampa=20riepilo?= =?UTF-8?q?go=20Attivit=C3=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/riepilogo_interventi/bottom.php | 5 +++-- templates/riepilogo_interventi/piece.php | 10 ++++++---- templates/riepilogo_interventi/top.php | 3 ++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/templates/riepilogo_interventi/bottom.php b/templates/riepilogo_interventi/bottom.php index 867d5f9c7..036a4bd25 100755 --- a/templates/riepilogo_interventi/bottom.php +++ b/templates/riepilogo_interventi/bottom.php @@ -38,6 +38,7 @@ echo ' '.tr('Totale', [], ['upper' => true]).': + '.($km).' '.($pricing ? $somma_ore : '-').' '.($pricing ? moneyFormat($somma_imponibile, 2) : '-').' '.($pricing ? moneyFormat($somma_sconto, 2) : '-').' @@ -49,7 +50,7 @@ echo ' '.tr('Iva', [], ['upper' => true]).': - + '.($pricing ? moneyFormat($somma_iva, 2) : '-').' @@ -58,7 +59,7 @@ echo ' '.tr('Totale Ivato', [], ['upper' => true]).': - + '.($pricing ? moneyFormat($somma_totale_ivato, 2) : '-').' diff --git a/templates/riepilogo_interventi/piece.php b/templates/riepilogo_interventi/piece.php index b71b715aa..bec4f4b3d 100755 --- a/templates/riepilogo_interventi/piece.php +++ b/templates/riepilogo_interventi/piece.php @@ -26,6 +26,7 @@ $intervento = Intervento::find($record['id']); $sessioni = $intervento->sessioni; $iva_predefinita = floatval(Aliquota::find(setting('Iva predefinita'))->percentuale); +$km = $sessioni->sum('km'); $ore = $sessioni->sum('ore'); $imponibile = $tipo=='interno' ? $intervento->spesa : $intervento->imponibile; $sconto = $tipo=='interno' ? 0 : $intervento->sconto; @@ -76,6 +77,7 @@ echo ' } echo ' + '.($km).' '.($pricing ? $ore : '-').' '.($pricing ? moneyFormat($imponibile, 2) : '-').' '.($pricing && empty($options['dir']) ? moneyFormat($sconto, 2) : '-').' @@ -87,7 +89,7 @@ if (count($sessioni) > 0) { echo ' - '.tr('Sessioni').' + '.tr('Sessioni').' '.tr('Data').' '.tr('Inizio').' '.tr('Fine').' @@ -97,7 +99,7 @@ if (count($sessioni) > 0) { echo ' - '.$sessione->anagrafica->ragione_sociale.' ('.$sessione->tipo->descrizione.') + '.$sessione->anagrafica->ragione_sociale.' ('.$sessione->tipo->descrizione.') '.dateFormat($sessione->orario_inizio).' '.timeFormat($sessione->orario_inizio).' '.timeFormat($sessione->orario_fine).' @@ -111,7 +113,7 @@ if (!$righe->isEmpty()) { echo ' - '.tr('Materiale utilizzato e spese aggiuntive').' + '.tr('Materiale utilizzato e spese aggiuntive').' '.tr('Qta').' '.($tipo=='interno' ? tr('Costo unitario') : tr('Prezzo unitario')).' '.($tipo=='interno' ? tr('Costo netto') : tr('Imponibile')).' @@ -124,7 +126,7 @@ if (!$righe->isEmpty()) { echo ' - '.$riga->descrizione.' + '.$riga->descrizione.' '.$riga->qta.' '.$riga->um.' '.($pricing ? moneyFormat($prezzo) : '-').' '.($pricing ? moneyFormat($totale) : '-').' diff --git a/templates/riepilogo_interventi/top.php b/templates/riepilogo_interventi/top.php index f1862cea8..bb3b4ceaf 100755 --- a/templates/riepilogo_interventi/top.php +++ b/templates/riepilogo_interventi/top.php @@ -28,7 +28,8 @@ echo ' '.tr('Documento', [], ['upper' => true]).' - '.tr('Ore', [], ['upper' => true]).' + '.tr('KM', [], ['upper' => true]).' + '.tr('Ore', [], ['upper' => true]).' '.($tipo=='interno' ? tr('Costo totale', [], ['upper' => true]) : tr('Imponibile', [], ['upper' => true])).' '.tr('Sconto', [], ['upper' => true]).' '.($tipo=='interno' ? tr('Costo netto', [], ['upper' => true]) : tr('Totale imponibile', [], ['upper' => true])).'