billing: Adjust strings on billing page for invoice payment method.

This commit is contained in:
Aman Agrawal 2024-03-05 07:53:16 +00:00 committed by Tim Abbott
parent caba57fe1e
commit b26326815a
3 changed files with 11 additions and 6 deletions

View File

@ -2261,7 +2261,7 @@ class BillingSession(ABC):
if charge_automatically:
payment_method = payment_method_string(stripe_customer)
else:
payment_method = "Billed by invoice"
payment_method = "Invoice"
elif settings.DEVELOPMENT: # nocoverage
# Allow access to billing page in development environment without a stripe_customer_id.
payment_method = "Payment method not populated"

View File

@ -965,7 +965,7 @@ class StripeTest(StripeTestCase):
self.assert_not_in_success_response(
[
"Number of licenses for current billing period",
"Your next invoice is due on",
"You will receive an invoice for",
],
response,
)
@ -1093,7 +1093,7 @@ class StripeTest(StripeTestCase):
str(123),
"Number of licenses for current billing period",
f"licenses ({self.seat_count} in use)",
"Your next invoice is due on",
"You will receive an invoice for",
"January 2, 2013",
"$9,840.00", # 9840 = 80 * 123
]:
@ -1419,10 +1419,10 @@ class StripeTest(StripeTestCase):
str(self.seat_count),
"Number of licenses for next billing period",
f"{self.seat_count} in use",
"Your next invoice is due on",
"You will receive an invoice for",
"March 2, 2012",
f"{80 * 123:,.2f}",
"Billed by invoice",
"Invoice",
]:
self.assert_in_response(substring, response)

View File

@ -196,6 +196,7 @@
</button>
</div>
{% endif %}
<br />
<div class="stripe-customer-billing-portal not-editable-realm-field">
<a href="{{ billing_base_url }}/customer_portal/?return_to_billing_page=true">View and update</a> billing information that will be displayed on your invoice and receipt.
</div>
@ -240,7 +241,7 @@
Your plan will automatically renew on <strong>{{ renewal_date }}</strong>.
{% endif %}
{% else %}
Your next invoice is due on <strong>{{ renewal_date }}</strong>.
Next invoice will be sent on <strong>{{ renewal_date }}</strong>.
{% endif %}
<br />
<div class="input-box billing-page-field">
@ -417,7 +418,11 @@
<b><span class="new_license_count_holder"></span></b>?
</p>
<p>
{% if payment_method == "Invoice" %}
You will receive an invoice for
{% else %}
You will be charged for
{% endif %}
<b><span class="difference_license_count_holder"></span></b> additional licenses.
</p>
</main>