corrections to intra community supply, the possibility to set it manually via exemptionreasoncode and another test

This commit is contained in:
jstaerk
2024-09-21 08:47:13 +02:00
parent c8a2f7e204
commit c521f58ef1
3 changed files with 71 additions and 3 deletions

View File

@@ -212,6 +212,8 @@ public class Product implements IZUGFeRDExportableProduct {
public Product setIntraCommunitySupply() {
isIntraCommunitySupply = true;
setVATPercent(BigDecimal.ZERO);
setTaxExemptionReason("Intra-community supply");
setTaxCategoryCode("K");
return this;
}

View File

@@ -134,11 +134,11 @@ public class VATAmount {
}
public VATAmount add(VATAmount v) {
return new VATAmount(basis.add(v.getBasis()), calculated.add(v.getCalculated()), this.categoryCode, this.dueDateTypeCode);
return new VATAmount(basis.add(v.getBasis()), calculated.add(v.getCalculated()), this.categoryCode, this.dueDateTypeCode).setVatExemptionReasonText(v.getVatExemptionReasonText());
}
public VATAmount subtract(VATAmount v) {
return new VATAmount(basis.subtract(v.getBasis()), calculated.subtract(v.getCalculated()), this.categoryCode, this.dueDateTypeCode);
return new VATAmount(basis.subtract(v.getBasis()), calculated.subtract(v.getCalculated()), this.categoryCode, this.dueDateTypeCode).setVatExemptionReasonText(v.getVatExemptionReasonText());
}
}