Skip to content

Add seller trading name (BT-28) and additional legal information (BT-33) - #70

Open
RST-J wants to merge 1 commit into
halfbyte:mainfrom
RST-J:seller-trading-name-and-legal-information
Open

RST-J wants to merge 1 commit into
halfbyte:mainfrom
RST-J:seller-trading-name-and-legal-information

Conversation

@RST-J

@RST-J RST-J commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

This result was produced with the help of AI (supervised, not fully automated) and I hope this is acceptable for you.

Problem

A seller can be named only by its legal name (BT-27). Two terms of the seller group are missing:

  • BT-28, the trading name, when a company trades under a name other than its registered one.
  • BT-33, additional legal information, e.g. legal form, registered office, register court and managing directors. In Germany these details are mandatory on business letters and invoices.

Change

  • TradeParty#legal_organization takes a trading_business_name, written as SpecifiedLegalOrganization/TradingBusinessName (BT-28).
  • New member TradeParty#description, written as ram:Description directly after ram:Name (BT-33), where the CII schema places it.
  • Both are written for version 2 only.
  • SpecifiedLegalOrganization is written only when it has an ID or a trading name. This means a trading name can be given without a registration ID.

Existing callers get the same XML as before.

Tests

Three new tests in test/invoice_test.rb, each validated against the schematron:

  • A seller with trading name and legal information (version 2).
  • A trading name without a registration ID.
  • Both fields left out in version 1.

Apart from that, the suite results are unchanged. test_invoice_without_gross_price fails on main as well.

A CHANGELOG entry is included.

Related

#63 also changes the SpecifiedLegalOrganization block, to allow BT-30 without schemeID. The two changes don't overlap in substance. Whichever is merged second needs a small rebase, and I'm happy to do it.

TradeParty#legal_organization takes a trading_business_name, written as
SpecifiedLegalOrganization/TradingBusinessName. The new TradeParty#description
is written as ram:Description after ram:Name. Both are version 2 only.
SpecifiedLegalOrganization is only written when it has an ID or a trading name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RST-J

RST-J commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

The failing checks are not caused by this change. main itself has been red since #68 was merged (test_invoice_without_gross_price, version 1 schema). The tests added here pass. The fix is in #71.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant