1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Group task report by project

This commit is contained in:
Hillel Coren 2017-03-08 11:41:24 +02:00
parent 213e5c1859
commit 1fb6d04172
2 changed files with 3 additions and 2 deletions

View File

@ -205,7 +205,7 @@ class Task extends EntityModel
public function scopeDateRange($query, $startDate, $endDate)
{
$query->whereRaw('cast(substring(time_log, 3, 10) as unsigned) >= ' . $startDate->format('U'));
$query->whereRaw('cast(substring(time_log, 3, 10) as unsigned) <= ' . $endDate->format('U'));
$query->whereRaw('cast(substring(time_log, 3, 10) as unsigned) <= ' . $endDate->modify('+1 day')->format('U'));
return $query;
}

View File

@ -25,6 +25,7 @@ class AbstractReport
public function run()
{
}
public function results()
@ -66,7 +67,7 @@ class AbstractReport
if (strpos($field, 'date') !== false) {
$class[] = 'group-date-' . (isset($this->options['group_dates_by']) ? $this->options['group_dates_by'] : 'monthyear');
} elseif (in_array($field, ['client', 'vendor', 'product', 'method', 'category'])) {
} elseif (in_array($field, ['client', 'vendor', 'product', 'method', 'category', 'project'])) {
$class[] = 'group-letter-100';
} elseif (in_array($field, ['amount', 'paid', 'balance'])) {
$class[] = 'group-number-50';