diff --git a/templates/liquidazione_iva/body.php b/templates/liquidazione_iva/body.php
index 16aabce52..2b25a8ea8 100644
--- a/templates/liquidazione_iva/body.php
+++ b/templates/liquidazione_iva/body.php
@@ -45,6 +45,9 @@ $totale_iva_periodo_precedente = $totale_iva_vendite_periodo_precedente - $total
$totale_iva = $totale_iva_esigibile - $totale_iva_detraibile;
if ($periodo['valore'] == 'Trimestrale' && $totale_iva > 0) {
+ if ($totale_iva_periodo_precedente < 25.82 && $totale_iva_periodo_precedente > 0) {
+ $totale_iva += $totale_iva_periodo_precedente;
+ }
$maggiorazione = $totale_iva * 0.01;
$totale_iva_maggiorata = $totale_iva + $maggiorazione;
}
@@ -258,7 +261,7 @@ echo '
TOTALE IVA DETRAIBILI |
- '.moneyFormat($totale_iva_detraibile, 2).' |
+ '.(empty($totale_iva_nondetraibile) ? '' : moneyformat($totale_iva_detraibile - $totale_iva_nondetraibile, 2)).' |
VARIAZIONE DI IMPOSTA RELATIVE A PERIODI PRECEDENTI | ';
@@ -313,8 +316,13 @@ echo '
IMPORTO DA VERSARE | ';
if ($totale_iva > 25.82) {
- echo'
- '.($periodo['valore'] == 'Mensile' ? moneyFormat($totale_iva, 2) : moneyFormat($totale_iva_maggiorata, 2)).' | ';
+ if ($periodo['valore'] == 'Mensile' || ($totale_iva_periodo_precedente < 25.82 && $totale_iva_periodo_precedente > 0)) {
+ echo'
+ '.moneyFormat($totale_iva, 2).' | ';
+ } else {
+ echo'
+ '.moneyFormat($totale_iva_maggiorata, 2).' | ';
+ }
} else {
echo'
| ';