All rules · pint-om · error
IBR-158-OM
Total amount including VAT (BTOM-017) must be the sum of Invoice line net amount (IBT-131) and Line Item VAT amount (BTOM-016) unless if Invoice transaction type (BTOM-001) is Profit margin invoice (00000000010000000000) in which case Total amount including VAT (BTOM-017) must be the total sale value of the item.
The official rule
Total amount including VAT (BTOM-017) must be the sum of Invoice line net amount (IBT-131) and Line Item VAT amount (BTOM-016) unless if Invoice transaction type (BTOM-001) is Profit margin invoice (00000000010000000000) in which case Total amount including VAT (BTOM-017) must be the total sale value of the item.
Verbatim from the published artefact. We execute the official Schematron unmodified, so this is exactly what an Access Point checks.
Schematron test
$isProfitMargin or ($isSimplified and not($lineTaxAmount)) or ( cac:ItemPriceExtension/cbc:Amount castable as xs:decimal and cbc:LineExtensionAmount castable as xs:decimal and u:slack( xs:decimal(cac:ItemPriceExtension/cbc:Amount), xs:decimal(cbc:LineExtensionAmount) + (if ($lineTaxAmount castable as xs:decimal) then xs:decimal($lineTaxAmount) else xs:decimal(0)), $amountTolerance ) )
Applied to nodes matching cac:InvoiceLine | cac:CreditNoteLine
Rule-pack versions
| Rule-pack | Layer | Severity | Applies to |
|---|---|---|---|
| pint-om-1.0.1 | pint-om | error | billing/creditnote, billing/invoice, self-billing/creditnote, self-billing/invoice |
| pint-om-1.0.0 | pint-om | error | billing/creditnote, billing/invoice, self-billing/creditnote, self-billing/invoice |
Check your own invoice
Paste your XML and see every rule that fires, not just this one. Free, no sign-up, and we never store the document.
Open the validator