CFDI40136
El valor registrado en el campo Año, no es igual al año en curso o no contiene un valor de hasta 5 ejercicios anteriores (…, Fecha …).
In English The year (Año) of a global invoice must be the current year or one of the five before it. Here it is compared with the year of the CFDI's Fecha.
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.
/cfdi:Comprobante/cfdi:InformacionGlobal
empty($year) or not(@Año castable as xs:integer) or (xs:integer(@Año) le $year and xs:integer(@Año) ge $year - 5)
Checked with CFDI 4.0