CRP20276

El valor del campo Monto no se encuentra entre el límite inferior y superior permitido (…, … a …).

In English When the related documents are in another currency, the sum of their ImpPagado converted to the payment's currency (divided by EquivalenciaDR) must not be more than Monto, unless Monto lies between the sums of the lower and upper limits computed for each document.

error: the document is invalid

Why it fails

  • EquivalenciaDR given the wrong way round: pesos per dollar where dollars per peso are meant, or the reverse.

How to fix it

Give EquivalenciaDR as the units of the document's currency one unit of the payment's currency buys (for an invoice in USD paid in MXN at 17 pesos, 1/17 = 0.0588235294), up to ten decimals.

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:Pago
Test
$same or mx:trunc($paid, $d) le mx:dec(@Monto) or (mx:dec(@Monto) ge $lower and mx:dec(@Monto) le $upper)

Checked with CFDI 4.0