# CFDI40111

Source: https://xmlvalid.com/rules/CFDI40111

> El TipoDeComprobante no es I,E o N, y un concepto incluye el campo descuento (Descuento …, conceptos …).

- Level: error
- Rule sets: SAT validations of CFDI 4.0 and Pagos 2.0 Matrices of 25 March 2026 and Pagos 2.0 rev. B
- Context: `/cfdi:Comprobante`
- Test: `if ($type = ('I', 'E', 'N') and $concepts/@Descuento) then (@Descuento and abs(mx:dec(@Descuento) - $discounts) le $half) else (not(@Descuento) or mx:dec(@Descuento) = 0)`

In English: When a line of an I, E or N CFDI has a Descuento, the comprobante must have Descuento, the sum of the lines' discounts rounded to the currency's decimals; otherwise Descuento is left out (we accept 0).

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