MYDATA-269

In case of fuelInvoice, the net value of the invoice line with fuelCode 999 must be less or equal than sum of net values of the other invoice lines.

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:invoice
Test
empty($lines[normalize-space(inv:fuelCode) = '999']) or gr:sum($lines[normalize-space(inv:fuelCode) = '999']/inv:netValue) le gr:sum($lines[inv:fuelCode and normalize-space(inv:fuelCode) != '999']/inv:netValue)

Checked with myDATA 2.0.2