All rules · pint-om · error

IBR-137-OM

All amounts and quantities must be zero or positive, except where a negative value is explicitly permitted.

Reviewed

Why this rule exists

A negative amount usually means a reversal expressed in the wrong document. Credits belong in a credit note and reductions in an allowance, both of which carry positive numbers and the right semantics.

Why it usually happens

How to fix it

Issue a credit note with positive amounts, or express the reduction as an AllowanceCharge.

The official rule

All invoice amounts and quantities shall be zero or positive, except for rounding amount (IBT-114).

Verbatim from the published artefact. We execute the official Schematron unmodified, so this is exactly what an Access Point checks.

Schematron test

not(                             (                               descendant::cbc:TaxExclusiveAmount                             | descendant::cbc:TaxInclusiveAmount                             | descendant::cbc:AllowanceTotalAmount                             | descendant::cbc:ChargeTotalAmount                             | descendant::cbc:PrepaidAmount                             | descendant::cbc:PayableAmount                             | descendant::cbc:Amount                             | descendant::cbc:PriceAmount                             | descendant::cbc:BaseAmount                             | descendant::cbc:Quantity                             | descendant::cbc:BaseQuantity                             | descendant::cbc:InvoicedQuantity                             | descendant::cbc:CreditedQuantity                             | descendant::cbc:TaxAmount                             | descendant::cbc:LineExtensionAmount                             )                             [                                 local-name() != 'PayableRoundingAmount'                                 and normalize-space(.) != ''                                 and . castable as xs:decimal                                 and xs:decimal(.) < 0                             ]                         )

Applied to nodes matching ubl:Invoice | cn:CreditNote

Rule-pack versions

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

Related rules

ibr-027 · ibr-127-ae

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