Exclude drafts from overdue invoice list

This commit is contained in:
Hillel Coren 2017-02-07 12:49:33 +02:00
parent faec63d116
commit d3f2261eb4

View File

@ -97,7 +97,8 @@ class InvoiceRepository extends BaseRepository
if (in_array(INVOICE_STATUS_OVERDUE, $statuses)) { if (in_array(INVOICE_STATUS_OVERDUE, $statuses)) {
$query->orWhere(function ($query) use ($statuses) { $query->orWhere(function ($query) use ($statuses) {
$query->where('invoices.balance', '>', 0) $query->where('invoices.balance', '>', 0)
->where('invoices.due_date', '<', date('Y-m-d')); ->where('invoices.due_date', '<', date('Y-m-d'))
->where('invoices.is_public', '=', true);
}); });
} }
}); });