1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 00:11:35 +02:00

Fix for creating plan renewal invoices

This commit is contained in:
Hillel Coren 2016-12-27 13:13:57 +02:00
parent 0f37d5f618
commit e9f05c7006

View File

@ -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');