fix: remove remaining named report parameter

This commit is contained in:
Marco0300
2026-09-01 23:10:07 +02:00
parent 2b3e04825c
commit 9627da20e1
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -741,8 +741,8 @@ if ($route === 'reports') {
$reportRows = $reportStmt->fetchAll();
$rows = array_map(static fn (array $row): array => [$row['client_name'], (int)$row['jobcards'], round((float)$row['hours'], 2)], $reportRows);
if ($user['role_name'] === 'Technician') {
$reportClientsStmt = db()->prepare('SELECT DISTINCT c.id, c.name FROM clients c JOIN jobcards j ON j.client_id = c.id JOIN jobcard_assignments ja ON ja.jobcard_id = j.id AND ja.user_id = :user ORDER BY c.name');
$reportClientsStmt->execute(['user' => $user['id']]);
$reportClientsStmt = db()->prepare('SELECT DISTINCT c.id, c.name FROM clients c JOIN jobcards j ON j.client_id = c.id JOIN jobcard_assignments ja ON ja.jobcard_id = j.id AND ja.user_id = ? ORDER BY c.name');
$reportClientsStmt->execute([(int)$user['id']]);
$reportClients = $reportClientsStmt->fetchAll();
} else {
$reportClients = db()->query('SELECT id, name FROM clients ORDER BY name')->fetchAll();