Merge pull request #1055 from langfr/bugfix/ApplicableTradeTax

Correct order of ApplicableTradeTax sub-elements.
This commit is contained in:
Jochen Staerk
2026-04-08 16:17:13 +02:00
committed by GitHub

View File

@@ -555,15 +555,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;