BR-CO-25-SG
In case the Amount due for payment (IBT-115) is positive, either the Payment due date (IBT-009) or the Payment terms (IBT-020) shall be present.
error: the document is invalid
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 PINT SG Invoice, PINT SG Credit Note