corrected UBL behaviour (ignorance)
This commit is contained in:
@@ -123,11 +123,13 @@ public class Item implements IZUGFeRDExportableItem {
|
|||||||
itemMap.getAsString("Note")
|
itemMap.getAsString("Note")
|
||||||
.ifPresent(this::addNote);
|
.ifPresent(this::addNote);
|
||||||
|
|
||||||
|
if (product==null) { // CII
|
||||||
if (itemMap.getNode("SpecifiedTradeProduct").isPresent()) {
|
if (itemMap.getNode("SpecifiedTradeProduct").isPresent()) {
|
||||||
product = new Product(itemMap.getNode("SpecifiedTradeProduct").get());
|
product = new Product(itemMap.getNode("SpecifiedTradeProduct").get());
|
||||||
} else {
|
} else {
|
||||||
product = new Product();
|
product = new Product();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
itemMap.getAsNodeMap("SpecifiedLineTradeAgreement", "SpecifiedSupplyChainTradeAgreement").ifPresent(icnm -> {
|
itemMap.getAsNodeMap("SpecifiedLineTradeAgreement", "SpecifiedSupplyChainTradeAgreement").ifPresent(icnm -> {
|
||||||
icnm.getAsNodeMap("BuyerOrderReferencedDocument")
|
icnm.getAsNodeMap("BuyerOrderReferencedDocument")
|
||||||
@@ -161,16 +163,6 @@ public class Item implements IZUGFeRDExportableItem {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
String chargeIndicator = gpptpNodes.getAsNodeMap("AppliedTradeAllowanceCharge").flatMap(acChargeIndicatorNodes -> acChargeIndicatorNodes.getAsString("ChargeIndicator")).get();
|
|
||||||
if (chargeIndicator != null) {
|
|
||||||
BigDecimal actual = gpptpNodes.getAsNodeMap("AppliedTradeAllowanceCharge").flatMap(acChargeIndicatorNodes -> acChargeIndicatorNodes.getAsBigDecimal("ActualAmount")).get();
|
|
||||||
if (actual != null) {
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
icnm.getAllNodes("AdditionalReferencedDocument").map(ReferencedDocument::fromNode).
|
icnm.getAllNodes("AdditionalReferencedDocument").map(ReferencedDocument::fromNode).
|
||||||
forEach(this::addReferencedDocument);
|
forEach(this::addReferencedDocument);
|
||||||
});
|
});
|
||||||
@@ -250,7 +242,7 @@ public class Item implements IZUGFeRDExportableItem {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
itemMap.getAllNodes("AllowanceCharge").map(NodeMap::new).forEach(stac -> { //UBL
|
itemMap.getAllNodes("AllowanceCharge").map(NodeMap::new).forEach(stac -> { //CII
|
||||||
|
|
||||||
String isChargeString = stac.getAsString("ChargeIndicator").get();
|
String isChargeString = stac.getAsString("ChargeIndicator").get();
|
||||||
String percentString = stac.getAsStringOrNull("MultiplierFactorNumeric");
|
String percentString = stac.getAsStringOrNull("MultiplierFactorNumeric");
|
||||||
|
|||||||
Reference in New Issue
Block a user