CRP20246
El nodo hijo ImpuestosDR del nodo DoctoRelacionado debe existir.
In English A related document with ObjetoImpDR 02 must have ImpuestosDR.
error: the document is invalid
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:Pago/pago20:DoctoRelacionado
Test
not(@ObjetoImpDR = '02') or $imp
Checked with CFDI 4.0