XV-GR-18

Invoice line: …. otherMeasurementUnitQuantity and otherMeasurementUnitTitle describe the unit when measurementUnit is 7 (pieces, other cases): both are given then, and only then.

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:invoiceDetails
Test
if (inv:measurementUnit = '7') then exists(inv:otherMeasurementUnitQuantity) and normalize-space(inv:otherMeasurementUnitTitle) != '' else empty(inv:otherMeasurementUnitQuantity) and empty(inv:otherMeasurementUnitTitle)

Checked with myDATA 2.0.2