Correct order of ApplicableTradeTax sub-elements.

This commit is contained in:
langfr
2026-03-02 22:36:32 +00:00
parent a59fce7dab
commit 4fc7ee1141

View File

@@ -550,15 +550,16 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
xml += "</ram:SpecifiedLineTradeDelivery>" xml += "</ram:SpecifiedLineTradeDelivery>"
+ "<ram:SpecifiedLineTradeSettlement>" + "<ram:SpecifiedLineTradeSettlement>"
+ "<ram:ApplicableTradeTax>" + "<ram:ApplicableTradeTax>";
+ "<ram:TypeCode>VAT</ram:TypeCode>"; // <CalculatedAmount/>
xml += "<ram:TypeCode>VAT</ram:TypeCode>";
if (currentItem.getProduct().getTaxExemptionReason() != null) { if (currentItem.getProduct().getTaxExemptionReason() != null) {
xml += "<ram:ExemptionReason>" + XMLTools.encodeXML(currentItem.getProduct().getTaxExemptionReason()) + "</ram:ExemptionReason>"; xml += "<ram:ExemptionReason>" + XMLTools.encodeXML(currentItem.getProduct().getTaxExemptionReason()) + "</ram:ExemptionReason>";
} }
xml += "<ram:CategoryCode>" + currentItem.getProduct().getTaxCategoryCode() + "</ram:CategoryCode>";
if (currentItem.getProduct().getTaxExemptionReasonCode() != null) { if (currentItem.getProduct().getTaxExemptionReasonCode() != null) {
xml += "<ram:ExemptionReasonCode>" + XMLTools.encodeXML(currentItem.getProduct().getTaxExemptionReasonCode()) + "</ram:ExemptionReasonCode>"; xml += "<ram:ExemptionReasonCode>" + XMLTools.encodeXML(currentItem.getProduct().getTaxExemptionReasonCode()) + "</ram:ExemptionReasonCode>";
} }
xml += "<ram:CategoryCode>" + currentItem.getProduct().getTaxCategoryCode() + "</ram:CategoryCode>";
BigDecimal vatValue=BigDecimal.ZERO; BigDecimal vatValue=BigDecimal.ZERO;
if (currentItem.getProduct().getTaxCategoryCode().equals(TaxCategoryCodeTypeConstants.ZEROTAXPRODUCTS)) { if (currentItem.getProduct().getTaxCategoryCode().equals(TaxCategoryCodeTypeConstants.ZEROTAXPRODUCTS)) {
vatValue=BigDecimal.ZERO; vatValue=BigDecimal.ZERO;