Changes in 2014 - Payroll supplement


The new SAT requirements to issue payroll receipts in a CFDi version 3.2 document become operational on 1 January 2014. See the SAT page Requisitos de los recibos de nómina vigentes a partir de 2014.

Last-minute changes by SAT | New version of FirmaSAT | SAT site not working | Our test example | More problems with the SAT validator site | SAT regulations for cadena original | But how did you validate your program? | Contact us

Last-minute changes by S.A.T.

Latest news 2013-12-29: It seems that S.A.T. changed their specification for nomina11.xsd on the 18 December 2013, after we had released version 5.2.0 of FirmaSAT. No warning on their site that a major revision had been made; they just sneakily replaced the existing documents. Thanks to Gustavo Acosta for bringing this to our attention.
To be fair, the changes are sensible: wrapping the optional-but-possibly-repeated Incapacidad and HorasExtra elements inside a single optional Incapacidades or HorasExtras element, and making several mandatory attributes optional. We just wish they would advertise this fact more widely, and not leave it so late. Anyway, these changes have been incorporated in our FirmaSAT version 5.2.1.

New version of FirmaSAT available

New version 5.2.1: The latest FirmaSAT version 5.2.1 (released 2013-12-29) will now work with the latest "nomina" requirements as published by SAT on 18 December 2013. You can download a Trial Edition here. Licensed users of FirmaSAT version 5.2 can upgrade for free at the Licensed users page.

SAT Validator Site not working with "nomina:Nomina" elements

As of 2013-12-29, the SAT Validator site at Validador de forma y sintaxis de Comprobantes Fiscales Digitales v3 does not work properly for an XML document containing a "nomina:Nomina" element.

It parses the XML structure OK but fails to produce the correct cadena original (piped string), at least as far as our reading of the specifications goes. If the cadena original is wrong then its SHA-1 digest will be wrong and the signature will show as invalid.

Attempt to validate

The cadena is obviously wrong because of the group of five "pipe" symbols at the end. There should be exactly two at the end, no more. There are also lots of fields missed out.

Based on their previous behaviour, we'd expect the SAT technical people to get this working about 30 December, one or two days before the requirement becomes legal. Or maybe they will not bother, and leave it to the PACs to make their own interpretations.

Our test exampleUpdated

Here is our test example: Muestra_nomina.xml (updated 2013-12-29). We think the cadena original of this should be:

||3.2|2014-01-15T13:01:59|egreso|FormaDePago|PAGONOMINA|4765.46|PESOS|4765.46|TRANSFERENCIA|MEXICO DF|43200101|AAA010101AAA|ACCEM SERVICIOS EMPRESARIALES SC|AV. HIDALGO|14|GUERRERO|MEXICO|MEXICO, D.F.|México|06300|Regimen General de Ley|JUAN680116AAA|Juanito Pérez Niño|Calle Verde|1234|456|Col. Arboles|Ciudad de Tegucigalpa|Municipio de Torres|Nuevo Leon|México|38294|1|SERVICIO|00000022|QUINCENA 22|4457.96|4457.96|627.07|IVA|0.00|0.00|0.00|1.1|N4515588991|000012|JUAN680116MAZBCÑ90|1|13099903896|2014-01-15|2014-01-01|2014-01-15|12|ADMINISTRACION|230230302302302309|123|2013-11-30|8|COORDONADOR C3|PLANTA|COMPLETA|QUINCENAL|416.67|3|551.19|7343.75|937.50|001|00001|SUELDOS|6250.00|0.00|004|00003|TIEMPO EXTRA DOBLES|312.50|312.50|004|00004|TIEMPO EXTRA TRIPLES|781.25|0.00|009|00043|FONDO DE AHORRO|0.00|625.00|1249.99|2265.80|001|00503|FALTA INJUSTIFICADA|416.66|0.00|036|00507|ISR RETENIDO|0.00|747.07|009|00517|FONDO DE AHORRO EMPRESA|0.00|625.00|009|00518|FONDO DE AHORRO EMPLEADO|0.00|625.00|040|00533|IMSS ENF Y MATERNIDAD|0.00|63.34|040|00534|IMSS INVALIDES Y VIDA|0.00|44.78|040|00535|IMSS CESANTIA Y VEJEZ|0.00|80.61|013|00542|FONACOT|0.00|200.00|036|00570|SUBSIDIO AL ISR|0.00|-120.00|001|00574|INCAPACIDAD POR ENFERMEDAD GENERAL|833.33|0.00|2|3|833.33|2|Dobles|6|625.00|1|Triples|5|781.25||

This has a SHA-1 digest in hexadecimal of d68bd5a5956bc811e77f5e11e6ed5e3e48f55729, which we believe to be correct.

The SAT validator site gives this much shorter result instead:

||3.2|2014-01-15T13:01:59|egreso|FormaDePago|PAGONOMINA|4765.46|PESOS|4765.46|TRANSFERENCIA|MEXICO DF|43200101|AAA010101AAA|ACCEM SERVICIOS EMPRESARIALES SC|AV. HIDALGO|14|GUERRERO|MEXICO|MEXICO, D.F.|México|06300|Regimen General de Ley|JUAN680116AAA|Juanito Pérez Niño|Calle Verde|1234|456|Col. Arboles|Ciudad de Tegucigalpa|Municipio de Torres|Nuevo Leon|México|38294|1|SERVICIO|00000022|QUINCENA 22|4457.96|4457.96|627.07|IVA|0.00|0.00|0.00|1.1|N4515588991|000012|JUAN680116MAZBCÑ90|1|13099903896|230230302302302309|123|||||

