Skip to content

Display UNTDID unit codes alongside GOBL units - #141

Open
samlown wants to merge 3 commits into
mainfrom
feat/show-untdid-unit-codes
Open

Display UNTDID unit codes alongside GOBL units#141
samlown wants to merge 3 commits into
mainfrom
feat/show-untdid-unit-codes

Conversation

@samlown

@samlown samlown commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • display a UNTDID unit code after the localized GOBL unit representation, for example kg (KGM)
  • display the UNTDID code by itself when an item has no GOBL unit
  • include the unit column for extension-only units
  • add focused formatter and line-support tests
  • update the unit-focused French invoice example to cover GOBL-only, combined GOBL/UNTDID, and UNTDID-only rendering

This follows invopop/gobl#929. The extension key is read directly so this change remains compatible with the currently released GOBL dependency while that breaking refactor and its downstream dependency migrations are pending.

Validation

  • go test ./components/t ./components/bill
  • targeted fr-invoice-units.fr snapshot test
  • go test ./... -run "^$"
  • golangci-lint run ./...
  • changed unit formatter functions have 100% coverage

The complete repository test command currently reports existing snapshot drift in party.hide.html, smoobu.hide.html, and smoobu-out.hide.html: their stored German tax-ID labels differ from current renderer output. This PR deliberately does not update those unrelated snapshots.

@samlown
samlown marked this pull request as ready for review August 13, 2026 12:25
@samlown
samlown requested a review from methodofaction August 13, 2026 12:25
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