Skip to content

fix(tax): derive applied_to_organization from billing entity#5926

Open
toommz wants to merge 6 commits into
mainfrom
ing-337
Open

fix(tax): derive applied_to_organization from billing entity#5926
toommz wants to merge 6 commits into
mainfrom
ing-337

Conversation

@toommz

@toommz toommz commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Context

GET /taxes (and the GraphQL Tax type) returned applied_to_organization: false for a tax applied to the organization's default billing entity, because it reads the deprecated taxes.applied_to_organization column directly. That column stays in sync only when taxes are managed through the tax endpoints, applying a tax via the billing-entity paths (PUT /billing_entities/:code, GraphQL billingEntities/applyTaxes) only changes the billing_entities_taxes join.

What changed

  • applied_to_organization is now derived from the billing_entities_taxes join on the default billing entity, in both the REST serializer and the GraphQL type.
  • New applied_to_billing_entities_codes array field exposes which billing entities a tax is applied to.
  • The organization payload's tax list is selected the same way, so it agrees with the flag.

@toommz toommz self-assigned this Jul 10, 2026
@toommz toommz marked this pull request as ready for review July 15, 2026 09:54
@toommz toommz requested review from a team, lovrocolic, mariohd and vincent-pochet and removed request for a team July 15, 2026 09:55
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