Provide text or a text code for the subject

Error BR-FXEXT-02 Factur-X

If the invoice line item free text subject code (BT-X-10) is specified, either the coded invoice line item free text (BT-X-9) or the invoice line item free text (BT-127) must be specified, or both. If both BT-X-9 and BT-127 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 specified, both ContentCode and Content are missing. The subject of the invoice line note is therefore present, but neither its coded text nor its free text is provided. The test checks only whether at least one of the two elements exists.

What the rule means

A subject code must be accompanied by coded text, free text, or both. If both text forms are provided, the business rule requires them to have the same meaning.

Affected fields BT-X-10 BT-X-9 BT-127
Please add text or a text code for the invoice line subject

The specified subject of the invoice line note is missing both a text code and text. Add at least one of these details.

What to do
  1. Add ContentCode or Content to the invoice line note.
  2. Check the entries through AssociatedDocument.Notes.
  3. Check the TradeLineItem.AddNote(...) call.
  4. If you provide both text forms, make sure they have the same meaning.
  5. Generate the invoice again and validate it again.
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>Delivery information</ram:Content>
</ram:IncludedNote>
Check in FactoorSharp
  • AssociatedDocument.Notes (BT-127)
  • TradeLineItem.AddNote(note, subjectCode, contentCode) (BT-127)
Technical details

For an IncludedNote with SubjectCode, the test checks only whether ContentCode or Content exists. It does not compare whether both entries have the same meaning.

Where the rule applies

The rule applies to an IncludedNote line note with a specified SubjectCode within AssociatedDocumentLineDocument.

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