mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 23:27:31 -05:00 
			
		
		
		
	Add check if plan is expired
This commit is contained in:
		
							parent
							
								
									0dd4f53332
								
							
						
					
					
						commit
						43ca2c72d1
					
				@ -70,8 +70,13 @@ class SupportMessageSent extends Mailable
 | 
				
			|||||||
        $trial = $account->isTrial() ? 'T' : '';
 | 
					        $trial = $account->isTrial() ? 'T' : '';
 | 
				
			||||||
        $plan = str_replace('_', ' ', $plan);
 | 
					        $plan = str_replace('_', ' ', $plan);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        $plan_status = '';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if(Carbon::parse($account->plan_expires)->lt(now()))
 | 
				
			||||||
 | 
					            $plan_status = 'Plan Expired';
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
        if (Ninja::isHosted()) {
 | 
					        if (Ninja::isHosted()) {
 | 
				
			||||||
            $subject = "{$priority}Hosted-{$db}-{$is_large}{$platform}{$migrated}{$trial} :: {$plan} :: ".date('M jS, g:ia');
 | 
					            $subject = "{$priority}Hosted-{$db}-{$is_large}{$platform}{$migrated}{$trial} :: {$plan} :: {$plan_status} ".date('M jS, g:ia');
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            $subject = "{$priority}Self Hosted :: {$plan} :: {$is_large}{$platform}{$migrated} :: ".date('M jS, g:ia');
 | 
					            $subject = "{$priority}Self Hosted :: {$plan} :: {$is_large}{$platform}{$migrated} :: ".date('M jS, g:ia');
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user