Merge pull request #1055 from langfr/bugfix/ApplicableTradeTax
Correct order of ApplicableTradeTax sub-elements.
This commit is contained in:
@@ -555,15 +555,16 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
||||
|
||||
xml += "</ram:SpecifiedLineTradeDelivery>"
|
||||
+ "<ram:SpecifiedLineTradeSettlement>"
|
||||
+ "<ram:ApplicableTradeTax>"
|
||||
+ "<ram:TypeCode>VAT</ram:TypeCode>";
|
||||
+ "<ram:ApplicableTradeTax>";
|
||||
// <CalculatedAmount/>
|
||||
xml += "<ram:TypeCode>VAT</ram:TypeCode>";
|
||||
if (currentItem.getProduct().getTaxExemptionReason() != null) {
|
||||
xml += "<ram:ExemptionReason>" + XMLTools.encodeXML(currentItem.getProduct().getTaxExemptionReason()) + "</ram:ExemptionReason>";
|
||||
}
|
||||
xml += "<ram:CategoryCode>" + currentItem.getProduct().getTaxCategoryCode() + "</ram:CategoryCode>";
|
||||
if (currentItem.getProduct().getTaxExemptionReasonCode() != null) {
|
||||
xml += "<ram:ExemptionReasonCode>" + XMLTools.encodeXML(currentItem.getProduct().getTaxExemptionReasonCode()) + "</ram:ExemptionReasonCode>";
|
||||
}
|
||||
xml += "<ram:CategoryCode>" + currentItem.getProduct().getTaxCategoryCode() + "</ram:CategoryCode>";
|
||||
BigDecimal vatValue=BigDecimal.ZERO;
|
||||
if (currentItem.getProduct().getTaxCategoryCode().equals(TaxCategoryCodeTypeConstants.ZEROTAXPRODUCTS)) {
|
||||
vatValue=BigDecimal.ZERO;
|
||||
|
||||
Reference in New Issue
Block a user