some work on schemedids, including class

This commit is contained in:
jstaerk
2022-07-25 11:48:21 +02:00
parent 66ab7b549c
commit 83f4b710fb
9 changed files with 328 additions and 11 deletions

View File

@@ -5,7 +5,7 @@
- Support validation of XRechnung (CII) 2.2 - Support validation of XRechnung (CII) 2.2
- allow to create fx 1 files with command line again - allow to create fx 1 files with command line again
- is maven build profile to gen xslt, mvn clean package -P generateXSLTFromSchematron - is maven build profile to gen xslt, mvn clean package -P generateXSLTFromSchematron
- OXPullprovider to no longer generate invsalid XML if a duedate is set - OXPullprovider to no longer generate invalid XML if a duedate is set
- Add missing encodeXML to node payment terms description #278 thanks to weclapp-dev - Add missing encodeXML to node payment terms description #278 thanks to weclapp-dev
2.5.1 2.5.1

View File

@@ -12,8 +12,9 @@ import java.math.BigDecimal;
public class Product implements IZUGFeRDExportableProduct { public class Product implements IZUGFeRDExportableProduct {
protected String unit, name, description, sellerAssignedID, buyerAssignedID; protected String unit, name, description, sellerAssignedID, buyerAssignedID;
protected BigDecimal VATPercent; protected BigDecimal VATPercent;
protected boolean isReverseCharge=false; protected boolean isReverseCharge = false;
protected boolean isIntraCommunitySupply=false; protected boolean isIntraCommunitySupply = false;
protected SchemedID globalId = null;
/*** /***
* default constructor * default constructor
@@ -38,6 +39,29 @@ public class Product implements IZUGFeRDExportableProduct {
} }
@Override
public String getGlobalID() {
if (globalId == null) {
return null;
} else {
return globalId.getID();
}
}
@Override
public String getGlobalIDScheme() {
if (globalId == null) {
return null;
} else {
return globalId.getScheme();
}
}
public Product addGlobalID(SchemedID schemedID) {
globalId = schemedID;
return this;
}
public String getSellerAssignedID() { public String getSellerAssignedID() {
return sellerAssignedID; return sellerAssignedID;
@@ -82,7 +106,7 @@ public class Product implements IZUGFeRDExportableProduct {
* @return fluent setter * @return fluent setter
*/ */
public Product setReverseCharge() { public Product setReverseCharge() {
isReverseCharge=true; isReverseCharge = true;
setVATPercent(BigDecimal.ZERO); setVATPercent(BigDecimal.ZERO);
return this; return this;
} }
@@ -93,7 +117,7 @@ public class Product implements IZUGFeRDExportableProduct {
* @return fluent setter * @return fluent setter
*/ */
public Product setIntraCommunitySupply() { public Product setIntraCommunitySupply() {
isIntraCommunitySupply=true; isIntraCommunitySupply = true;
setVATPercent(BigDecimal.ZERO); setVATPercent(BigDecimal.ZERO);
return this; return this;
} }
@@ -120,6 +144,7 @@ public class Product implements IZUGFeRDExportableProduct {
/** /**
* name of the product * name of the product
*
* @param name short name * @param name short name
* @return fluent setter * @return fluent setter
*/ */
@@ -135,6 +160,7 @@ public class Product implements IZUGFeRDExportableProduct {
/** /**
* description of the product (required) * description of the product (required)
*
* @param description long name * @param description long name
* @return fluent setter * @return fluent setter
*/ */

View File

@@ -0,0 +1,34 @@
package org.mustangproject;
public class SchemedID {
protected String scheme;
protected String id;
public String getScheme() {
return scheme;
}
public SchemedID setScheme(String scheme) {
this.scheme = scheme;
return this;
}
public String getID() {
return id;
}
public SchemedID setId(String id) {
this.id = id;
return this;
}
public SchemedID() {
}
public SchemedID(String scheme, String id) {
setScheme(scheme);
setId(id);
}
}

View File

@@ -24,6 +24,7 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
protected List<IZUGFeRDTradeSettlementDebit> debitDetails = new ArrayList<>(); protected List<IZUGFeRDTradeSettlementDebit> debitDetails = new ArrayList<>();
protected Contact contact = null; protected Contact contact = null;
protected LegalOrganisation legalOrg = null; protected LegalOrganisation legalOrg = null;
protected SchemedID globalId=null;
/** /**
* Default constructor. * Default constructor.
@@ -150,6 +151,26 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
return ID; return ID;
} }
@Override
public String getGlobalID() {
if (globalId!=null) {
return globalId.getID();
}
return null;
}
@Override
public String getGlobalIDScheme() {
if (globalId!=null) {
return globalId.getScheme();
}
return null;
}
/** /**
* if it's a customer, this can e.g. be the customer ID * if it's a customer, this can e.g. be the customer ID
* *
@@ -172,6 +193,11 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
return this; return this;
} }
public TradeParty addGlobalID(SchemedID schemedID) {
globalId=schemedID;
return this;
}
/*** /***
* required (for senders, if payment is not debit): the BIC and IBAN * required (for senders, if payment is not debit): the BIC and IBAN
* @param s bank credentials * @param s bank credentials

View File

@@ -128,6 +128,26 @@ public interface IZUGFeRDExportableProduct {
} }
} }
/**
* customer global identification assigned by the seller
*
* @return customer identification
*/
default String getGlobalID() {
return null;
}
/**
* customer global identification scheme
*
* @return customer identification
*/
default String getGlobalIDScheme() {
return null;
}
default String getTaxExemptionReason() { default String getTaxExemptionReason() {
if (isIntraCommunitySupply()) { if (isIntraCommunitySupply()) {
return "Intra-community supply"; return "Intra-community supply";

View File

@@ -359,7 +359,10 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
+ "</ram:AssociatedDocumentLineDocument>" + "</ram:AssociatedDocumentLineDocument>"
+ "<ram:SpecifiedTradeProduct>"; + "<ram:SpecifiedTradeProduct>";
// + " <GlobalID schemeID=\"0160\">4012345001235</GlobalID>" if ((currentItem.getProduct().getGlobalIDScheme() != null) && (currentItem.getProduct().getGlobalID() != null)) {
xml += "<ram:GlobalID schemeID=\""+XMLTools.encodeXML(currentItem.getProduct().getGlobalIDScheme())+"\">"+XMLTools.encodeXML(currentItem.getProduct().getGlobalID())+"</ram:GlobalID>";
}
if (currentItem.getProduct().getSellerAssignedID() != null) { if (currentItem.getProduct().getSellerAssignedID() != null) {
xml += "<ram:SellerAssignedID>" xml += "<ram:SellerAssignedID>"
+ XMLTools.encodeXML(currentItem.getProduct().getSellerAssignedID()) + "</ram:SellerAssignedID>"; + XMLTools.encodeXML(currentItem.getProduct().getSellerAssignedID()) + "</ram:SellerAssignedID>";

View File

@@ -32,6 +32,9 @@ import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Date; import java.util.Date;
import static org.xmlunit.assertj.XmlAssert.assertThat; import static org.xmlunit.assertj.XmlAssert.assertThat;
@@ -78,9 +81,16 @@ public class XRTest extends TestCase {
String number = "123"; String number = "123";
String amountStr = "1.00"; String amountStr = "1.00";
BigDecimal amount = new BigDecimal(amountStr); BigDecimal amount = new BigDecimal(amountStr);
byte[] b = {12, 13}; byte[] b = null;
Path path = Paths.get("c:\\users\\jstaerk\\temp\\ef1710en.pdf");
try {
b = Files.readAllBytes(path);
} catch(IOException ex) {
ex.printStackTrace();
}
FileAttachment fe1=new FileAttachment("one.pdf", "application/pdf", "Alternative", b); FileAttachment fe1=new FileAttachment("one.pdf", "application/pdf", "Alternative", b);
FileAttachment fe2=new FileAttachment("two.pdf", "application/pdf", "Alternative", b);
Invoice i = new Invoice().setDueDate(new Date()).setIssueDate(new Date()).setDeliveryDate(new Date()) Invoice i = new Invoice().setDueDate(new Date()).setIssueDate(new Date()).setDeliveryDate(new Date())
.setSender(new TradeParty(orgname,"teststr","55232","teststadt","DE").addTaxID("DE4711").addVATID("DE0815").setContact(new Contact("Hans Test","+49123456789","test@example.org")).addBankDetails(new BankDetails("DE12500105170648489890","COBADEFXXX"))) .setSender(new TradeParty(orgname,"teststr","55232","teststadt","DE").addTaxID("DE4711").addVATID("DE0815").setContact(new Contact("Hans Test","+49123456789","test@example.org")).addBankDetails(new BankDetails("DE12500105170648489890","COBADEFXXX")))
.setRecipient(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE")) .setRecipient(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE"))
@@ -88,7 +98,7 @@ public class XRTest extends TestCase {
// not using any VAT, this is also a test of zero-rated goods: // not using any VAT, this is also a test of zero-rated goods:
.setNumber(number).setPaymentTermDescription("#SKONTO#TAGE=14#PROZENT=2.25#\n" + .setNumber(number).setPaymentTermDescription("#SKONTO#TAGE=14#PROZENT=2.25#\n" +
"#SKONTO#TAGE=28#PROZENT=1.00#\n").addItem(new Item(new Product("Testprodukt", "", "C62", BigDecimal.ZERO), amount, new BigDecimal(1.0))) "#SKONTO#TAGE=28#PROZENT=1.00#\n").addItem(new Item(new Product("Testprodukt", "", "C62", BigDecimal.ZERO), amount, new BigDecimal(1.0)))
.embedFileInXML(fe1).embedFileInXML(fe2); .embedFileInXML(fe1);
ZUGFeRD2PullProvider zf2p = new ZUGFeRD2PullProvider(); ZUGFeRD2PullProvider zf2p = new ZUGFeRD2PullProvider();

View File

@@ -33,6 +33,11 @@ import org.junit.FixMethodOrder;
import org.junit.runners.MethodSorters; import org.junit.runners.MethodSorters;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.xmlunit.builder.Input;
import org.xmlunit.xpath.JAXPXPathEngine;
import org.xmlunit.xpath.XPathEngine;
import static org.xmlunit.assertj.XmlAssert.assertThat;
@FixMethodOrder(MethodSorters.NAME_ASCENDING) @FixMethodOrder(MethodSorters.NAME_ASCENDING)
@@ -372,13 +377,15 @@ public class ZF2PushTest extends TestCase {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
try { try {
SchemedID gtin=new SchemedID("0160","2001015001325");
SchemedID gln=new SchemedID("0088","4304171000002");
ze.setTransaction(new Invoice().setCurrency("CHF").addNote("document level 1/2").addNote("document level 2/2").setDueDate(new Date()).setIssueDate(new Date()).setDeliveryDate(new Date()) ze.setTransaction(new Invoice().setCurrency("CHF").addNote("document level 1/2").addNote("document level 2/2").setDueDate(new Date()).setIssueDate(new Date()).setDeliveryDate(new Date())
.setDetailedDeliveryPeriod(new SimpleDateFormat("yyyyMMdd").parse(occurrenceFrom), new SimpleDateFormat("yyyyMMdd").parse(occurrenceTo)) .setDetailedDeliveryPeriod(new SimpleDateFormat("yyyyMMdd").parse(occurrenceFrom), new SimpleDateFormat("yyyyMMdd").parse(occurrenceTo))
.setSender(new TradeParty(orgname, "teststr", "55232", "teststadt", "DE").addTaxID(taxID).setID("0009845")) .setSender(new TradeParty(orgname, "teststr", "55232", "teststadt", "DE").addTaxID(taxID).setID("0009845"))
.setDeliveryAddress(new TradeParty("just the other side of the street", "teststr.12a", "55232", "Entenhausen", "DE").addVATID("DE47110")) .setDeliveryAddress(new TradeParty("just the other side of the street", "teststr.12a", "55232", "Entenhausen", "DE").addVATID("DE47110"))
.setContractReferencedDocument(contractID) .setContractReferencedDocument(contractID)
.setRecipient(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE").setID("0008734").addVATID("DE4711").setContact(new Contact("Franz Müller", "01779999999", "franz@mueller.de", "teststr. 12", "55232", "Entenhausen", "DE").setFax("++49555123456")).setAdditionalAddress("Hinterhaus 3")) .setRecipient(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE").addGlobalID(gln).addVATID("DE4711").setContact(new Contact("Franz Müller", "01779999999", "franz@mueller.de", "teststr. 12", "55232", "Entenhausen", "DE").setFax("++49555123456")).setAdditionalAddress("Hinterhaus 3"))
.addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(16)), price, new BigDecimal(1.0)).addReferencedLineID("xxx").addNote("item level 1/1").addAllowance(new Allowance(new BigDecimal(0.02)).setReason("item discount").setTaxPercent(new BigDecimal(16))).setDetailedDeliveryPeriod(sdf.parse("2020-01-13"), sdf.parse("2020-01-15"))) .addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(16)).addGlobalID(gtin), price, new BigDecimal(1.0)).addReferencedLineID("xxx").addNote("item level 1/1").addAllowance(new Allowance(new BigDecimal(0.02)).setReason("item discount").setTaxPercent(new BigDecimal(16))).setDetailedDeliveryPeriod(sdf.parse("2020-01-13"), sdf.parse("2020-01-15")))
.addCharge(new Charge(new BigDecimal(0.5)).setReason("quick delivery charge").setTaxPercent(new BigDecimal(16))) .addCharge(new Charge(new BigDecimal(0.5)).setReason("quick delivery charge").setTaxPercent(new BigDecimal(16)))
.addAllowance(new Allowance(new BigDecimal(0.2)).setReason("discount").setTaxPercent(new BigDecimal(16))) .addAllowance(new Allowance(new BigDecimal(0.2)).setReason("discount").setTaxPercent(new BigDecimal(16)))
.setDeliveryDate(sdf.parse("2020-11-02")).setOwnVATID("DE0815").setNumber(number) .setDeliveryDate(sdf.parse("2020-11-02")).setOwnVATID("DE0815").setNumber(number)
@@ -399,6 +406,13 @@ public class ZF2PushTest extends TestCase {
assertFalse(zi.getUTF8().contains("<ram:IBANID>")); // maybe add a direct debit mandate to the class in the future then this would fail assertFalse(zi.getUTF8().contains("<ram:IBANID>")); // maybe add a direct debit mandate to the class in the future then this would fail
assertTrue(zi.getUTF8().contains("Hinterhaus")); assertTrue(zi.getUTF8().contains("Hinterhaus"));
assertThat(zi.getUTF8()).valueByXPath("//ram:BuyerTradeParty/ram:GlobalID[@schemeID=0088]/text()")
.isEqualTo("4304171000002");
assertThat(zi.getUTF8()).valueByXPath("/BuyerTradeParty//GlobalID[@schemeID=0160]")
.isEqualTo("2001015001325");
assertTrue(zi.getUTF8().contains("2001015001325"));
assertTrue(zi.getUTF8().contains("4304171000002"));
assertTrue(zi.getUTF8().contains("0088"));
assertTrue(zi.getUTF8().contains("0009845")); assertTrue(zi.getUTF8().contains("0009845"));
assertTrue(zi.getUTF8().contains("0008734")); assertTrue(zi.getUTF8().contains("0008734"));
assertTrue(zi.getUTF8().contains("ram:BuyerOrderReferencedDocument")); assertTrue(zi.getUTF8().contains("ram:BuyerOrderReferencedDocument"));

View File

@@ -0,0 +1,184 @@
<?xml version="1.0" encoding="UTF-8"?>
<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100">
<!-- generated by: mustangproject.org vnull-->
<rsm:ExchangedDocumentContext>
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:cen.eu:en16931:2017</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument>
<ram:ID>123</ram:ID>
<ram:TypeCode>380</ram:TypeCode>
<ram:IssueDateTime>
<udt:DateTimeString format="102">20220725</udt:DateTimeString>
</ram:IssueDateTime>
<ram:IncludedNote>
<ram:Content>document level 1/2</ram:Content>
</ram:IncludedNote>
<ram:IncludedNote>
<ram:Content>document level 2/2</ram:Content>
</ram:IncludedNote>
</rsm:ExchangedDocument>
<rsm:SupplyChainTradeTransaction>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>1</ram:LineID>
<ram:IncludedNote>
<ram:Content>item level 1/1</ram:Content>
</ram:IncludedNote>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>Testprodukt</ram:Name>
<ram:Description/>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:BuyerOrderReferencedDocument>
<ram:LineID>xxx</ram:LineID>
</ram:BuyerOrderReferencedDocument>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>1.0000</ram:ChargeAmount>
<ram:BasisQuantity unitCode="C62">1.0000</ram:BasisQuantity>
<ram:AppliedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>0.0200</ram:ActualAmount>
</ram:AppliedTradeAllowanceCharge>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>0.9800</ram:ChargeAmount>
<ram:BasisQuantity unitCode="C62">1.0000</ram:BasisQuantity>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">1.0000</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>16.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:BillingSpecifiedPeriod>
<ram:StartDateTime>
<udt:DateTimeString format="102">20200113</udt:DateTimeString>
</ram:StartDateTime>
<ram:EndDateTime>
<udt:DateTimeString format="102">20200115</udt:DateTimeString>
</ram:EndDateTime>
</ram:BillingSpecifiedPeriod>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>0.98</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:ApplicableHeaderTradeAgreement>
<ram:SellerTradeParty>
<ram:ID>0009845</ram:ID>
<ram:Name>Test company</ram:Name>
<ram:PostalTradeAddress>
<ram:PostcodeCode>55232</ram:PostcodeCode>
<ram:LineOne>teststr</ram:LineOne>
<ram:CityName>teststadt</ram:CityName>
<ram:CountryID>DE</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">DE0815</ram:ID>
</ram:SpecifiedTaxRegistration>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="FC">9990815</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
<ram:BuyerTradeParty>
<ram:GlobalID schemeID="0088">4304171000002</ram:GlobalID>
<ram:Name>Franz Müller</ram:Name>
<ram:PostalTradeAddress>
<ram:PostcodeCode>55232</ram:PostcodeCode>
<ram:LineOne>teststr.12</ram:LineOne>
<ram:LineTwo>Hinterhaus 3</ram:LineTwo>
<ram:CityName>Entenhausen</ram:CityName>
<ram:CountryID>DE</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">DE4711</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:BuyerTradeParty>
<ram:ContractReferencedDocument>
<ram:IssuerAssignedID>376zreurzu0983</ram:IssuerAssignedID>
</ram:ContractReferencedDocument>
</ram:ApplicableHeaderTradeAgreement>
<ram:ApplicableHeaderTradeDelivery>
<ram:ShipToTradeParty>
<ram:Name>just the other side of the street</ram:Name>
<ram:PostalTradeAddress>
<ram:PostcodeCode>55232</ram:PostcodeCode>
<ram:LineOne>teststr.12a</ram:LineOne>
<ram:CityName>Entenhausen</ram:CityName>
<ram:CountryID>DE</ram:CountryID>
</ram:PostalTradeAddress>
</ram:ShipToTradeParty>
<ram:ActualDeliverySupplyChainEvent>
<ram:OccurrenceDateTime>
<udt:DateTimeString format="102">20201102</udt:DateTimeString>
</ram:OccurrenceDateTime>
</ram:ActualDeliverySupplyChainEvent>
</ram:ApplicableHeaderTradeDelivery>
<ram:ApplicableHeaderTradeSettlement>
<ram:PaymentReference>123</ram:PaymentReference>
<ram:InvoiceCurrencyCode>CHF</ram:InvoiceCurrencyCode>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>0.20</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>1.28</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>16.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:BillingSpecifiedPeriod>
<ram:StartDateTime>
<udt:DateTimeString format="102">20201001</udt:DateTimeString>
</ram:StartDateTime>
<ram:EndDateTime>
<udt:DateTimeString format="102">20201005</udt:DateTimeString>
</ram:EndDateTime>
</ram:BillingSpecifiedPeriod>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>true</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>0.50</ram:ActualAmount>
<ram:Reason> quick delivery charge</ram:Reason>
<ram:CategoryTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>16.00</ram:RateApplicablePercent>
</ram:CategoryTradeTax>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>0.20</ram:ActualAmount>
<ram:Reason> discount</ram:Reason>
<ram:CategoryTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>16.00</ram:RateApplicablePercent>
</ram:CategoryTradeTax>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradePaymentTerms>
<ram:Description>Zahlbar ohne Abzug bis 25.07.2022</ram:Description>
</ram:SpecifiedTradePaymentTerms>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>0.98</ram:LineTotalAmount>
<ram:ChargeTotalAmount>0.50</ram:ChargeTotalAmount>
<ram:AllowanceTotalAmount>0.20</ram:AllowanceTotalAmount>
<ram:TaxBasisTotalAmount>1.28</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="CHF">0.20</ram:TaxTotalAmount>
<ram:GrandTotalAmount>1.48</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>0.00</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>1.48</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>