mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 10:54:52 +00:00
Client Overview - Enhance Recently Updated section
- Move the asset warranty expiring and stale ticket queries out of inc_all_client.php and into client_overview.php, there is no need to load this data on every page load - just for the overview - Show recently updated documents (in addition to contacts/vendors) - General tidy
This commit is contained in:
@@ -213,38 +213,6 @@ if (isset($_GET['client_id'])) {
|
||||
));
|
||||
$num_certs_expiring = intval($row['num']);
|
||||
|
||||
// Get Asset Warranties Expiring
|
||||
$sql_asset_warranties_expiring = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM assets
|
||||
WHERE asset_client_id = $client_id
|
||||
AND asset_warranty_expire IS NOT NULL
|
||||
AND asset_archived_at IS NULL
|
||||
AND asset_warranty_expire < CURRENT_DATE + INTERVAL 90 DAY
|
||||
ORDER BY asset_warranty_expire DESC"
|
||||
);
|
||||
|
||||
// Get Assets Retiring
|
||||
$sql_asset_retire = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM assets
|
||||
WHERE asset_client_id = $client_id
|
||||
AND asset_install_date IS NOT NULL
|
||||
AND asset_archived_at IS NULL
|
||||
AND asset_install_date + INTERVAL 7 YEAR < CURRENT_DATE + INTERVAL 90 DAY
|
||||
ORDER BY asset_install_date DESC"
|
||||
);
|
||||
|
||||
// Get Stale Tickets
|
||||
$sql_tickets_stale = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM tickets
|
||||
WHERE ticket_client_id = $client_id
|
||||
AND ticket_created_at < CURRENT_DATE - INTERVAL 14 DAY
|
||||
AND ticket_status != 'Closed'
|
||||
ORDER BY ticket_created_at DESC"
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user