Disallowed unit code

Error FX-SCH-A-001078 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 in ram:ChargeFreeQuantity is not included in the code list used by this check. The test explicitly accepts an empty value.

What the rule means

The unit code identifies the unit in which the unbilled quantity is expressed. A value not in the code list can prevent the unit from being identified unambiguously.

Please use an allowed unit code for the unbilled quantity

The unit code for the unbilled quantity is not in the allowed code list. You can correct it using the code list; this check accepts an empty value.

What to do
  1. Locate ram:ChargeFreeQuantity in the invoice line.
  2. Check the value of @unitCode against the allowed code list.
  3. Generate the invoice again and validate it again.
Technical details

The check accepts the value if it is empty or appears in enumeration id=15 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to the @unitCode attribute of the unbilled quantity ram:ChargeFreeQuantity in an invoice line.

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