🚀 مُصادَق: تحديث برمجي جديد 2026-05-03 14:02
This commit is contained in:
@@ -33,8 +33,8 @@ final class DashboardController
|
||||
$stmt->execute($params);
|
||||
$statusCounts = $stmt->fetchAll();
|
||||
|
||||
// 3. Recent Activity
|
||||
$stmt = $db->prepare("SELECT i.*, c.name as company_name FROM invoices i JOIN companies c ON i.company_id = c.id {$where} ORDER BY i.created_at DESC LIMIT 5");
|
||||
// 3. Recent Activity - Fixed ambiguity
|
||||
$stmt = $db->prepare("SELECT i.*, c.name as company_name FROM invoices i JOIN companies c ON i.company_id = c.id WHERE i.tenant_id = ? " . ($role !== 'super_admin' ? " AND i.company_id = ?" : "") . " ORDER BY i.created_at DESC LIMIT 5");
|
||||
$stmt->execute($params);
|
||||
$recent = $stmt->fetchAll();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user