import docuemtne level included notes in ubl
This commit is contained in:
@@ -306,8 +306,18 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
zpp.setDeliveryAddress(new TradeParty(deliveryNodes));
|
zpp.setDeliveryAddress(new TradeParty(deliveryNodes));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<IncludedNote> includedNotes = new ArrayList<>();
|
||||||
|
|
||||||
//UBL...
|
//UBL...
|
||||||
|
XPathExpression UBLNotesEx = xpath.compile("/*[local-name()=\"Invoice\"]/*[local-name()=\"Note\"]");
|
||||||
|
NodeList UBLNotesNd = (NodeList) UBLNotesEx.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
|
if ((UBLNotesNd != null) && (UBLNotesNd.getLength() > 0)) {
|
||||||
|
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\"]");
|
XPathExpression shipExUBL = xpath.compile("//*[local-name()=\"Delivery\"]");
|
||||||
Node deliveryNode = (Node) shipExUBL.evaluate(getDocument(), XPathConstants.NODE);
|
Node deliveryNode = (Node) shipExUBL.evaluate(getDocument(), XPathConstants.NODE);
|
||||||
|
|
||||||
@@ -473,6 +483,7 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
Date dueDate = null;
|
Date dueDate = null;
|
||||||
Date deliveryDate = null;
|
Date deliveryDate = null;
|
||||||
String despatchAdviceReferencedDocument = null;
|
String despatchAdviceReferencedDocument = null;
|
||||||
|
|
||||||
for (int i = 0; i < ExchangedDocumentNodes.getLength(); i++) {
|
for (int i = 0; i < ExchangedDocumentNodes.getLength(); i++) {
|
||||||
Node exchangedDocumentNode = ExchangedDocumentNodes.item(i);
|
Node exchangedDocumentNode = ExchangedDocumentNodes.item(i);
|
||||||
NodeList exchangedDocumentChilds = exchangedDocumentNode.getChildNodes();
|
NodeList exchangedDocumentChilds = exchangedDocumentNode.getChildNodes();
|
||||||
@@ -493,7 +504,6 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<IncludedNote> includedNotes = new ArrayList<>();
|
|
||||||
if ((item.getLocalName() != null) && (item.getLocalName().equals("IncludedNote"))) {
|
if ((item.getLocalName() != null) && (item.getLocalName().equals("IncludedNote"))) {
|
||||||
String subjectCode = "";
|
String subjectCode = "";
|
||||||
String content = null;
|
String content = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user