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.

No plain-English explanation yet. We write these in order of how often they actually trip people up, and this one has not come up much. Tell us what tripped you up and it moves to the front of the queue.

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

This rule changed between versions. If your invoices passed under an older pack and now fail, this is why.
Rule-packLayerSeverityApplies to
pint-om-1.0.1pint-omerrorbilling/creditnote, billing/invoice, self-billing/creditnote, self-billing/invoice
pint-om-1.0.0pint-omerrorbilling/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