From 85457033fa514a2f0187e897184b7e018c848924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jochen=20St=C3=A4rk?= Date: Mon, 6 Apr 2026 16:06:30 +0200 Subject: [PATCH] corrected two failing unit tests, partly reverting #1049 --- .../org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java index 9ac642ae..07336564 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java @@ -553,9 +553,8 @@ public class ZUGFeRDInvoiceImporter { NodeList lineDueNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET); BigDecimal duePayableAmount = null; if (lineDueNodes.getLength() > 0) { - String duePayableAmountStr=XMLTools.trimOrNull(lineDueNodes.item(0)); - if ((zpp instanceof CalculatedInvoice) && (duePayableAmountStr!=null)) { - duePayableAmount = new BigDecimal(duePayableAmountStr); + duePayableAmount = new BigDecimal(XMLTools.trimOrNull(lineDueNodes.item(0))); + if (zpp instanceof CalculatedInvoice) { ((CalculatedInvoice) zpp).setDuePayable(duePayableAmount); } }