Merge pull request #424 from langfr/feature/420b

Correction on Item Attributes, related to #420.
This commit is contained in:
Jochen Staerk
2024-07-29 18:27:27 +02:00
committed by GitHub

View File

@@ -399,11 +399,12 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
"</ram:Description>"; "</ram:Description>";
} }
if (currentItem.getProduct().getAttributes() != null) { if (currentItem.getProduct().getAttributes() != null) {
xml += "<ram:ApplicableProductCharacteristic>";
for ( Entry<String, String> entry : currentItem.getProduct().getAttributes().entrySet() ) { for ( Entry<String, String> entry : currentItem.getProduct().getAttributes().entrySet() ) {
xml += "<ram:Description>" + XMLTools.encodeXML(entry.getKey()) + "</ram:Description>" + "<ram:Value>" + XMLTools.encodeXML(entry.getValue()) + "</ram:Value>"; xml += "<ram:ApplicableProductCharacteristic>" +
"<ram:Description>" + XMLTools.encodeXML(entry.getKey()) + "</ram:Description>" +
"<ram:Value>" + XMLTools.encodeXML(entry.getValue()) + "</ram:Value>" +
"</ram:ApplicableProductCharacteristic>";
} }
xml += "</ram:ApplicableProductCharacteristic>";
} }
if (currentItem.getProduct().getCountryOfOrigin() != null) { if (currentItem.getProduct().getCountryOfOrigin() != null) {
xml += "<ram:OriginTradeCountry><ram:ID>" + xml += "<ram:OriginTradeCountry><ram:ID>" +