From 8eda3badb8b72480b1d184f5a04a3e549b94dace Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 1 Aug 2016 10:50:18 +0300 Subject: [PATCH] Check invoices aren't double billed --- app/Console/Commands/ChargeRenewalInvoices.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Console/Commands/ChargeRenewalInvoices.php b/app/Console/Commands/ChargeRenewalInvoices.php index 3cd32a185881..a89b2432a3e6 100644 --- a/app/Console/Commands/ChargeRenewalInvoices.php +++ b/app/Console/Commands/ChargeRenewalInvoices.php @@ -59,6 +59,7 @@ class ChargeRenewalInvoices extends Command $ninjaAccount = $this->accountRepo->getNinjaAccount(); $invoices = Invoice::whereAccountId($ninjaAccount->id) ->whereDueDate(date('Y-m-d')) + ->where('balance', '>', 0) ->with('client') ->orderBy('id') ->get();