billing: Add field to show billing frequency.

This commit is contained in:
Aman Agrawal 2023-11-07 16:01:59 +00:00
parent c41a8317cf
commit 2f532e49d1
4 changed files with 13 additions and 1 deletions

View File

@ -216,6 +216,10 @@ class CustomerPlan(models.Model):
ANNUAL = 1
MONTHLY = 2
BILLING_SCHEDULES = {
ANNUAL: "Annual",
MONTHLY: "Monthly",
}
billing_schedule = models.SmallIntegerField()
# The next date the billing system should go through ledger

View File

@ -189,6 +189,7 @@ def billing_home(
stripe_email=stripe_customer.email,
CustomerPlan=CustomerPlan,
onboarding=onboarding,
billing_frequency=CustomerPlan.BILLING_SCHEDULES[plan.billing_schedule],
)
return render(request, "corporate/billing.html", context=context)

View File

@ -17,7 +17,7 @@
<input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}" />
<div class="white-box">
<div id="overview">
<div class="input-box no-validation">
<div class="input-box billing-page-field no-validation">
<label for="org_current_plan" class="inline-block label-title">Your plan</label>
<div id="org_current_plan" class="not-editable-realm-field">
{% if free_trial %}
@ -27,6 +27,12 @@
{% endif %}
</div>
</div>
<div class="input-box billing-page-field no-validation">
<label for="org_billing_freqency" class="inline-block label-title">Billing frequency</label>
<div id="org_billing_freqency" class="not-editable-realm-field">
{{ billing_frequency }}
</div>
</div>
<p>
You are using <strong>{{ seat_count }} of {{ licenses }} licenses</strong>.
{% if automanage_licenses %}

View File

@ -967,6 +967,7 @@ button#register_auth_button_gitlab {
}
}
&.billing-page-field,
&.support-form-field,
&.sponsorship-form-field {
width: 450px;