Fix totali righe interventi

This commit is contained in:
MatteoPistorello 2022-02-04 17:32:07 +01:00
parent 12d26db1d4
commit d3b42eacfc
1 changed files with 27 additions and 1 deletions

View File

@ -183,11 +183,37 @@ $righe = $intervento->getRighe();
<b>'.tr('Imponibile', [], ['upper' => true]).':</b>
</td>
<td class="text-right">
'.moneyFormat($righe->sum('totale_imponibile'), 2).'
'.moneyFormat($intervento->imponibile, 2).'
</td>
<td></td>
</tr>';
// SCONTO
if (!empty($intervento->sconto)) {
echo '
<tr>
<td colspan="'.((!$record['flag_completato']) ? 5 : 4).'" class="text-right">
<b><span class="tip" title="'.tr('Un importo positivo indica uno sconto, mentre uno negativo indica una maggiorazione').'"> <i class="fa fa-question-circle-o"></i> '.tr('Sconto/maggiorazione', [], ['upper' => true]).':</span></b>
</td>
<td class="text-right">
'.moneyFormat($intervento->sconto, 2).'
</td>
<td></td>
</tr>';
// Totale imponibile scontato
echo '
<tr>
<td colspan="'.((!$record['flag_completato']) ? 5 : 4).'" class="text-right">
<b>'.tr('Totale imponibile', [], ['upper' => true]).':</b>
</td>
<td class="text-right">
'.moneyFormat($intervento->totale_imponibile, 2).'
</td>
<td></td>
</tr>';
}
}
echo'