# F-REM086

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

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

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

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