# F-INV130

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

> The sum of AllowanceCharge/Amount elements (with ChargeIndicator='true') must equal cbc:ChargeTotalAmount

- Level: error
- Rule sets: OIOUBL 2.1 Invoice rules (Denmark) 1.17.2
- Context: `doc:Invoice/cac:LegalMonetaryTotal`
- Test: `cbc:ChargeTotalAmount and not(format-number(cbc:ChargeTotalAmount,'##.00') = format-number(sum(../cac:AllowanceCharge[cbc:ChargeIndicator='true']/cbc:Amount),'##.00'))`

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