mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 13:54:30 -04:00
Task report
This commit is contained in:
parent
a41066b2e5
commit
c1696ef8d8
@ -130,7 +130,7 @@ class ReportController extends BaseController
|
||||
|
||||
private function generateTaskReport($startDate, $endDate, $isExport)
|
||||
{
|
||||
$columns = ['client', 'date', 'duration'];
|
||||
$columns = ['client', 'date', 'description', 'duration'];
|
||||
$displayData = [];
|
||||
|
||||
$tasks = Task::scope()
|
||||
@ -141,7 +141,8 @@ class ReportController extends BaseController
|
||||
foreach ($tasks->get() as $task) {
|
||||
$displayData[] = [
|
||||
$task->client ? ($isExport ? $task->client->getDisplayName() : $task->client->present()->link) : trans('texts.unassigned'),
|
||||
$task->getStartTime(),
|
||||
link_to($task->present()->url, $task->getStartTime()),
|
||||
$task->present()->description,
|
||||
Utils::formatTime($task->getDuration()),
|
||||
];
|
||||
}
|
||||
|
@ -21,6 +21,11 @@ class TaskPresenter extends EntityPresenter
|
||||
return $this->entity->user->getDisplayName();
|
||||
}
|
||||
|
||||
public function description()
|
||||
{
|
||||
return substr($this->entity->description, 0, 40) . (strlen($this->entity->description) > 40 ? '...' : '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $account
|
||||
* @return mixed
|
||||
|
Loading…
x
Reference in New Issue
Block a user