Provide free text for the subject

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

When SubjectCode is present, both ContentCode and Content are missing from IncludedNote. The test requires at least one of these two elements.

What the rule means

The subject code SubjectCode assigns the free text to a subject. At least one coded or uncoded free-text value must accompany such a subject.

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

The subject SubjectCode is present, but its free text is missing. You can complete the entry.

What to do
  1. Check SubjectCode in IncludedNote.
  2. Add at least ContentCode or Content there.
  3. Check the values through Note.SubjectCode and Note.ContentCode.
  4. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:IncludedNote>
  <ram:SubjectCode>AB</ram:SubjectCode>
</ram:IncludedNote>
✓ Correct
<ram:IncludedNote>
  <ram:SubjectCode>AB</ram:SubjectCode>
  <ram:Content>Information complémentaire</ram:Content>
</ram:IncludedNote>
Check in FactoorSharp
  • Note.ContentCode (Header level: BT-22)
  • Note.SubjectCode (Header level: BT-21)
Technical details

The XPath checks for the presence of ContentCode or Content. It requires at least one of the elements; the test does not compare their meanings when both are present.

Where the rule applies

The rule applies to IncludedNote within ExchangedDocument when SubjectCode is present.

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