CFDI40119
El campo Total no corresponde con la suma del subtotal, menos los descuentos aplicables, más las contribuciones recibidas (impuestos trasladados - federales o locales, derechos, productos, aprovechamientos, aportaciones de seguridad social, contribuciones de mejoras) menos los impuestos retenidos y/o locales (Total …, calculado …).
In English Total must be SubTotal minus Descuento plus the taxes transferred (federal and local) minus the taxes withheld.
Why it fails
- Withholdings (ISR, IVA retenido) on the lines that are not subtracted from Total, or not in the comprobante's tax summary.
- Local taxes added to Total without the ImpuestosLocales complement.
How to fix it
Compute Total from the comprobante's own SubTotal, Descuento, TotalImpuestosTrasladados and TotalImpuestosRetenidos, plus the local tax complement's totals when there is one.
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.