VF-1230

Si el valor de GeneradoPor es igual a D y el CodigoPais tiene valor ES (España), el valor del campo IDType del bloque Generador debe ser Pasaporte (03) o No Censado (07).

In English When the recipient generated the cancellation (GeneradoPor D) and CodigoPais is ES, Generador's IDType must be passport (03) or not registered (07).

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.

Message

[1230] Si el valor de GeneradoPor es igual a D y el CodigoPais tiene valor ES (España), el valor del campo IDType del bloque Generador debe ser Pasaporte (03) o No Censado (07).

Context
/*:RegFactuSistemaFacturacion/*:RegistroFactura/*:RegistroAnulacion
Test
not(normalize-space(*:GeneradoPor) = 'D' and normalize-space(*:Generador/*:IDOtro/*:CodigoPais) = 'ES') or normalize-space(*:Generador/*:IDOtro/*:IDType) = ('03', '07')

Checked with VERI*FACTU invoice records