Basis quantity unit

Error FX-SCH-A-000969 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 non-empty value of unitCode on ram:BasisQuantity is not permitted by the unit code list. The test also accepts an empty value.

What the rule means

unitCode identifies the unit of measure for the basis quantity. A code that is not permitted cannot be interpreted as a compliant unit.

Please use a permitted unit code for the basis quantity

The basis quantity’s unit code is not recognized. A value permitted by the code list identifies the unit in accordance with the rule.

What to do
  1. Check the value of unitCode on ram:BasisQuantity.
  2. Use a value from the unit code list, or leave the value empty.
  3. Generate the invoice again and validate it.
Technical details

The test permits an empty code; otherwise, the unitCode value must be present in code list 15 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to ram:BasisQuantity for a document-level allowance in ram:SpecifiedTradeAllowanceCharge, identified by ram:ChargeIndicator having the value false. The unitCode attribute is checked.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator="false"]/ ram:BasisQuantity
Test expression (assert/@test)
string-length($codeValue15)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=15]/enumeration[@value=$codeValue15]