CRP20244
El campo ImpSaldoInsoluto debe ser mayor o igual a cero y calcularse con la suma de los campos ImpSaldoAnt menos el ImpPagado (… - …, …).
In English The balance left (ImpSaldoInsoluto) must be ImpSaldoAnt minus ImpPagado, and not negative.
Why it fails
- A second instalment that starts from the invoice's total instead of the balance the first receipt left.
How to fix it
Take ImpSaldoAnt from the previous receipt's ImpSaldoInsoluto (the invoice's total for the first payment) and subtract what this payment covers.
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.
pago20:Pago/pago20:DoctoRelacionado
mx:dec(@ImpSaldoInsoluto) ge 0 and mx:dec(@ImpSaldoInsoluto) = mx:dec(@ImpSaldoAnt) - mx:dec(@ImpPagado)
Checked with CFDI 4.0