# XV-GR-18

Source: https://xmlvalid.com/rules/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.

- Level: error
- Rule sets: myDATA checks of AADE (Greece) myDATA 2.0.2 of September 2026
- 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)`

Validate a document against these rules: https://xmlvalid.com/validate
