UBL updates : adding description to item for ubl
This commit is contained in:
@@ -66,6 +66,7 @@ public class Item implements IZUGFeRDExportableItem {
|
|||||||
//and we additionally have vat%
|
//and we additionally have vat%
|
||||||
setProduct(new Product());
|
setProduct(new Product());
|
||||||
icnm.getAsString("Name").ifPresent(product::setName);
|
icnm.getAsString("Name").ifPresent(product::setName);
|
||||||
|
icnm.getAsString("Description").ifPresent(product::setDescription);
|
||||||
icnm.getAsNodeMap("ClassifiedTaxCategory").flatMap(m -> m.getAsBigDecimal("Percent"))
|
icnm.getAsNodeMap("ClassifiedTaxCategory").flatMap(m -> m.getAsBigDecimal("Percent"))
|
||||||
.ifPresent(product::setVATPercent);
|
.ifPresent(product::setVATPercent);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -82,13 +82,13 @@ public class Product implements IZUGFeRDExportableProduct {
|
|||||||
|
|
||||||
//UBL
|
//UBL
|
||||||
nodeMap.getAsNodeMap("AdditionalItemProperty").ifPresent(aipNodes -> {
|
nodeMap.getAsNodeMap("AdditionalItemProperty").ifPresent(aipNodes -> {
|
||||||
String key = aipNodes.getAsStringOrNull("Name");
|
String name = aipNodes.getAsStringOrNull("Name");
|
||||||
String value = aipNodes.getAsStringOrNull("Value");
|
String val = aipNodes.getAsStringOrNull("Value");
|
||||||
if (key != null && value != null) {
|
if (name != null && val != null) {
|
||||||
if (attributes == null) {
|
if (attributes == null) {
|
||||||
attributes = new HashMap<>();
|
attributes = new HashMap<>();
|
||||||
}
|
}
|
||||||
attributes.put(key, value);
|
attributes.put(name, val);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user