Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(invoice_custom_sections): use custom sections in pdf #3013

Conversation

annvelents
Copy link
Contributor

@annvelents annvelents commented Dec 30, 2024

Use applied invoice custom sections in PDFs and include them in invoice payload
Also includes fixes found after QA

@annvelents annvelents force-pushed the feat-invoice-custom-sections-create-applied-service branch from 28e44be to 30325ba Compare January 7, 2025 13:33
@annvelents annvelents force-pushed the feat-invoice-custom-sections-pdf branch from f1dfb75 to 7beee55 Compare January 7, 2025 13:33
@annvelents annvelents force-pushed the feat-invoice-custom-sections-create-applied-service branch from 30325ba to 4ea553a Compare January 9, 2025 16:57
@annvelents annvelents force-pushed the feat-invoice-custom-sections-pdf branch from 6687849 to 93310f4 Compare January 9, 2025 18:30
@annvelents annvelents marked this pull request as ready for review January 10, 2025 08:36
Comment on lines +19 to +23
.joins('LEFT JOIN invoice_custom_section_selections ON invoice_custom_sections.id = invoice_custom_section_selections.invoice_custom_section_id
AND invoice_custom_section_selections.customer_id is NULL')
.order(
Arel.sql('CASE WHEN invoice_custom_section_selections.id IS NOT NULL THEN 0 ELSE 1 END'),
:name
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocker here but maybe this should be turned into a scope. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's not needed, because this sorting - by selected for organization, and then alphabetically - only needed in the graphql response... I can't see where else it will be useful... or do you mean it will be better for readability?
(in all other places we're usually using the selected sections and only sort them alphabetically)

@annvelents annvelents changed the title Feat(invoice custom sections): use custom sections in pdf Feat(invoice_custom_sections): use custom sections in pdf Jan 10, 2025
@annvelents annvelents merged commit 2c5755f into feat-invoice-custom-sections-create-applied-service Jan 14, 2025
3 checks passed
@annvelents annvelents deleted the feat-invoice-custom-sections-pdf branch January 14, 2025 08:40
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.

2 participants