When I create an invoice, these prices have 4 decimal digits: /rsm:CrossIndustryInvoice[1]/rsm:SupplyChainTradeTransaction[1]/ram:IncludedSupplyChainTradeLineItem[1]/ram:SpecifiedLineTradeAgreement[1]/ram:GrossPriceProductTradePrice[1]/ram:ChargeAmount
The reason for this is that to output these prices the method
org.mustangproject.ZUGFeRD.priceFormat(BigDecimal) is used to output these prices. This method uses XMLTools.nDigitFormat(value, 4); This behavior is hard coded. I cannot change to 2 decimal digits here.
When I create an invoice, these prices have 4 decimal digits:
/rsm:CrossIndustryInvoice[1]/rsm:SupplyChainTradeTransaction[1]/ram:IncludedSupplyChainTradeLineItem[1]/ram:SpecifiedLineTradeAgreement[1]/ram:GrossPriceProductTradePrice[1]/ram:ChargeAmount
The reason for this is that to output these prices the method
org.mustangproject.ZUGFeRD.priceFormat(BigDecimal)
is used to output these prices. This method usesXMLTools.nDigitFormat(value, 4);
This behavior is hard coded. I cannot change to 2 decimal digits here.If I validate the invoice with this tool: https://ecosio.com/de/peppol-und-xml-dokumente-online-validieren/ then errors are output.
Shouldn't all prices always have only 2 decimal digits?