Provide message text for the subject code

Error BR-FXEXT-01 Factur-X

If the Invoice Free Text subject Code (BT-21) is specified, either the coded message free text (BT-X-5) or the message free text (BT-22) must be specified, or both. If both BT-X-5 and BT-22 are specified, both must have the same meaning.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

An ram:IncludedNote contains ram:SubjectCode, but neither ram:ContentCode nor ram:Content is present. The test checks that at least one of these two text elements exists.

What the rule means

The subject code identifies the type of free text. An associated coded or plain message text makes the note’s content available.

Affected fields BT-21 BT-X-5 BT-22
Please add message text for the subject code

The note contains a subject code but no message text. You can add either coded text or plain text.

What to do
  1. Check the note set with Note.SubjectCode.
  2. Add message text using Note.ContentCode or a ram:Content element.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:IncludedNote>
  <ram:SubjectCode>AAI</ram:SubjectCode>
</ram:IncludedNote>
✓ Correct
<ram:IncludedNote>
  <ram:SubjectCode>AAI</ram:SubjectCode>
  <ram:Content>Message</ram:Content>
</ram:IncludedNote>
Check in FactoorSharp
  • Note.ContentCode (Header level: BT-22)
  • Note.SubjectCode (Header level: BT-21)
Technical details

The XPath test checks only whether ram:ContentCode or ram:Content is present. It does not check the matching meaning of both values mentioned in the message text.

Where the rule applies

The rule applies to ram:IncludedNote within the invoice document data when ram:SubjectCode is specified.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote[ram:SubjectCode]
Test expression (assert/@test)
(ram:ContentCode) or (ram:Content)