Skip to content

Commit 7a51fca

Browse files
committed
only show Weekly Billable Amount of current organization on dashboard, fixes #977
1 parent 280032e commit 7a51fca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/Service/DashboardService.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,8 @@ public function totalWeeklyBillableAmount(User $user, Organization $organization
266266
) as aggregate'))
267267
->where('billable', '=', true)
268268
->whereNotNull('billable_rate')
269-
->where('user_id', '=', $user->id);
269+
->where('user_id', '=', $user->getKey())
270+
->where('organization_id', '=', $organization->getKey());
270271

271272
$query = $this->constrainDateByPossibleDates($query, $possibleDays, $timezone);
272273
/** @var Collection<int, object{aggregate: int}> $resultDb */

0 commit comments

Comments
 (0)