additional output in arithmetric exception

This commit is contained in:
Jochen Stärk
2026-04-06 15:40:41 +02:00
parent 89042d505a
commit 2a9b9221af
2 changed files with 4 additions and 0 deletions

View File

@@ -1374,6 +1374,9 @@ public class ZUGFeRDInvoiceImporter {
+ Stream.of(tc.trans.getZFItems())
.map(item -> item.getCalculation().getItemTotalNetAmount().toPlainString())
.collect(Collectors.joining(" + "));
if (tc.trans.getRoundingAmount()!=null) {
moreDetails += " and rounding amount "+tc.trans.getRoundingAmount().toPlainString();
}
} catch (Exception ignored) {
}
throw new ArithmeticException("Payable total in XML is " + payableTotalFromXml + ", but calculated total is " + calculatedPayableTotal + moreDetails);