From 670853e9f72076077eae20bb35c72dd0adf270b4 Mon Sep 17 00:00:00 2001 From: MatteoPistorello Date: Tue, 21 Dec 2021 12:39:38 +0100 Subject: [PATCH] Fix calcolo totale fattura e xml --- modules/fatture/actions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/fatture/actions.php b/modules/fatture/actions.php index 719db1762..f9c615773 100755 --- a/modules/fatture/actions.php +++ b/modules/fatture/actions.php @@ -240,7 +240,7 @@ switch (post('op')) { $totale_documento_indicato = abs(floatval($dati_generali['ImportoTotaleDocumento'])); // Calcolo del totale basato sui DatiRiepilogo - if (empty($totale_documento) && empty($dati_generali['ScontoMaggiorazione'])) { + if (empty($totale_documento_indicato) && empty($dati_generali['ScontoMaggiorazione'])) { $totale_documento = 0; $riepiloghi = $xml['FatturaElettronicaBody']['DatiBeniServizi']['DatiRiepilogo']; @@ -264,7 +264,7 @@ switch (post('op')) { 'stored' => $totale_documento, 'calculated' => $fattura->totale, ]); - + break; // Elenco fatture in stato Bozza per il cliente