diff --git a/app/Http/Controllers/GoogleChartController.php b/app/Http/Controllers/GoogleChartController.php index d7b06835ee..6e5a918211 100644 --- a/app/Http/Controllers/GoogleChartController.php +++ b/app/Http/Controllers/GoogleChartController.php @@ -236,7 +236,7 @@ class GoogleChartController extends Controller $start = Session::get('start', Carbon::now()->startOfMonth()); $end = Session::get('end', Carbon::now()->endOfMonth()); $set = TransactionJournal:: - where('user_id',Auth::user()->id) + where('transaction_journals.user_id',Auth::user()->id) ->leftJoin( 'transactions', function (JoinClause $join) { @@ -249,6 +249,7 @@ class GoogleChartController extends Controller ->leftJoin('categories', 'categories.id', '=', 'category_transaction_journal.category_id') ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') ->before($end) + ->where('categories.user_id',Auth::user()->id) ->after($start) ->where('transaction_types.type', 'Withdrawal') ->groupBy('categories.id')