-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
support: Show annual revenue for active fixed price plans. #30170
support: Show annual revenue for active fixed price plans. #30170
Conversation
# For support and activity views, we want to show the annual | ||
# revenue for the currently configured fixed price, which | ||
# is the annual amount charged in cents. | ||
return plan.fixed_price |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this depend on the billing cycle? I think fixed-price with monthly billing may be a possible variation.
Also, what's the thinking around whether we should instead be changing get_customer_plan_renewal_amount
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed price monthly billing is possible, but the amount in the fixed_plan
field of the model is the annual amount in cents. That would probably be useful documentation to add. But my previous changes were incorrect, in that the non-fixed price plans were returning an amount based on the billing schedule (monthly or annually).
I've updated the new helper function to always return the annual revenue amount.
Re: why add a new function instead of updating get_customer_plan_renewal_amount
is that for user-facing billing pages, we want to show this:
if plan.fixed_price is not None:
if plan.end_date == self.get_next_billing_cycle(plan):
return 0
And for activity/support pages, we want to show the annual fixed price amount.
d67eee3
to
81d17ee
Compare
In the activity and support views, we want to see the annual revenue for fixed price plans. While on billing pages, we do not display this information as these plans are renegotiated annually. Adds get_annual_recurring_revenue_for_support_data function to BillingSession class, so that we can get the fixed price plan data for these views without changing the logic for what is displayed on the billing pages.
81d17ee
to
94a95fb
Compare
OK, looks good, marked to merge once CI passes. I feel like I'm never going to get to doing a pass of comment documentation on |
In the activity and support views, we want to see the annual revenue for fixed price plans. While on billing pages, we do not display this information as these plans are renegotiated annually.
Adds
get_annual_recurring_revenue_for_support_data
function toBillingSession
class, so that we can get the fixed price plan data for these views without changing the logic for what is displayed on the billing pages.Screenshots and screen captures:
Remote support view
Remote activity view
Self-review checklist
(variable names, code reuse, readability, etc.).
Communicate decisions, questions, and potential concerns.
Individual commits are ready for review (see commit discipline).
Completed manual review and testing of the following: