# FACTURAE-3.1.6.1.20

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

> GrossAmount (…) is not TotalCost - DiscountAmount + ChargeAmount (…).

- 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/*:Items/*:InvoiceLine`
- Test: `$euro or abs(es:dec(*:GrossAmount) - $gross) le 0.01`

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