Update GoogleChartController.php

This commit is contained in:
James Cole 2015-03-25 16:00:06 +01:00
parent 2159df6802
commit 0dbe44764b

View File

@ -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')