Allowed value for ram:SubjectCode

Error FX-SCH-A-001014 Factur-X

Value of 'ram:SubjectCode' 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:SubjectCode is not empty and is not included in the code list allowed for this element. An empty value is permitted by the test condition.

What the rule means

ram:SubjectCode identifies the subject of a note using a code. A non-empty value must be one of the values allowed by the Factur-X code list.

Please check the subject code `ram:SubjectCode`

The value of ram:SubjectCode is not included in the allowed code list. You can resolve this by using an allowed value or leaving the element empty.

What to do
  1. Compare the value of ram:SubjectCode with the allowed code list, or leave the element empty.
  2. Regenerate the invoice and validate it again.
Technical details

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

Where the rule applies

The rule applies to ram:SubjectCode within a note associated with the invoice line document.

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