Merge pull request #425 from langfr/master

Read Item.referencedLineID.
This commit is contained in:
Jochen Staerk
2024-07-29 18:27:52 +02:00
committed by GitHub

View File

@@ -60,6 +60,7 @@ public class Item implements IZUGFeRDExportableItem {
String vatPercent = null;
String lineTotal = "0";
String unitCode = "0";
String referencedLineID = null;
ArrayList<ReferencedDocument> rdocs = null;
@@ -142,6 +143,16 @@ public class Item implements IZUGFeRDExportableItem {
}
if ((tradeLineChilds.item(tradeLineChildIndex).getLocalName() != null) && tradeLineChilds.item(tradeLineChildIndex).getLocalName().equals("BuyerOrderReferencedDocument")) {
NodeList docChilds = tradeLineChilds.item(tradeLineChildIndex).getChildNodes();
for (int docIndex = 0; docIndex < docChilds.getLength(); docIndex++) {
String localName = docChilds.item(docIndex).getLocalName();
if ((localName != null) && (localName.equals("LineID"))) {
referencedLineID = docChilds.item(docIndex).getTextContent();
}
}
}
if ((tradeLineChilds.item(tradeLineChildIndex).getLocalName() != null) && tradeLineChilds
.item(tradeLineChildIndex).getLocalName().equals("NetPriceProductTradePrice")) {
NodeList netChilds = tradeLineChilds.item(tradeLineChildIndex).getChildNodes();
@@ -263,6 +274,7 @@ public class Item implements IZUGFeRDExportableItem {
addReferencedDocument(rdoc);
}
}
addReferencedLineID( referencedLineID );
}