XV-GR-12

The rule sets below word this rule differently; each wording is shown with its rule set.

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

documentIdNo and countryDocumentId (an identity document, such as a passport) are accepted only on a tax free invoice (specialInvoiceCategory 4).

Context
inv:issuer | inv:counterpart
Test
(empty(inv:documentIdNo) and empty(inv:countryDocumentId)) or ancestor::inv:invoice/inv:invoiceHeader/inv:specialInvoiceCategory = '4'

Checked with myDATA 2.0.2

Message

countryDocumentId is the country that issued documentIdNo and is given with it.

Context
inv:issuer | inv:counterpart
Test
empty(inv:countryDocumentId) or exists(inv:documentIdNo)

Checked with myDATA 2.0.2