Positive price base quantity

Error PEPPOL-EN16931-R121 Peppol

Base quantity MUST be a positive number above zero.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

If ram:BasisQuantity is provided, its value must be greater than zero. A value of zero or a negative value does not pass the check.

What the rule means

The price base quantity states the quantity to which the product price relates. It must be positive so the price calculation has a valid reference quantity.

Please enter a price base quantity greater than zero

The provided ram:BasisQuantity is zero or less. You can resolve this by using a positive value for the price base quantity or omitting the element if it is not needed.

What to do
  1. Check ram:BasisQuantity in the product’s net price or gross price.
  2. Make sure the value is greater than zero, or omit the element if no price base quantity is to be stated.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:NetPriceProductTradePrice>
  <ram:BasisQuantity>0</ram:BasisQuantity>
</ram:NetPriceProductTradePrice>
✓ Correct
<ram:NetPriceProductTradePrice>
  <ram:BasisQuantity>1</ram:BasisQuantity>
</ram:NetPriceProductTradePrice>
Technical details

The test permits ram:BasisQuantity to be absent. If present, its value is cast to xs:decimal and checked to be greater than zero.

Where the rule applies

The rule applies to ram:BasisQuantity in ram:NetPriceProductTradePrice or ram:GrossPriceProductTradePrice.

Context (rule/@context)
ram:NetPriceProductTradePrice | ram:GrossPriceProductTradePrice
Test expression (assert/@test)
not(ram:BasisQuantity) or xs:decimal(ram:BasisQuantity) > 0