implement tax category codes second step

This commit is contained in:
Jochen Stärk
2019-10-13 18:23:49 +02:00
parent 293134af63
commit 191debf7e4
3 changed files with 5 additions and 3 deletions

View File

@@ -215,6 +215,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider {
this.trans = trans;
boolean hasDueDate=false;
String taxCategoryCode="";
SimpleDateFormat germanDateFormat = new SimpleDateFormat("dd.MM.yyyy"); //$NON-NLS-1$
SimpleDateFormat zugferdDateFormat = new SimpleDateFormat("yyyyMMdd"); //$NON-NLS-1$
@@ -277,7 +278,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider {
int lineID = 0;
for (IZUGFeRDExportableItem currentItem : trans.getZFItems()) {
lineID++;
taxCategoryCode=currentItem.getProduct().getTaxCategoryCode();
LineCalc lc = new LineCalc(currentItem);
xml = xml + " <ram:IncludedSupplyChainTradeLineItem>\n" + //$NON-NLS-1$
" <ram:AssociatedDocumentLineDocument>\n" //$NON-NLS-1$
@@ -446,7 +447,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider {
+ "</ram:CalculatedAmount>\n" //$NON-NLS-1$ //currencyID=\"EUR\"
+ " <ram:TypeCode>VAT</ram:TypeCode>\n" //$NON-NLS-1$
+ " <ram:BasisAmount>" + currencyFormat(amount.getBasis()) + "</ram:BasisAmount>\n" // currencyID=\"EUR\"
+ " <ram:CategoryCode>S</ram:CategoryCode>\n" //$NON-NLS-1$
+ " <ram:CategoryCode>"+taxCategoryCode+"</ram:CategoryCode>\n" //$NON-NLS-1$
+ " <ram:RateApplicablePercent>" + vatFormat(currentTaxPercent) //$NON-NLS-1$
+ "</ram:RateApplicablePercent>\n" + " </ram:ApplicableTradeTax>\n"; //$NON-NLS-2$

View File

@@ -189,7 +189,7 @@ public class ZF2EdgeTest extends MustangReaderTestCase implements IZUGFeRDExport
@Override
public IZUGFeRDExportableItem[] getZFItems() {
Item[] allItems = new Item[2];
Item[] allItems = new Item[3];
EdgeProduct designProduct = new EdgeProduct("", "Künstlerische Gestaltung (Stunde): Einer Beispielrechnung",
"HUR");
EdgeProduct balloonProduct = new EdgeProduct("", "Bestellerweiterung für E&F Umbau", "C62");// test for issue