scroll to the right to see all the missed fields (after 13099903896) and the obvious error at the end of a group of pipe symbols "|||||".

It has started to add the fields for the "nomina:Nomina" element, starting with Version="1.1" RegistroPatronal="N4515588991" NumEmpleado="000012"... but does not finish it properly.

Original files

Here is a zip file containing our test file and the results as of 2013-12-29: Muestra_nomina-20131229.zip.

  1. Muestra_nomina.xml: our test XML file
  2. Muestra_nomina_cadena.txt: what we think the cadena original should be
  3. Muestra_nomina_cadena_validator.txt: what the SAT validator site gives
  4. Mustra_nomina_tfd.xml: the signed test file with the TFD countersigned by the holder of pac.cer.
  5. pac.cer

But how did you validate your program?

If the SAT validator site is not working for the nomina supplement, how did you validate your program?

We didn't. We are relying on our interpretation of the regulations as published and our experience in "getting it right" for SAT XML documents since 2006.

If errors are found, we will issue a free update.

If you have found an error, please tell us and we'll look into it. But please, do not just send us a file and say "FirmaSAT is not working". Please send us either
  1. an example of a correct CFDi document with a nomina element that FirmaSAT says is wrong, or
  2. an example of an incorrect CFDi document that FirmaSAT says is correct.
In both cases, please tell us the exact element and attributes that you think are causing the problem.

To send us an XML file, please send us a message first and we'll tell you how to send the file.

More problems with the SAT validator site

When you go to the SAT validator site and Java starts up, you get this "Unknown publisher" error.

Running applications by UNKNOWN publishers will be blocked in a future release because it is potentially unsafe and a security risk.

Java error

If you know someone in the technical department at SAT, please tell them.

SAT regulations to construct the cadena original "piped string"

Just to show why you should not get a group of five pipe "|" symbols together, here are SAT's own regulations.

Regulations to construct the "piped string"Rough translation to English

Cadena Original

Se entiende como cadena original, a la secuencia de datos formada con la información contenida dentro del CFDI, establecida el Anexo 20, rubro I.A "Estándar de comprobante fiscal digital a través de internet". Siguiendo para ello las reglas y la secuencia aquí especificadas:

Reglas Generales:

1. Ninguno de los atributos que conforman al comprobante fiscal digital deberá contener el carácter | ("pipe") debido a que este será utilizado como carácter de control en la formación de la cadena original.

2. La cadena original resultante del complemento será integrada a la cadena original del comprobante de acuerdo con lo especificado en el anexo 20 de la Resolución Miscelánea Fiscal vigente.

3. Se expresará únicamente la información del dato sin expresar el atributo al que hace referencia. Esto es, si el atributo tipoOperación tiene el valor "monedero" solo se expresará |monedero| y nunca |tipoOperacion monedero|.

4. Cada dato individual se encontrará separado de su dato anterior, en caso de existir, mediante un carácter | ("pipe" sencillo).

5. Los espacios en blanco que se presenten dentro de la cadena original serán tratados de la siguiente manera:

a. Se deberán remplazar todos los tabuladores, retornos de carro y saltos de línea por espacios en blanco.

b. Acto seguido se elimina cualquier carácter en blanco al principio y al final de cada separador | ("pipe" sencillo).

c. Finalmente, toda secuencia de caracteres en blanco intermedias se sustituyen por un único carácter en blanco.

6. Los datos opcionales, cuando no existan, no aparecerán expresados en la cadena original y no tendrán delimitador alguno.

7. Toda la cadena de original se expresará en el formato de codificación UTF-8.

Original string ("piped" string)

It is understood as original string, the data sequence formed with the information contained in the CFDI established Annex 20, item IA "Standard digital tax receipt via internet". Following the relevant rules and sequence specified here:

General Rules:

1. None of the attributes that make up the digital tax receipt must contain the character | ("pipe") because this will be used as a control character in the formation of the original string.

2. The resulting complement original string will be integrated into the original string of receipt as specified in Annex 20 of the Omnibus Tax effect.

3. It is given only the information of data without expressing the attribute referenced. That is, if the attribute has the value TipoOperacion "purse" is expressed only |purse| and never |TipoOperacion purse|.

4. Each individual data will be separated from the previous data, if available, using a character | ("pipe" single).

5. Blanks appearing within the original string will be treated as follows:

a. All tabs, carriage returns and line breaks shall be replaced by spaces.

b. Any blank character at the beginning and end of each spacer | (single "pipe") shall be removed.

c. Finally, any intermediate sequence of white-space characters are replaced by a single blank character.

6. Optional data that does not exist shall not be expressed in the original string and shall not have any delimiters.

7. All the original chain is expressed in UTF-8.

This page last updated 29 December 2013

Contact us

To contact us, please send us a message.