fix: resolve duplicate notes and missing BIC parsing for UBL invoices

This commit is contained in:
burak
2026-01-11 18:14:37 +03:00
parent 3d7b3cd252
commit 9404e31350

View File

@@ -386,7 +386,6 @@ public class ZUGFeRDInvoiceImporter {
for (int nodeIndex = 0; nodeIndex < UBLNotesNd.getLength(); nodeIndex++) {
includedNotes.add(IncludedNote.generalNote(UBLNotesNd.item(nodeIndex).getTextContent()));
}
zpp.addNotes(includedNotes);
}
XPathExpression shipExUBL = xpath.compile("//*[local-name()=\"Delivery\"]");
@@ -955,6 +954,16 @@ public class ZUGFeRDInvoiceImporter {
if ((paymentTermChilds.item(paymentTermChildIndex).getLocalName() != null) && (paymentTermChilds.item(paymentTermChildIndex).getLocalName().equals("ID"))) {
IBAN = XMLTools.trimOrNull(paymentTermChilds.item(paymentTermChildIndex));
}
if ((paymentTermChilds.item(paymentTermChildIndex).getLocalName() != null)
&& (paymentTermChilds.item(paymentTermChildIndex).getLocalName().equals("FinancialInstitutionBranch"))) {
NodeList branchChilds = paymentTermChilds.item(paymentTermChildIndex).getChildNodes();
for (int branchChildIndex = 0; branchChildIndex < branchChilds.getLength(); branchChildIndex++) {
if ((branchChilds.item(branchChildIndex).getLocalName() != null)
&& (branchChilds.item(branchChildIndex).getLocalName().equals("ID"))) {
BIC = XMLTools.trimOrNull(branchChilds.item(branchChildIndex));
}
}
}
}
}
if ((paymentMeansChilds.item(meansChildIndex).getLocalName() != null)
@@ -970,6 +979,9 @@ public class ZUGFeRDInvoiceImporter {
}
if (IBAN != null) {
BankDetails bd = new BankDetails(IBAN);
if (BIC != null) {
bd.setBIC(BIC);
}
if (accountName != null) {
bd.setAccountName(accountName);
}