From 0f13d7417d0d3149f3ad2201c168a6169a739457 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 27 Feb 2017 11:13:32 +0200 Subject: [PATCH] Show invoices w/o due date in upcoming list on dashboard --- app/Ninja/Repositories/DashboardRepository.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Ninja/Repositories/DashboardRepository.php b/app/Ninja/Repositories/DashboardRepository.php index 5b6517997a..e1fce0310c 100644 --- a/app/Ninja/Repositories/DashboardRepository.php +++ b/app/Ninja/Repositories/DashboardRepository.php @@ -336,7 +336,10 @@ class DashboardRepository ->where('invoices.is_deleted', '=', false) ->where('invoices.is_public', '=', true) ->where('contacts.is_primary', '=', true) - ->where('invoices.due_date', '>=', date('Y-m-d')) + ->where(function($query) { + $query->where('invoices.due_date', '>=', date('Y-m-d')) + ->orWhereNull('invoices.due_date'); + }) ->orderBy('invoices.due_date', 'asc'); if (! $viewAll) {