Release 2.0.14 (#3963)

- show customer totals in single-user reports
- support custom fonts in export / invoice templates
- require daterange for export and invoice searches
- improve help label for user locale
- show decimal formats in help controller
- cache tag amount per request
- composer updates
- improved code styles
- added default label to date picker
- new macros & use own macro
This commit is contained in:
Kevin Papst
2023-04-05 19:14:49 +02:00
committed by GitHub
parent 01226a1243
commit 0c397e5080
21 changed files with 458 additions and 493 deletions

View File

@@ -113,6 +113,24 @@ abstract class AbstractUserReportController extends AbstractController
$data[$project->getId()]['project'] = $project;
}
return $data;
$customers = [];
foreach ($data as $id => $row) {
$customerId = (string) $row['project']->getCustomer()->getId();
if (!\array_key_exists($customerId, $customers)) {
$customers[$customerId] = [
'customer' => $row['project']->getCustomer(),
'projects' => [],
'duration' => 0,
'rate' => 0.0,
'internalRate' => 0.0,
];
}
$customers[$customerId]['projects'][$id] = $row;
$customers[$customerId]['duration'] += $row['duration'];
$customers[$customerId]['rate'] += $row['rate'];
$customers[$customerId]['internalRate'] += $row['internalRate'];
}
return $customers;
}
}