mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge fix for outstanding balance on dashboard
This commit is contained in:
parent
08c01f59d6
commit
3c9e2769fb
@ -82,8 +82,13 @@ class DashboardController extends BaseController
|
|||||||
->where('accounts.id', '=', Auth::user()->account_id)
|
->where('accounts.id', '=', Auth::user()->account_id)
|
||||||
->where('clients.is_deleted', '=', false)
|
->where('clients.is_deleted', '=', false)
|
||||||
->groupBy('accounts.id')
|
->groupBy('accounts.id')
|
||||||
->groupBy(DB::raw('CASE WHEN clients.currency_id IS NULL THEN CASE WHEN accounts.currency_id IS NULL THEN 1 ELSE accounts.currency_id END ELSE clients.currency_id END'))
|
->groupBy(DB::raw('CASE WHEN clients.currency_id IS NULL THEN CASE WHEN accounts.currency_id IS NULL THEN 1 ELSE accounts.currency_id END ELSE clients.currency_id END'));
|
||||||
->get();
|
|
||||||
|
if (!$view_all) {
|
||||||
|
$balances->where('clients.user_id', '=', $user_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
$balances = $balances->get();
|
||||||
|
|
||||||
$activities = Activity::where('activities.account_id', '=', Auth::user()->account_id)
|
$activities = Activity::where('activities.account_id', '=', Auth::user()->account_id)
|
||||||
->where('activities.activity_type_id', '>', 0);
|
->where('activities.activity_type_id', '>', 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user