Allowed value for the note subject code

Error FX-SCH-A-000553 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 non-empty value of ram:SubjectCode is not included in its designated code list.

What the rule means

ram:SubjectCode assigns the note an allowed subject code; a code absent from the list cannot be interpreted as a valid subject code.

Please use an allowed code for the note subject

The value entered in ram:SubjectCode is not allowed as a subject code. You can replace it with a value from the code list or leave it empty.

What to do
  1. Check the value in ram:SubjectCode within ram:IncludedNote.
  2. Use only a value from the code list applicable to this element, 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 in the enumeration of code list ID 4 in FACTUR-X_EN16931_codedb.xml.

Where the rule applies

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

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote/ram:SubjectCode
Test expression (assert/@test)
string-length($codeValue4)=0 or document('FACTUR-X_EN16931_codedb.xml')/codedb/cl[@id=4]/enumeration[@value=$codeValue4]