feat(presentation_group_keys): Display presentation breakdowns in invoices#5529
Open
tiagolupepic wants to merge 13 commits into
Open
feat(presentation_group_keys): Display presentation breakdowns in invoices#5529tiagolupepic wants to merge 13 commits into
tiagolupepic wants to merge 13 commits into
Conversation
- v4 - charge - self billed (inherited) - subscription details Also extract the logic to load fees to a helper InvoiceSubscriptionsHelper
…ion breakdown - Refactor a bit the partial _presentation_breakdowns
D1353L
reviewed
May 21, 2026
| - if applied_invoice_custom_sections.present? | ||
| == SlimHelper.render('templates/invoices/v4/_custom_sections', self) | ||
|
|
||
| == SlimHelper.render('templates/invoices/v4/_presentation_breakdowns', self, fees: fees.includes(:presentation_breakdowns)) |
Contributor
There was a problem hiding this comment.
Suggested change
| == SlimHelper.render('templates/invoices/v4/_presentation_breakdowns', self, fees: fees.includes(:presentation_breakdowns)) | |
| == SlimHelper.render('templates/invoices/v4/_presentation_breakdowns', self, fees: fees.includes(:presentation_breakdowns, :charge, :charge_filter)) |
to avoid N+1
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.
This commit changes the invoice slim templates to also display presentation breakdowns
Continuing the epic of presentation_group_keys, we're changing the templates to also include
the presentation breakdowns.
The main difference of API and GraphQL response and the presentation breakdowns displayed in invoice
is a new method. We're adding the
Charge#presentation_group_keys_values_displayed_in_invoiceto return the keysthat should be displayed in invoice.
In the invoice perspective, we're filtering the breakdowns and then displaying them.
We're also doing some small refactors: