billing: Use plan.name in invoice description instead of Zulip Standard.

This commit is contained in:
Vishnu KS
2021-09-15 11:17:56 +00:00
committed by Tim Abbott
parent 194258a721
commit a86ab18a7b

View File

@@ -774,7 +774,7 @@ def invoice_plan(plan: CustomerPlan, event_time: datetime) -> None:
"unit_amount": plan.price_per_license, "unit_amount": plan.price_per_license,
"quantity": ledger_entry.licenses, "quantity": ledger_entry.licenses,
} }
description = "Zulip Standard - renewal" description = f"{plan.name} - renewal"
elif licenses_base is not None and ledger_entry.licenses != licenses_base: elif licenses_base is not None and ledger_entry.licenses != licenses_base:
assert plan.price_per_license and ledger_entry is not None assert plan.price_per_license and ledger_entry is not None
last_ledger_entry_renewal = ( last_ledger_entry_renewal = (
@@ -834,7 +834,7 @@ def invoice_plan(plan: CustomerPlan, event_time: datetime) -> None:
collection_method=collection_method, collection_method=collection_method,
customer=plan.customer.stripe_customer_id, customer=plan.customer.stripe_customer_id,
days_until_due=days_until_due, days_until_due=days_until_due,
statement_descriptor="Zulip Standard", statement_descriptor=plan.name,
) )
stripe.Invoice.finalize_invoice(stripe_invoice) stripe.Invoice.finalize_invoice(stripe_invoice)