i want to set up an XRechnung with the Mustangproject.
From the Validator i get the message, that Item net price MUST equal (Gross price – Allowance amount) when gross price is provided. (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction[1]/ram:IncludedSupplyChainTradeLineItem[1]/ram:SpecifiedLineTradeAgreement[1]/ram:GrossPriceProductTradePrice[1]) and i see why:
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>100.0000</ram:ChargeAmount>
<ram:BasisQuantity unitCode="EA">1.0000</ram:BasisQuantity>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>100.0000</ram:ChargeAmount>
<ram:BasisQuantity unitCode="EA">1.0000</ram:BasisQuantity>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
The Document level Allowance as well as the tax is set correctly
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>200.00</ram:LineTotalAmount>
<ram:ChargeTotalAmount>0.00</ram:ChargeTotalAmount>
<ram:AllowanceTotalAmount>10.00</ram:AllowanceTotalAmount>
<ram:TaxBasisTotalAmount>190.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="EUR">36.10</ram:TaxTotalAmount>
<ram:GrandTotalAmount>226.10</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>0.00</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>226.10</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
For now, i just add the Item like this
invoice.addItem(new Item(new BigDecimal(100.00), new BigDecimal(2), new Product("test", "name", "EA", new BigDecimal(19)))) .addAllowance(new Allowance(new BigDecimal(10)).setTaxPercent(new BigDecimal(19)));
Is there an option to set the gross price?
do i have to set up the Item differently?
i used 2 validators
https://www.epoconsulting.com/erechnung-sap/xrechnung-validator
https://erechnungsvalidator.service-bw.de
Jonas Stengel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.