first step to support tax category codes

This commit is contained in:
Jochen Stärk
2019-10-13 18:16:54 +02:00
parent c906bf8f64
commit 293134af63
5 changed files with 305 additions and 256 deletions

View File

@@ -81,5 +81,10 @@ public interface IZUGFeRDExportableProduct {
* @return VAT percent of the product
*/
BigDecimal getVATPercent();
default String getTaxCategoryCode() {
return "S";
}
}

View File

@@ -319,7 +319,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider {
+ " <ram:SpecifiedLineTradeSettlement>\n" //$NON-NLS-1$
+ " <ram:ApplicableTradeTax>\n" //$NON-NLS-1$
+ " <ram:TypeCode>VAT</ram:TypeCode>\n" //$NON-NLS-1$
+ " <ram:CategoryCode>S</ram:CategoryCode>\n" //$NON-NLS-1$
+ " <ram:CategoryCode>"+currentItem.getProduct().getTaxCategoryCode()+"</ram:CategoryCode>\n" //$NON-NLS-1$
+ " <ram:RateApplicablePercent>" //$NON-NLS-1$
+ vatFormat(currentItem.getProduct().getVATPercent()) + "</ram:RateApplicablePercent>\n" //$NON-NLS-1$
+ " </ram:ApplicableTradeTax>\n" //$NON-NLS-1$