billing: Highlight manual license management errors for admins.

In the billing portal UI for manual license management, limit
decreasing the number of licenses for the next billing period to
be less than the currently used licenses. If the customer is exempt
from license number checks, then this limit is not applied.

Also, visually highlight manual license management errors so that
the billing admin is aware of potential issues.

As of these changes, current licenses can be under the seat count
when a guest user is changed to a non-guest user. And next billing
period licenses can be under the seat cout when a user joins with a
currently available, purchased license after a billing admin has
decreased the number of licenses set for the next billing period.
This commit is contained in:
Lauryn Menard
2024-09-05 18:42:53 +02:00
committed by Tim Abbott
parent b02cf53d5e
commit 137f4fccde
3 changed files with 73 additions and 12 deletions

View File

@@ -2545,6 +2545,7 @@ class BillingSession(ABC):
"licenses": licenses,
"licenses_at_next_renewal": licenses_at_next_renewal,
"seat_count": seat_count,
"exempt_from_license_number_check": customer.exempt_from_license_number_check,
"renewal_date": renewal_date,
"renewal_amount": cents_to_dollar_string(renewal_cents) if renewal_cents != 0 else None,
"payment_method": payment_method,