From 98cd52cc3e63429dcefe1a1607a87bc0bb63ef16 Mon Sep 17 00:00:00 2001 From: Vishnu KS Date: Fri, 12 Jun 2020 23:05:26 +0530 Subject: [PATCH] billing: Mention how the licenses are managed in /billing. --- corporate/tests/test_stripe.py | 2 ++ corporate/views.py | 1 + templates/corporate/billing.html | 11 ++++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/corporate/tests/test_stripe.py b/corporate/tests/test_stripe.py index 3a49d4c4d4..b1078415c4 100644 --- a/corporate/tests/test_stripe.py +++ b/corporate/tests/test_stripe.py @@ -487,6 +487,7 @@ class StripeTest(StripeTestCase): for substring in [ 'Zulip Standard', str(self.seat_count), 'You are using', f'{self.seat_count} of {self.seat_count} licenses', + 'Licenses are automatically managed by Zulip; when you add', 'Your plan will renew on', 'January 2, 2013', f'${80 * self.seat_count}.00', 'Visa ending in 4242', 'Update card']: @@ -571,6 +572,7 @@ class StripeTest(StripeTestCase): for substring in [ 'Zulip Standard', str(123), 'You are using', f'{self.seat_count} of {123} licenses', + 'Licenses are manually managed. You will not be able to add ', 'Your plan will renew on', 'January 2, 2013', '$9,840.00', # 9840 = 80 * 123 'Billed by invoice']: self.assert_in_response(substring, response) diff --git a/corporate/views.py b/corporate/views.py index 22d7f086d6..1ff800b485 100644 --- a/corporate/views.py +++ b/corporate/views.py @@ -225,6 +225,7 @@ def billing_home(request: HttpRequest) -> HttpResponse: 'has_active_plan': True, 'free_trial': free_trial, 'downgrade_at_end_of_cycle': downgrade_at_end_of_cycle, + 'automanage_licenses': plan.automanage_licenses, 'licenses': licenses, 'licenses_used': licenses_used, 'renewal_date': renewal_date, diff --git a/templates/corporate/billing.html b/templates/corporate/billing.html index ae5127afa4..5952d6fad4 100644 --- a/templates/corporate/billing.html +++ b/templates/corporate/billing.html @@ -34,7 +34,16 @@ {% else %}

Your current plan is {{ plan_name }}.

{% endif %} -

You are using {{ licenses_used }} of {{ licenses }} licenses.

+

+ You are using {{ licenses_used }} of {{ licenses }} licenses. + {% if automanage_licenses %} + Licenses are automatically managed by Zulip; when you add or deactivate a user, the number of + licenses will be immediately updated to reflect your new usage. + {% else %} + Licenses are manually managed. You will not be able to add new users to your organization once + you are using all of your licenses. + {% endif %} +

{% if renewal_amount %} {% if free_trial %}