feat: resolve taxes for product fees - #6256
Open
endenis wants to merge 1 commit into
Open
Conversation
endenis
marked this pull request as ready for review
August 31, 2026 10:44
Contributor
|
Automated pre-review (advisory, not a required check) — verdict: HOLD · CI green HOLD — Draft product invoices are not invalidated when an assigned rate-card tax itself is updated or deleted.
|
| billing_entity_taxes(customer.billing_entity_id) | ||
| end | ||
|
|
||
| def product_taxes |
Contributor
There was a problem hiding this comment.
it's not the scope of this PR but the previous applicable_taxes is a bit problematic already. We perform the ApplyTaxesService and accidentally does a N+1 https://github.com/getlago/lago-api/blob/main/app/services/invoices/compute_amounts_from_fees.rb#L20. I'd add a task in Linear to tackle this and avoid continue with the same issue for product_taxes.
| @taxes_by_code ||= rate_card.organization.taxes.where(code: tax_codes).index_by(&:code) | ||
| end | ||
|
|
||
| def refresh_draft_invoices |
Contributor
There was a problem hiding this comment.
question also for @rsempe @brunomiguelpinto do we need to apply the refresh for the rate_override as well?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Part of the "products and plans" project.
Product fees did not resolve taxes from rate cards.
Description