diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java index 09803e59..84aa1e37 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java @@ -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); }