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.

About

ID
IBR-158-OM
Flag
fatal
Context
cac:InvoiceLine | cac:CreditNoteLine
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 ) )