CRP20204

El valor del campo TotalTrasladosBaseIVA16 no es igual al redondeo de la suma del resultado de multiplicar cada uno de los importes de los atributos BaseP de los impuestos trasladados registrados en el elemento TrasladoP donde los atributos contengan en ImpuestoP el valor IVA, en TipoFactorP el valor Tasa y en TasaOCuotaP el valor 0.160000, por el valor registrado en el atributo TipoCambioP de cada nodo Pago (…, …).

In English TotalTrasladosBaseIVA16 must be the sum, rounded, of the payments' VAT bases at 16 % (BaseP) times their TipoCambioP.

error: the document is invalid

Why it fails

  • A payment in another currency added without its exchange rate (TipoCambioP).
  • The totals copied from the invoice instead of the part this receipt pays.

How to fix it

Compute the totals from the receipt's own TrasladoP elements: BaseP times TipoCambioP for each payment, added up and rounded to cents.

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
pago20:Pagos/pago20:Totales
Test
not(@TotalTrasladosBaseIVA16) or abs(mx:dec(@TotalTrasladosBaseIVA16) - mx:vat($pagos, 'Tasa', 0.16, true())) le 0.005

Checked with CFDI 4.0