# HAP1650-6d

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

> TotalGrossAmountBeforeTaxes is positive, so TotalTaxesWithheld may not be negative (…).

- 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($before gt 0) or not($totals/*:TotalTaxesWithheld) or $withheld ge 0`

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