From 0a1849e1266bdd6c16d6bb9723f0ef0fe16c070e Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 27 Dec 2016 13:44:35 +0200 Subject: [PATCH] Fix for creating plan renewal invoices --- app/Console/Commands/SendRenewalInvoices.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/SendRenewalInvoices.php b/app/Console/Commands/SendRenewalInvoices.php index acd3c6f8e1..2751e151c0 100644 --- a/app/Console/Commands/SendRenewalInvoices.php +++ b/app/Console/Commands/SendRenewalInvoices.php @@ -50,7 +50,7 @@ class SendRenewalInvoices extends Command $this->info(date('Y-m-d').' Running SendRenewalInvoices...'); // 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') ->get(); $this->info(count($companies).' companies found renewing in 10 days');