Bug fixes

This commit is contained in:
Hillel Coren 2015-11-15 11:50:21 +02:00
parent 9135177c1f
commit c7a92e4862
3 changed files with 13 additions and 1 deletions

View File

@ -103,6 +103,17 @@ class ReportController extends BaseController
if ($enableChart) {
$params = array_merge($params, self::generateChart($groupBy, $startDate, $endDate));
}
} else {
$params['columns'] = [];
$params['displayData'] = [];
$params['reportTotals'] = [
'amount' => [],
'balance' => [],
'paid' => [],
];
$params['labels'] = [];
$params['datasets'] = [];
$params['scaleStepWidth'] = 100;
}
return View::make('reports.chart_builder', $params);

View File

@ -847,7 +847,7 @@ class Utils
$today = new DateTime('now');
$datePaid = DateTime::createFromFormat('Y-m-d', $date);
$interval = $today->diff($date);
$interval = $today->diff($datePaid);
return $interval->y == 0;
}

View File

@ -70,6 +70,7 @@ class ActivityRepository
->leftJoin('invoices', 'invoices.id', '=', 'activities.invoice_id')
->leftJoin('payments', 'payments.id', '=', 'activities.payment_id')
->leftJoin('credits', 'credits.id', '=', 'activities.credit_id')
->where('clients.account_id', '=', Auth::user()->account_id)
->where('clients.public_id', '=', $clientPublicId)
->where('contacts.is_primary', '=', 1)
->whereNull('contacts.deleted_at')