From 2e578a3247eacd04945507ac5c336f6a5eff34e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Miguel=20Moreno?= Date: Sat, 9 Sep 2023 12:28:06 +0200 Subject: [PATCH] Fixed negative rounding amounts not showing - Updated UblWriter class > Closes #44 --- src/Writers/UblWriter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Writers/UblWriter.php b/src/Writers/UblWriter.php index f7095c5..36f1fa5 100644 --- a/src/Writers/UblWriter.php +++ b/src/Writers/UblWriter.php @@ -827,7 +827,7 @@ private function addDocumentTotalsNode(UXML $parent, InvoiceTotals $totals) { if ($totals->paidAmount > 0) { $totalsMatrix['cbc:PrepaidAmount'] = $totals->paidAmount; } - if ($totals->roundingAmount > 0) { + if ($totals->roundingAmount != 0) { $totalsMatrix['cbc:PayableRoundingAmount'] = $totals->roundingAmount; } $totalsMatrix['cbc:PayableAmount'] = $totals->payableAmount;