Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Pek5892 committed Oct 3, 2024
2 parents 42cb3f5 + aa190b3 commit 8701979
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/importFE/src/FatturaOrdinaria.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,9 @@ public function saveRighe($articoli, $iva, $conto, $movimentazione = true, $crea
$imposta_riepilogo += $riepilogo['Imposta'];
}

$totale_documento = $this->getBody()['DatiGenerali']['DatiGeneraliDocumento']['ImportoTotaleDocumento'];
$differenza_iva = round(abs($fattura->iva) - abs($imposta_riepilogo), 2);
$diff = round(abs($fattura->totale_imponibile + abs($imposta_riepilogo) + $fattura->rivalsa_inps) - abs($totale_documento), 2);
$totale_documento = $this->getBody()['DatiGenerali']['DatiGeneraliDocumento']['ImportoTotaleDocumento'] ?? 0;
$differenza_iva = round(abs($fattura->iva ?? 0) - abs($imposta_riepilogo ?? 0), 2);
$diff = round(abs(($fattura->totale_imponibile ?? 0) + (abs($imposta_riepilogo ?? 0)) + ($fattura->rivalsa_inps ?? 0)) - abs($totale_documento), 2);

$iva_arrotondamento = database()->fetchOne('SELECT * FROM `co_iva` WHERE `percentuale`= 0 AND `deleted_at` IS NULL LIMIT 1');
if ($diff || $differenza_iva) {
Expand Down

0 comments on commit 8701979

Please sign in to comment.