Allowed note subject code

Error FX-SCH-A-000633 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 in the code list provided for it. An empty value is also accepted by the test condition.

What the rule means

ram:SubjectCode classifies the subject of the note. A code not in the list cannot be assigned using the specified set of values.

Please use an allowed subject code for the note

The value in ram:SubjectCode is not in the allowed code list. You can use a listed value or leave the element empty.

What to do
  1. Check the value of ram:SubjectCode in the affected ram:IncludedNote.
  2. Use an entry from the allowed code list or leave the value empty.
  3. Generate the invoice again and validate it.
Technical details

The test accepts an empty value or a value present as an enumeration in the code list with identifier 5.

Where the rule applies

The rule applies to ram:SubjectCode within a ram:IncludedNote in the document header.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/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]