From d3b42eacfce3dd650b8cc8cd878901ba1953ccc9 Mon Sep 17 00:00:00 2001 From: MatteoPistorello Date: Fri, 4 Feb 2022 17:32:07 +0100 Subject: [PATCH] Fix totali righe interventi --- modules/interventi/row-list.php | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/modules/interventi/row-list.php b/modules/interventi/row-list.php index 2d1a14a58..6775f1278 100755 --- a/modules/interventi/row-list.php +++ b/modules/interventi/row-list.php @@ -183,11 +183,37 @@ $righe = $intervento->getRighe(); '.tr('Imponibile', [], ['upper' => true]).': - '.moneyFormat($righe->sum('totale_imponibile'), 2).' + '.moneyFormat($intervento->imponibile, 2).' '; + // SCONTO + if (!empty($intervento->sconto)) { + echo ' + + + '.tr('Sconto/maggiorazione', [], ['upper' => true]).': + + + '.moneyFormat($intervento->sconto, 2).' + + + '; + + // Totale imponibile scontato + echo ' + + + '.tr('Totale imponibile', [], ['upper' => true]).': + + + '.moneyFormat($intervento->totale_imponibile, 2).' + + + '; + } + } echo'