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%
|
||||
setProduct(new Product());
|
||||
icnm.getAsString("Name").ifPresent(product::setName);
|
||||
icnm.getAsString("Description").ifPresent(product::setDescription);
|
||||
icnm.getAsNodeMap("ClassifiedTaxCategory").flatMap(m -> m.getAsBigDecimal("Percent"))
|
||||
.ifPresent(product::setVATPercent);
|
||||
});
|
||||
|
||||
@@ -82,13 +82,13 @@ public class Product implements IZUGFeRDExportableProduct {
|
||||
|
||||
//UBL
|
||||
nodeMap.getAsNodeMap("AdditionalItemProperty").ifPresent(aipNodes -> {
|
||||
String key = aipNodes.getAsStringOrNull("Name");
|
||||
String value = aipNodes.getAsStringOrNull("Value");
|
||||
if (key != null && value != null) {
|
||||
String name = aipNodes.getAsStringOrNull("Name");
|
||||
String val = aipNodes.getAsStringOrNull("Value");
|
||||
if (name != null && val != null) {
|
||||
if (attributes == null) {
|
||||
attributes = new HashMap<>();
|
||||
}
|
||||
attributes.put(key, value);
|
||||
attributes.put(name, val);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user