Price base quantities and units of measure must match

Error BR-TMP-3 XRechnung

If BT-149 (Item price base quantity) is present in both GrossPriceProductTradePrice and NetPriceProductTradePrice, the values shall be identical. If BT-150 (unit of measure code) is present on the NetPrice path, it shall also be present on the GrossPrice path and be identical.

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

If BasisQuantity is present in both GrossPriceProductTradePrice and NetPriceProductTradePrice, the values differ. The rule also fails if NetPriceProductTradePrice/BasisQuantity has a unitCode while the corresponding gross-price BasisQuantity lacks that attribute or has a different value.

What the rule means

BT-149 is the item price base quantity; BT-150 is its unit of measure code. If these details do not agree between gross and net prices, the price basis is inconsistent.

Affected fields BT-149 BT-150
Please align the gross and net price base quantities and units of measure

The price base quantities or their units of measure differ between the gross and net prices. Make the checked details consistent in the invoice line.

What to do
  1. Check the values set through TradeLineItem.GrossQuantity and TradeLineItem.NetQuantity.
  2. Make BasisQuantity in GrossPriceProductTradePrice and NetPriceProductTradePrice match when both are present.
  3. If BasisQuantity/@unitCode is present for the net price, set the same unitCode for the gross price.
  4. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:SpecifiedLineTradeAgreement>
  <ram:GrossPriceProductTradePrice>
    <ram:BasisQuantity unitCode="C62">1</ram:BasisQuantity>
  </ram:GrossPriceProductTradePrice>
  <ram:NetPriceProductTradePrice>
    <ram:BasisQuantity unitCode="HUR">2</ram:BasisQuantity>
  </ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
✓ Correct
<ram:SpecifiedLineTradeAgreement>
  <ram:GrossPriceProductTradePrice>
    <ram:BasisQuantity unitCode="C62">1</ram:BasisQuantity>
  </ram:GrossPriceProductTradePrice>
  <ram:NetPriceProductTradePrice>
    <ram:BasisQuantity unitCode="C62">1</ram:BasisQuantity>
  </ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
Check in FactoorSharp
  • TradeLineItem.GrossQuantity (BT-149-1)
  • TradeLineItem.NetQuantity (BT-149)
Technical details

The test permits differing BasisQuantity values only when both paths do not contain a quantity. If unitCode is present on the net price base quantity, the test requires the attribute on the gross price base quantity as well and compares the values.

Where the rule applies

The rule applies to each IncludedSupplyChainTradeLineItem and compares the price base quantity and, where present, the unit of measure code in GrossPriceProductTradePrice and NetPriceProductTradePrice.

Original message from the Schematron
Wenn BT-149 (Item price base quantity) sowohl in GrossPriceProductTradePrice als auch in NetPriceProductTradePrice vorhanden ist, müssen die Werte identisch sein. Wenn BT-150 (unit of measure code) auf dem NetPrice-Pfad vorhanden ist, muss es auch auf dem GrossPrice-Pfad vorhanden und identisch sein.
Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem
Test expression (assert/@test)
not( ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:BasisQuantity and ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:BasisQuantity ) or ( ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:BasisQuantity = ram:SpecifiedLineTradeAgreement/ ram:NetPriceProductTradePrice/ram:BasisQuantity and ( not( ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:BasisQuantity/ @unitCode and ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ ram:BasisQuantity/@unitCode ) or ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:BasisQuantity/ @unitCode = ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ ram:BasisQuantity/@unitCode ) )