Removing payments of archived/deleted invoices from the dashboard

This commit is contained in:
Hillel Coren 2015-11-17 10:55:33 +02:00
parent b4e5690103
commit 1d82881814

View File

@ -110,6 +110,7 @@ class DashboardController extends BaseController
->leftJoin('invoices', 'invoices.id', '=', 'payments.invoice_id')
->where('payments.account_id', '=', Auth::user()->account_id)
->where('payments.deleted_at', '=', null)
->where('invoices.deleted_at', '=', null)
->where('clients.deleted_at', '=', null)
->where('contacts.deleted_at', '=', null)
->where('contacts.is_primary', '=', true)