# FACTURAE-3.1.5.17

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

> TotalExecutableAmount (…) must be TotalOutstandingAmount - amounts withheld - payment in kind + TotalReimbursableExpenses + TotalFinancialExpenses (…).

- 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/*:Invoices/*:Invoice`
- Test: `abs(es:dec($totals/*:TotalExecutableAmount) - ($outstanding - sum(for $w in $totals/*:AmountsWithheld return es:dec($w/*:WithholdingAmount)) - sum(for $k in $totals/*:PaymentInKind return es:dec($k/*:PaymentInKindAmount)) + es:dec($totals/*:TotalReimbursableExpenses) + es:dec($totals/*:TotalFinancialExpenses))) le 0.01`

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