Removed deleted and added archived records to the chart builder

This commit is contained in:
Hillel Coren 2015-02-26 15:06:44 +02:00
parent 3c5a3897cc
commit ef49e970a7

View File

@ -52,7 +52,7 @@ class ReportController extends \BaseController
$records = DB::table($entityType.'s')
->select(DB::raw('sum(amount) as total, '.$groupBy.'('.$entityType.'_date) as '.$groupBy))
->where('account_id', '=', Auth::user()->account_id)
->where($entityType.'s.deleted_at', '=', null)
->where($entityType.'s.is_deleted', '=', false)
->where($entityType.'s.'.$entityType.'_date', '>=', $startDate->format('Y-m-d'))
->where($entityType.'s.'.$entityType.'_date', '<=', $endDate->format('Y-m-d'))
->groupBy($groupBy);