F-INV335
The rule sets below word this rule differently; each wording is shown with its rule set.
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.
AllowanceCharge.Amount can not be negative, if InvoicedQuantity or Price.PriceAmount is not negative.
doc:Invoice/cac:InvoiceLine
not($NegativeLEA or $NegativePA) and cac:Price/cac:AllowanceCharge/cbc:Amount[starts-with(.,'-')]
Checked with Denmark OIOUBL 2.1 Invoice
AllowanceCharge.Amount can not be negative, if InvoicedQuantity or Price.PriceAmount is not negative.
doc:Invoice/cac:InvoiceLine
not($NegativeLEA or $NegativePA) and cac:AllowanceCharge/cbc:Amount[starts-with(.,'-')]
Checked with Denmark OIOUBL 2.1 Invoice
cbc:ID must contain a value.
doc:Invoice/cac:InvoiceLine/cac:Item/cac:Certificate/cbc:ID
normalize-space(.) != ''
Checked with Denmark OIOUBL 2.1 Invoice