mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 23:17:32 -05:00 
			
		
		
		
	Fix for creating plan renewal invoices
This commit is contained in:
		
							parent
							
								
									257a5688c7
								
							
						
					
					
						commit
						0a1849e126
					
				@ -50,7 +50,7 @@ class SendRenewalInvoices extends Command
 | 
				
			|||||||
        $this->info(date('Y-m-d').' Running SendRenewalInvoices...');
 | 
					        $this->info(date('Y-m-d').' Running SendRenewalInvoices...');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // get all accounts with plans expiring in 10 days
 | 
					        // get all accounts with plans expiring in 10 days
 | 
				
			||||||
        $companies = Company::whereRaw('datediff(plan_expires, curdate()) = 10')
 | 
					        $companies = Company::whereRaw("datediff(plan_expires, curdate()) = 10 and (plan = 'pro' or plan = 'enterprise')")
 | 
				
			||||||
                        ->orderBy('id')
 | 
					                        ->orderBy('id')
 | 
				
			||||||
                        ->get();
 | 
					                        ->get();
 | 
				
			||||||
        $this->info(count($companies).' companies found renewing in 10 days');
 | 
					        $this->info(count($companies).' companies found renewing in 10 days');
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user