# F-INV134

Source: https://xmlvalid.com/rules/F-INV134

> The sum of PaymentTerms/Amount elements or the value of the first PaymentTerms/Amount must equal PayableAmount

- Level: error
- Rule sets: OIOUBL 2.1 Invoice rules (Denmark) 1.17.2
- Context: `doc:Invoice/cac:LegalMonetaryTotal`
- Test: `(count(../cac:PaymentTerms) > 0) and not ((format-number(cbc:PayableAmount,'#0.00') = format-number(sum(../cac:PaymentTerms/cbc:Amount),'#0.00')) or (format-number(cbc:PayableAmount,'#0.00') = format-number(../cac:PaymentTerms[1]/cbc:Amount,'#0.00')))`

Validate a document against these rules: https://xmlvalid.com/validate
