VF-1157

El valor de cupón solo puede ser S o N si está informado. El valor de cupón sólo puede ser S si el tipo de factura es R1 o R5.

In English Cupon may only be S when TipoFactura is R1 or R5.

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

[1157] El valor de cupón solo puede ser S o N si está informado. El valor de cupón sólo puede ser S si el tipo de factura es R1 o R5.

Context
/*:RegFactuSistemaFacturacion/*:RegistroFactura/*:RegistroAlta
Test
not(normalize-space(*:Cupon) = 'S') or $type = ('R1', 'R5')

Checked with VERI*FACTU invoice records