# HAP1650-6b

Source: https://xmlvalid.com/rules/HAP1650-6b

> In an invoice in euros, TotalGrossAmount (…) must be the sum of the lines' GrossAmount (…), and every amount must be rounded to cents….

- 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: `not($euro) or ($gross = $lineGross and (every $a in $amounts satisfies es:cents($a)))`

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