-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate line total #350
Comments
The proposed calculation is incomplete as it does not include e.g. the PriceBaseUnit. A harmonised standard on invoice line calculation is needed that includes, for instance, the requirements of the energy sector as well. The complete invoice syntaxes (CII as well as UBL) provide for this reason additional calculation elements that are (currently) not supported by the EN16931. First the EN16931 should be amended to support the necessary information – then a harmonised calculation scheme should be defined and then implemented. |
What are these additional calculation elements? If they are relevant to me it would sound as if they may be business requirements? |
For the time being, there is no calculation rule on line level in EN16931. It has been withdrawn because of rounding issues for too much companies. The initial rule was BT-131 = Net Unit Price (BT-146) / BT-149 (base quantity for Unit Price) * Invoices Quantity (BT-129) + sum of Line Charges (sum of BT-141) - Sum of line Allowances (sum of BT-136) And Net Unit Price = Gros Unit Price (BT-148) - Discount on Unit Price (BT-147) |
In addition, in the BRS document Gross price means Unit Price including VAT. In EDIFACT, if I remember well, It is said somewhere that the calculation is based on Gross Unit Price (which means that all VAT calculation is different, with a mathematical rounding issue of 1 cent maximum each time a VAT is calculated). EN16931 was designed only for B2B / B2G invoices where Unit Prices are not including VAT, and VAT is calculated on document level only. |
Thanks for the explanation |
A validation rule for BT-131 will be added in the Revised EN16931-1. Changing the current version of the EN16931-1 is not possible. |
https://unece.org/fileadmin/DAM/uncefact/BRS/BRS_CII_v2.0.6.pdf INV-176 says the line item amount should be quantity * net amount (+ charges - allowances).
I've seen invoices in the wild which were miscalculated.
This is an anonymized where a line for 86.12 is just claimed to be worth 10€ straight and which does not, but should raise an error:
factur-x.txt
The text was updated successfully, but these errors were encountered: