BR-CO-25

In case the Amount due for payment (BT-115) is positive, either the Payment due date (BT-9) or the Payment terms (BT-20) shall be present.

error: the document is invalid

Why it fails

  • An invoice with an amount to pay has neither cbc:DueDate nor cac:PaymentTerms/cbc:Note (in CII, ram:DueDateDateTime or ram:Description in ram:SpecifiedTradePaymentTerms).

How to fix it

Add the payment due date (BT-9) or a payment terms text (BT-20). A credit note or an invoice that is already paid (amount due of zero) needs neither.

What the rule checks

As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.

Context
/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableAmount
Test
((. > 0) and (exists(//cbc:DueDate) or exists(//cac:PaymentTerms/cbc:Note))) or (. <= 0)

Checked with France EXTENDED-CTC-FR (UBL)

Context
/rsm:CrossIndustryInvoice
Test
(xs:decimal(//ram:DuePayableAmount) > 0 and ((//ram:SpecifiedTradePaymentTerms/ram:DueDateDateTime) or (//ram:SpecifiedTradePaymentTerms/ram:Description))) or not(xs:decimal(//ram:DuePayableAmount)>0)

Checked with France EXTENDED-CTC-FR (CII)

Context
/rsm:CrossIndustryInvoice
Test
(number(//ram:DuePayableAmount) > 0 and ((//ram:SpecifiedTradePaymentTerms/ram:DueDateDateTime) or (//ram:SpecifiedTradePaymentTerms/ram:Description))) or not(number(//ram:DuePayableAmount) > 0)

Checked with France Factur-X EXTENDED, Factur-X / ZUGFeRD EXTENDED