fix: remove remaining named report parameter
This commit is contained in:
+2
-2
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user