Peppol BIS Billing 3.0.21 · UBL

BR-CO-16: Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Paid amount…

Peppol BIS Billing 3.0.21 · UBL

fatalbusiness

Original rule text

[BR-CO-16]-Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Paid amount (BT-113) +Rounding amount (BT-114).

Stored validation assertion
(exists(cbc:PrepaidAmount) and not(exists(cbc:PayableRoundingAmount)) and (xs:decimal(cbc:PayableAmount) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or (not(exists(cbc:PrepaidAmount)) and not(exists(cbc:PayableRoundingAmount)) and xs:decimal(cbc:PayableAmount) = xs:decimal(cbc:TaxInclusiveAmount)) or (exists(cbc:PrepaidAmount) and exists(cbc:PayableRoundingAmount) and ((round((xs:decimal(cbc:PayableAmount) - xs:decimal(cbc:PayableRoundingAmount)) * 10 * 10) div 100) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or  (not(exists(cbc:PrepaidAmount)) and exists(cbc:PayableRoundingAmount) and ((round((xs:decimal(cbc:PayableAmount) - xs:decimal(cbc:PayableRoundingAmount)) * 10 * 10) div 100) = xs:decimal(cbc:TaxInclusiveAmount)))

BR-CO-16 is a fatal rule in the business layer of Peppol BIS Billing 3.0.21 · UBL. An invoice that breaks it is rejected. It refers to BT-115, BT-112, BT-113, BT-114.

What this rule requires

The rule requires that the amount due for payment (BT-115, cbc:PayableAmount in UBL / ram:DuePayableAmount in CII) equals the invoice total amount with VAT (cbc:TaxInclusiveAmount / ram:GrandTotalAmount) minus any paid amount (cbc:PrepaidAmount / ram:TotalPrepaidAmount) plus any rounding amount (cbc:PayableRoundingAmount / ram:RoundingAmount). At least one of four permitted combinations must be satisfied, depending on whether the paid amount and rounding amount are present. The document fails because the value in the amount due field does not match the arithmetic result of the other monetary totals.

How to fix

Check the values of cbc:PayableAmount (UBL) or ram:DuePayableAmount (CII), cbc:TaxInclusiveAmount/ram:GrandTotalAmount, cbc:PrepaidAmount/ram:TotalPrepaidAmount, and cbc:PayableRoundingAmount/ram:RoundingAmount. Recalculate the amount due as total with VAT minus paid amount plus rounding amount, according to which of the optional elements are present: if neither optional element exists, set the amount due equal to the total with VAT; if only prepaid exists, subtract it; if only rounding exists, add it; if both exist, the difference between amount due and rounding amount, rounded to two decimals, must equal total with VAT minus prepaid, also rounded to two decimals. Correct the inconsistent value, usually the amount due for payment.

Guidance on this rule. The original text above is authoritative.

Where to go next

No published Peppol BIS Billing UBL release comparison lists a change to BR-CO-16.

Validate an invoice against these rules · All release changes