Allowed unit code for the price basis

Error FX-SCH-A-001059 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 for this attribute. An empty value is also accepted by this check.

What the rule means

A non-empty unit code must match an entry in the specified code list so that the price-basis unit is stated consistently.

Please use an allowed unit code for the price basis

The value of @unitCode on ram:BasisQuantity is not included in the specified code list. You can change the value or leave the attribute empty.

What to do
  1. Find ram:BasisQuantity in ram:NetPriceProductTradePrice of the affected invoice line.
  2. Check @unitCode against its specified code list, or leave the attribute empty.
  3. Generate the invoice again and validate it.
Technical details

The check accepts an empty test value or a value listed under code-list ID 15 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to @unitCode on ram:BasisQuantity within ram:NetPriceProductTradePrice of an invoice line.

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