Closed jdiepenmaat closed 5 years ago
@tjeb here's the issue with amount calculations / validations that I was talking about last week ^
I have a sneaking suspicion that this scenario is exactly why line-level calculations were removed from the validation... but hopefully they were just removed because rounding in xslt1 was error-prone and they never got re-added since the move to xslt2's xs:decimal.
The latest validation files for PEPPOL BIS v3 do indeed check this again, but CEN/PC434 does not (these rules, are based on that, with the addition of the NL-specific rules). But this may actually be worth porting from peppol, if CEN has a reason not to include it. Especially since some receivers already do check and reject such invoices.
We've seen some issues with the calculations made in invoice lines, by softwarevendors that generate UBL invoices.
Here's an interesting fragment, that is OK according to the current schematron validations, but is NOT OK according to the rules in the UBL standard.
Well, many vendors just use
<cbc:LineExtensionAmount currencyID="EUR">163.41</cbc:LineExtensionAmount>
and process163,41
in the bookkeeping software.We don't, because we want to give the end user the ability to decide if certain amount belongs may not belong in their administration (it's quite good possible that you want to split up a desired amount for private usage).
That's why we display the following in the user interface:
And, as you can see, there is something wrong here because
157,94 x 1,03
isn't equal to163,41
. In this case the vendor should have used amount with 4 decimals instead of two (http://docs.peppol.eu/poacc/billing/3.0/bis/#_unit_price_amount).Also stated in http://docs.peppol.eu/poacc/billing/3.0/bis/#lineamount-calc.
I would love to see more stricter schematron validations for this.