CFDI40158

La clave del campo RegimenFiscalR debe corresponder con el tipo de persona (física o moral) (…, RFC …).

In English The receiver's RegimenFiscalReceptor must be a regime for its kind of person: 12 characters of RFC is a company (601, 603, 610, 620, 622, 623, 624, 626), 13 a person (605 to 616, 621, 625, 626).

error: the document is invalid

Why it fails

  • The regime of the issuer copied to the receiver.
  • A company written with regime 612 or 616, which are for people.

How to fix it

Take the regime from the receiver's Constancia de Situación Fiscal, where SAT lists it with the RFC, name and postal code.

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.

Context
/cfdi:Comprobante/cfdi:Receptor
Test
mx:regime(@RegimenFiscalReceptor, $rfc)

Checked with CFDI 4.0