closes #984
This commit is contained in:
@@ -233,6 +233,9 @@ public class Product implements IZUGFeRDExportableProduct {
|
||||
*/
|
||||
public Product setReverseCharge() {
|
||||
isReverseCharge = true;
|
||||
if ((getTaxExemptionReason()==null)||(getTaxExemptionReason().isEmpty())) {
|
||||
setTaxExemptionReason("Reverse charge");
|
||||
}
|
||||
setVATPercent(BigDecimal.ZERO);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ public interface IZUGFeRDExportableProduct {
|
||||
return TaxCategoryCodeTypeConstants.INTRACOMMUNITY;// "K"; // within europe
|
||||
} else if (isReverseCharge()) {
|
||||
return TaxCategoryCodeTypeConstants.REVERSECHARGE;// "AE"; // to out of europe...
|
||||
} else if (getVATPercent().compareTo(BigDecimal.ZERO) == 0) {
|
||||
} else if ((getVATPercent()==null)||(getVATPercent().compareTo(BigDecimal.ZERO) == 0)) {
|
||||
return TaxCategoryCodeTypeConstants.ZEROTAXPRODUCTS; // "Z"; // zero rated goods
|
||||
} else {
|
||||
return TaxCategoryCodeTypeConstants.STANDARDRATE;// "S"; // one of the "standard" rates (not
|
||||
|
||||
@@ -538,7 +538,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
||||
xml += "<ram:ExemptionReason>" + XMLTools.encodeXML(currentItem.getProduct().getTaxExemptionReason()) + "</ram:ExemptionReason>";
|
||||
}
|
||||
xml += "<ram:CategoryCode>" + currentItem.getProduct().getTaxCategoryCode() + "</ram:CategoryCode>";
|
||||
if (!currentItem.getProduct().getTaxCategoryCode().equals(TaxCategoryCodeTypeConstants.UNTAXEDSERVICE)) {
|
||||
if ((!currentItem.getProduct().getTaxCategoryCode().equals(TaxCategoryCodeTypeConstants.UNTAXEDSERVICE)) && (!currentItem.getProduct().getTaxCategoryCode().equals(TaxCategoryCodeTypeConstants.ZEROTAXPRODUCTS))) {
|
||||
xml += "<ram:RateApplicablePercent>" + vatFormat(currentItem.getProduct().getVATPercent()) + "</ram:RateApplicablePercent>";
|
||||
}
|
||||
xml += "</ram:ApplicableTradeTax>";
|
||||
|
||||
@@ -23,5 +23,6 @@ public class DocumentCodeTypeConstants {
|
||||
public static final String CREDITNOTE = "381";
|
||||
public static final String DEBITNOTE = "84";
|
||||
public static final String CORRECTEDINVOICE = "384";
|
||||
public static final String SELFBILLING = "389";
|
||||
public static final String PARTIAL_BILLING = "326";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user