VF-1150
Cuando TipoFactura sea F2 y no este informado NumRegistroAcuerdoFacturacion o FacturaSinIdentifDestinatarioArt61d no sea S el sumatorio de BaseImponibleOimporteNoSujeto y CuotaRepercutida de todas las líneas de detalle no podrá ser superior a 3.000.
In English A simplified invoice (F2) may not exceed 3,000 euros of base plus tax (with 10 euros of margin), unless it has a billing agreement number or FacturaSinIdentifDestinatarioArt61d S.
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.
[1150] Cuando TipoFactura sea F2 y no este informado NumRegistroAcuerdoFacturacion o FacturaSinIdentifDestinatarioArt61d no sea S el sumatorio de BaseImponibleOimporteNoSujeto y CuotaRepercutida de todas las líneas de detalle no podrá ser superior a 3.000.
/*:RegFactuSistemaFacturacion/*:RegistroFactura/*:RegistroAlta
not($type = 'F2') or normalize-space(*:NumRegistroAcuerdoFacturacion) != '' or normalize-space(*:FacturaSinIdentifDestinatarioArt61d) = 'S' or sum(for $l in $lines return es:dec($l/*:BaseImponibleOimporteNoSujeto) + es:dec($l/*:CuotaRepercutida)) le 3010
Checked with VERI*FACTU invoice records