Use an allowed code for the transport mode

Error FX-SCH-A-000346 Factur-X

Value of 'ram:ModeCode' 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 ram:ModeCode is non-empty and does not match any of the values allowed by the code list with identifier 41 for this rule.

What the rule means

A non-empty value of ram:ModeCode must be included in the code list referenced by this rule. The test condition also allows an empty value.

Please use an allowed code for the transport mode

The value of ram:ModeCode is not recognized as an allowed code. Use a value listed in the associated code list or leave the value empty.

What to do
  1. Locate ram:ModeCode in the transport movement within the consignment information.
  2. Check its value against the code list allowed by this rule.
  3. Use a value listed there or leave the element value empty.
  4. Generate the invoice again and validate it.
Technical details

The condition accepts an empty $codeValue41 value or a value present in the enumeration of code list 41 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to the value of ram:ModeCode in the transport movement within the consignment information.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ ram:RelatedSupplyChainConsignment/ram:SpecifiedLogisticsTransportMovement/ ram:ModeCode
Test expression (assert/@test)
string-length($codeValue41)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=41]/enumeration[@value=$codeValue41]