# F-REM085

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

> PayableAmount is calculated incorrectly

- Level: error
- Rule sets: OIOUBL 2.1 Reminder rules (Denmark) 1.17.2
- Context: `doc:Reminder/cac:LegalMonetaryTotal`
- Test: `format-number(sum(cbc:PayableAmount) *-1,'##.00') = format-number((sum(cbc:LineExtensionAmount) + sum(../cac:TaxTotal/cac:TaxSubtotal/cbc:TaxAmount) + sum(cbc:ChargeTotalAmount) - sum(cbc:AllowanceTotalAmount) - sum(cbc:PrepaidAmount) + sum(cbc:PayableRoundingAmount)) *-1,'##.00')`

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