PintLint

Rules / IBR-147-AE

IBR-147-AE error

Line net amount = quantity × price

Each line's net amount (IBT-131) must equal quantity × (net price ÷ base quantity) − line allowances + line charges.

Unit prices with more than 2 decimals and per-line discounts are the usual causes.

Fails

<cbc:InvoicedQuantity unitCode="HUR">10</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="AED">3600.00</cbc:LineExtensionAmount>
<cac:Price><cbc:PriceAmount currencyID="AED">350.00</cbc:PriceAmount></cac:Price>

Fix

Recalculate the line: 10 × 350.00 = 3500.00. Put discounts in a line allowance, not in the price.

Passes

<cbc:LineExtensionAmount currencyID="AED">3500.00</cbc:LineExtensionAmount>
Schematron
Context
cac:InvoiceLine | cac:CreditNoteLine
Test
round(cbc:LineExtensionAmount * 100) div 100 = round((((cbc:InvoicedQuantity | cbc:CreditedQuantity) * (cac:Price/cbc:PriceAmount div cac:Price/cbc:BaseQuantity)) + sum(cac:AllowanceCharge[cbc:ChargeIndicator="true"]/cbc:Amount) - sum(cac:AllowanceCharge[cbc:ChargeIndicator="false"]/cbc:Amount)) * 100) div 100

Official text: Invoice line net amount (IBT-131) MUST equal (Invoiced quantity (IBT-129) * (Item net price (IBT-146)/item price base quantity (IBT-149)) + Sum of invoice line charge amount (IBT-141) - sum of invoice line allowance amount (IBT-136).

Official · PINT AE (UAE) rules. Severity: error. Runs on UBL XML.

Check an invoice