BR-GA-3
Sum of Amount due for payment (BT-115) = ∑ Payment Amount (NL-GA-03)
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
Test
cac:LegalMonetaryTotal/xs:decimal(cbc:PayableAmount) = sum(cac:PaymentTerms/xs:decimal(cbc:Amount))
Checked with Netherlands SI-UBL 2.0 G-account Invoice