fix: resolve duplicate notes and missing BIC parsing for UBL invoices
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user