Client Overview do not count Archived Clients entities and in services do not show services of archived clients

This commit is contained in:
johnnyq
2025-07-22 15:46:17 -04:00
parent 4c031c8f83
commit 38b2a94231
2 changed files with 10 additions and 9 deletions

View File

@@ -36,6 +36,7 @@ $sql = mysqli_query(
"SELECT SQL_CALC_FOUND_ROWS * FROM services
LEFT JOIN clients ON client_id = service_client_id
WHERE (service_name LIKE '%$q%' OR service_description LIKE '%$q%' OR service_category LIKE '%$q%' OR client_name LIKE '%$q%')
AND client_archived_at IS NULL
$access_permission_query
$client_query
ORDER BY $sort $order LIMIT $record_from, $record_to"