Rules / IBR-CO-10
IBR-CO-10 error
Sum of lines must equal the line total
The document's sum of line net amounts (IBT-106) must equal the lines added up.
Usually a line was edited after the totals were calculated.
Fails
<cbc:LineExtensionAmount currencyID="AED">7000.00</cbc:LineExtensionAmount>
<!-- lines add up to 7500.00 -->
Fix
Recalculate the total from the lines. Never adjust a line to match the total.
Passes
<cbc:LineExtensionAmount currencyID="AED">7500.00</cbc:LineExtensionAmount>
Schematron
- Context
cac:LegalMonetaryTotal- Test
(xs:decimal(cbc:LineExtensionAmount) = (round(sum(//(cac:InvoiceLine|cac:CreditNoteLine)/xs:decimal(cbc:LineExtensionAmount)) * 10 * 10) div 100))
Official text: Sum of Invoice line net amount (ibt-106) = Σ Invoice line net amount (ibt-131).