XV-GR-08

receivingNotePurpose is required for a receiving note (10.1, 10.2) and accepted for no other type; this is a …….

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
inv:invoiceHeader
Test
if ($type = ('10.1', '10.2')) then exists(inv:receivingNotePurpose) else empty(inv:receivingNotePurpose)

Checked with myDATA 2.0.2