# F-INV335

Source: https://xmlvalid.com/rules/F-INV335

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

- Level: error
- Rule sets: OIOUBL 2.1 Invoice rules (Denmark) 1.17.2
- Context: `doc:Invoice/cac:InvoiceLine`
- Test: `not($NegativeLEA or $NegativePA) and cac:Price/cac:AllowanceCharge/cbc:Amount[starts-with(.,'-')]`

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

- Level: error
- Rule sets: OIOUBL 2.1 Invoice rules (Denmark) 1.17.2
- Context: `doc:Invoice/cac:InvoiceLine`
- Test: `not($NegativeLEA or $NegativePA) and cac:AllowanceCharge/cbc:Amount[starts-with(.,'-')]`

> cbc:ID must contain a value.

- Level: error
- Rule sets: OIOUBL 2.1 Invoice rules (Denmark) 1.17.2
- Context: `doc:Invoice/cac:InvoiceLine/cac:Item/cac:Certificate/cbc:ID`
- Test: `normalize-space(.) != ''`

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