Allowed unit code for the price basis quantity

Error FX-SCH-A-000533 Factur-X

Value of '@unitCode' is not allowed.

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

The value of unitCode is not included in the code list used for this check. An empty value is permitted by the test condition.

What the rule means

The unit code associates the price basis quantity with a standardized unit of measure. A code not listed cannot be accepted as an allowed unit code by this rule.

Please use an allowed unit code for the price basis quantity

The unit code on the net price’s basis quantity is not recognized as an allowed value. Check the value of the unitCode attribute.

What to do
  1. Locate ram:BasisQuantity under ram:NetPriceProductTradePrice.
  2. Check the unitCode attribute against the applicable code list.
  3. Regenerate the invoice and validate it again.
Technical details

@unitCode on ram:BasisQuantity is checked: the value must be empty or present in the enumeration with code-list ID 6 in FACTUR-X_BASIC_codedb.xml.

Where the rule applies

The rule applies to the unitCode attribute of ram:BasisQuantity for an invoice line’s net price.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:BasisQuantity
Test expression (assert/@test)
string-length($codeValue6)=0 or document('FACTUR-X_BASIC_codedb.xml')/codedb/cl[@id=6]/enumeration[@value=$codeValue6]