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: Add price breakdown for pay in advance percentage charge #2605

Merged
merged 18 commits into from
Oct 3, 2024

Conversation

annvelents
Copy link
Contributor

@annvelents annvelents commented Sep 19, 2024

Context

We needed to enhance representation of price for percentage pay in advance charge. Initial request was to simply show only percentage if only percentage is set, but then the request grew up to show the whole amount breakdown as we have in subscription invoices

Description

  • added amount_details calculation for fee as we have for fee aggregation (subscription invoices)
  • amount_detail is calculated only for percentage invoices
  • added fix for free_events calculation: before if we had a plan that allows 3 free events, we received two and generate the invoice, in the invoice it will say that there are 0 free events. Now it will say 2 free_events

@annvelents annvelents changed the title WIP add detailed charge info into invoice for percentage charged fees… Add price breakdown for pay in advance percentage charge Sep 26, 2024
@annvelents annvelents changed the title Add price breakdown for pay in advance percentage charge Feat: Add price breakdown for pay in advance percentage charge Sep 26, 2024
@annvelents annvelents force-pushed the fix-advanca-percentage-fee-in-pdf branch from 7aab924 to 0bf0062 Compare September 26, 2024 15:17
@annvelents annvelents marked this pull request as ready for review September 26, 2024 15:18
spec/scenarios/pay_in_advance_charges_spec.rb Show resolved Hide resolved
app/views/templates/invoices/v4/charge.slim Outdated Show resolved Hide resolved
@annvelents annvelents force-pushed the fix-advanca-percentage-fee-in-pdf branch from b225576 to 20b4e12 Compare September 30, 2024 08:23
Copy link
Collaborator

@rsempe rsempe left a comment

Choose a reason for hiding this comment

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

lgtm

app/models/charge.rb Outdated Show resolved Hide resolved
@annvelents annvelents force-pushed the fix-advanca-percentage-fee-in-pdf branch from 704dae9 to 3bee25c Compare September 30, 2024 13:09
@annvelents annvelents merged commit 86eb3cb into main Oct 3, 2024
6 checks passed
@annvelents annvelents deleted the fix-advanca-percentage-fee-in-pdf branch October 3, 2024 07:31
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.

4 participants