Spurious warning of gross price
jstaerk opened this issue · comments
Hello,
is there a particular reason why your validator 1.5 with your configuration 3.0.1_2023-11-15 warns for this document with
val-sch.2.1 PEPPOL-EN16931-R046 warning Item net price MUST equal (Gross price - Allowance amount) when gross price is provided.
Pfad: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction[1]/ram:IncludedSupplyChainTradeLineItem[1]/ram:SpecifiedLineTradeAgreement[1]/ram:GrossPriceProductTradePrice[1]
To me, the gross price of 1.0000 seems to match the net price of 1.0000, even if I deduct the (unspecified) allowance amount, i.e. 0?
thanks and kind regards
Jochen
I've got the same problem
Got the same problem.
The rule says "Item net price MUST equal (Gross price - Allowance amount) when gross price is provided."
The issuse happens when "GrossPriceProductTradePrice" and "NetPriceProductTradePrice" exist and are equal. The test will then look for "AppliedTradeAllowanceCharge" to substract the allowance amount. But since it is "None" or "null" the calculation will return a wrong result and the test fails.
Seeing the same issue. Looks like there're null checks missing on any of the ChargeAmount and ActualAmount parts of the test.
Thank you for the contribution. We'll check this.