Check invoices aren't double billed

This commit is contained in:
Hillel Coren 2016-08-01 10:50:18 +03:00
parent 305ef1d378
commit 8eda3badb8

View File

@ -59,6 +59,7 @@ class ChargeRenewalInvoices extends Command
$ninjaAccount = $this->accountRepo->getNinjaAccount(); $ninjaAccount = $this->accountRepo->getNinjaAccount();
$invoices = Invoice::whereAccountId($ninjaAccount->id) $invoices = Invoice::whereAccountId($ninjaAccount->id)
->whereDueDate(date('Y-m-d')) ->whereDueDate(date('Y-m-d'))
->where('balance', '>', 0)
->with('client') ->with('client')
->orderBy('id') ->orderBy('id')
->get(); ->get();