This commit is contained in:
jstaerk
2025-02-10 07:50:57 +01:00
parent 036de68d0a
commit e2290e36cd
5 changed files with 14 additions and 2 deletions

View File

@@ -134,7 +134,10 @@ public class Charge implements IZUGFeRDAllowanceCharge {
if (totalAmount!=null) {
return totalAmount;
} else {
throw new RuntimeException("totalAmount must be set");
if (percent==null) {
throw new RuntimeException("totalAmount must be set");
}
return null;
}
}

View File

@@ -704,6 +704,7 @@ public class ZUGFeRDInvoiceImporter {
NodeList paymentMeansChilds = headerTradeSettlementChilds.item(settlementChildIndex).getChildNodes();
IBAN = null;
BIC = null;
String accountName = null;
paymentMeansCode = null;
paymentMeansInformation = null;
for (int paymentMeansChildIndex = 0; paymentMeansChildIndex < paymentMeansChilds.getLength(); paymentMeansChildIndex++) {
@@ -722,6 +723,9 @@ public class ZUGFeRDInvoiceImporter {
if ((accountChilds.item(accountChildIndex).getLocalName() != null) && (accountChilds.item(accountChildIndex).getLocalName().equals("IBANID"))) {//CII
IBAN = XMLTools.trimOrNull(accountChilds.item(accountChildIndex));
}
if ((accountChilds.item(accountChildIndex).getLocalName() != null) && (accountChilds.item(accountChildIndex).getLocalName().equals("AccountName"))) {//CII
accountName = XMLTools.trimOrNull(accountChilds.item(accountChildIndex));
}
}
}
if ((paymentMeansChilds.item(paymentMeansChildIndex).getLocalName() != null) && (paymentMeansChilds.item(paymentMeansChildIndex).getLocalName().equals("PayeeSpecifiedCreditorFinancialInstitution"))) {
@@ -739,6 +743,9 @@ public class ZUGFeRDInvoiceImporter {
if (BIC != null) {
bd.setBIC(BIC);
}
if (accountName!=null) {
bd.setAccountName(accountName);
}
bankDetails.add(bd);
}
}