This commit is contained in:
Jochen Stärk
2025-12-11 14:22:46 +01:00
parent 6900f5f433
commit 1c5eac2362
6 changed files with 197 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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>";

View File

@@ -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";
}