F-INV335

The rule sets below word this rule differently; each wording is shown with its rule set.

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.

Message

AllowanceCharge.Amount can not be negative, if InvoicedQuantity or Price.PriceAmount is not negative.

Context
doc:Invoice/cac:InvoiceLine
Test
not($NegativeLEA or $NegativePA) and cac:Price/cac:AllowanceCharge/cbc:Amount[starts-with(.,'-')]

Checked with Denmark OIOUBL 2.1 Invoice

Message

AllowanceCharge.Amount can not be negative, if InvoicedQuantity or Price.PriceAmount is not negative.

Context
doc:Invoice/cac:InvoiceLine
Test
not($NegativeLEA or $NegativePA) and cac:AllowanceCharge/cbc:Amount[starts-with(.,'-')]

Checked with Denmark OIOUBL 2.1 Invoice

Message

cbc:ID must contain a value.

Context
doc:Invoice/cac:InvoiceLine/cac:Item/cac:Certificate/cbc:ID
Test
normalize-space(.) != ''

Checked with Denmark OIOUBL 2.1 Invoice