mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	support: Update support view PlanData to use "complimentary access".
Prep for implementing a complimentary access plan for Zulip Cloud.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							1297541059
						
					
				
				
					commit
					10b2e2a092
				
			@@ -83,7 +83,7 @@ class PlanData:
 | 
			
		||||
    licenses: int | None = None
 | 
			
		||||
    licenses_used: int | None = None
 | 
			
		||||
    next_billing_cycle_start: datetime | None = None
 | 
			
		||||
    is_legacy_plan: bool = False
 | 
			
		||||
    is_complimentary_access_plan: bool = False
 | 
			
		||||
    has_fixed_price: bool = False
 | 
			
		||||
    is_current_plan_billable: bool = False
 | 
			
		||||
    stripe_customer_url: str | None = None
 | 
			
		||||
@@ -316,9 +316,13 @@ def get_plan_data_for_support_view(
 | 
			
		||||
                plan_data.current_plan, timezone_now()
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
        plan_data.is_legacy_plan = (
 | 
			
		||||
            plan_data.current_plan.tier == CustomerPlan.TIER_SELF_HOSTED_LEGACY
 | 
			
		||||
        )
 | 
			
		||||
        if isinstance(billing_session, RealmBillingSession):
 | 
			
		||||
            # TODO implement a complimentary access plan/tier for Zulip Cloud.
 | 
			
		||||
            plan_data.is_complimentary_access_plan = False
 | 
			
		||||
        else:
 | 
			
		||||
            plan_data.is_complimentary_access_plan = (
 | 
			
		||||
                plan_data.current_plan.tier == CustomerPlan.TIER_SELF_HOSTED_LEGACY
 | 
			
		||||
            )
 | 
			
		||||
        plan_data.has_fixed_price = plan_data.current_plan.fixed_price is not None
 | 
			
		||||
        plan_data.is_current_plan_billable = billing_session.check_plan_tier_is_billable(
 | 
			
		||||
            plan_tier=plan_data.current_plan.tier
 | 
			
		||||
 
 | 
			
		||||
@@ -20,7 +20,7 @@
 | 
			
		||||
    {% if plan_data.current_plan.discount %}
 | 
			
		||||
        <b>Discount</b>: {{ plan_data.current_plan.discount }}%<br />
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% if plan_data.is_legacy_plan %}
 | 
			
		||||
    {% if plan_data.is_complimentary_access_plan %}
 | 
			
		||||
        <b>End date</b>: {{ plan_data.current_plan.end_date.strftime('%d %B %Y') }}<br />
 | 
			
		||||
    {% else %}
 | 
			
		||||
        <b>Licenses</b>: {{ plan_data.licenses_used }}/{{ plan_data.licenses }} ({% if plan_data.current_plan.automanage_licenses %}Automatic{% else %}Manual{% endif %})<br />
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user