Gross price must not be negative

Error BR-28 EN 16931

The Item gross price (BT-148) shall NOT be negative.

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

If ram:GrossPriceProductTradePrice/ram:ChargeAmount is provided, its value is less than zero. A negative gross price is not allowed.

What the rule means

BT-148 is the item gross price. The rule requires a provided gross price to be zero or positive; this test allows the gross price to be omitted.

Affected fields BT-148
Please check the item gross price

The gross price provided for an invoice line is negative. This rule also allows the gross price to be omitted, but if provided it must be zero or positive.

What to do
  1. Check the value of ram:ChargeAmount in the invoice line’s gross price.
  2. Check the value of TradeLineItem.GrossUnitPrice.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:IncludedSupplyChainTradeLineItem>
  <ram:SpecifiedLineTradeAgreement>
    <ram:GrossPriceProductTradePrice>
      <ram:ChargeAmount>-1.00</ram:ChargeAmount>
    </ram:GrossPriceProductTradePrice>
  </ram:SpecifiedLineTradeAgreement>
</ram:IncludedSupplyChainTradeLineItem>
✓ Correct
<ram:IncludedSupplyChainTradeLineItem>
  <ram:SpecifiedLineTradeAgreement/>
</ram:IncludedSupplyChainTradeLineItem>
Check in FactoorSharp
  • TradeLineItem.GrossUnitPrice (BT-148)
Technical details

The test passes if ram:ChargeAmount in the gross price is at least zero or if that element is absent.

Where the rule applies

Applies to ram:ChargeAmount in the gross price ram:GrossPriceProductTradePrice of each invoice line ram:IncludedSupplyChainTradeLineItem.

Context (rule/@context)
//ram:IncludedSupplyChainTradeLineItem
Test expression (assert/@test)
(ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:ChargeAmount >= 0) or not(ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:ChargeAmount)