Skip to content

Commit

Permalink
Add customer column to user detail report
Browse files Browse the repository at this point in the history
  • Loading branch information
dmtrek14 committed Feb 12, 2024
1 parent bdff141 commit d2a1b5c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion web/services/getUserProjectCustomerReportJsonService.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,14 @@
$projectName = $projectVO->getDescription();
} else $projectName = "-- Unknown --";

$customerName = $projectVO->getCustomerName();

$record = array();

$totalHours[$projectName] = 0;

$record['project'] = $projectName;

$record['customer'] = $customerName;
$record['id'] = $projectId;

$totalHours[$projectName] += round($hours, 2, PHP_ROUND_HALF_DOWN);
Expand Down Expand Up @@ -171,6 +173,11 @@

$metaData['fields'][] = $field;

$field['name'] = "customer";
$field['type'] = "string";

$metaData['fields'][] = $field;

$field['name'] = "total";
$field['type'] = "float";

Expand All @@ -187,6 +194,12 @@

$response['columns'][] = $column;

$column['header'] = "Customer";
$column['dataIndex'] = "customer";
$column['sortable'] = true;

$response['columns'][] = $column;

$column['header'] = 'Id';
$column['dataIndex'] = 'id';
$column['sortable'] = true;
Expand Down

0 comments on commit d2a1b5c

Please sign in to comment.