# FACTURAE-1.5.4

Source: https://xmlvalid.com/rules/FACTURAE-1.5.4

> The batch's TotalOutstandingAmount (…) is not the sum of the invoices' TotalOutstandingAmount (…).

- Level: error
- Rule sets: Facturae validation rules of the Spanish public sector Orden HAP/1650/2015, Facturae 3.2.x description of 6 June 2017
- Context: `/*:Facturae`
- Test: `abs(es:dec($batch/*:TotalOutstandingAmount/*:TotalAmount) - sum(for $i in $invoices return es:dec($i/*:InvoiceTotals/*:TotalOutstandingAmount))) le 0.01`

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