From c94c88dc88c67a35793c892003ea8068b1271ffb Mon Sep 17 00:00:00 2001 From: johnnyq Date: Tue, 31 Oct 2023 16:16:15 -0400 Subject: [PATCH] Show Archived Items for locations, vendors and assets and moved import exports to New DropDown --- client_assets.php | 26 ++++++++++++++++++++++---- client_locations.php | 26 ++++++++++++++++++++++---- client_tickets.php | 15 +++++++++++---- client_vendors.php | 19 +++++++++++++++---- 4 files changed, 70 insertions(+), 16 deletions(-) diff --git a/client_assets.php b/client_assets.php index fde2e052..51980e6e 100644 --- a/client_assets.php +++ b/client_assets.php @@ -63,7 +63,7 @@ $sql = mysqli_query( LEFT JOIN locations ON asset_location_id = location_id LEFT JOIN logins ON login_asset_id = asset_id WHERE asset_client_id = $client_id - AND asset_archived_at IS NULL + AND asset_$archive_query AND (asset_name LIKE '%$q%' OR asset_description LIKE '%$q%' OR asset_type LIKE '%$q%' OR asset_ip LIKE '%$q%' OR asset_make LIKE '%$q%' OR asset_model LIKE '%$q%' OR asset_serial LIKE '%$q%' OR asset_os LIKE '%$q%' OR contact_name LIKE '%$q%' OR location_name LIKE '%$q%') AND ($type_query) ORDER BY $sort $order LIMIT $record_from, $record_to" @@ -77,13 +77,28 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));

Assets

- +
+ + + +
+
@@ -123,8 +138,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
- - + + Archived + + Archived +
diff --git a/client_locations.php b/client_locations.php index 754c9340..d4037580 100644 --- a/client_locations.php +++ b/client_locations.php @@ -14,7 +14,7 @@ $sql = mysqli_query( $mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM locations WHERE location_client_id = $client_id - AND location_archived_at IS NULL + AND location_$archive_query AND (location_name LIKE '%$q%' OR location_address LIKE '%$q%' OR location_phone LIKE '%$phone_query%') ORDER BY location_primary DESC, $sort $order LIMIT $record_from, $record_to" ); @@ -27,12 +27,27 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));

Locations

- +
+ + + +
+
@@ -46,8 +61,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
- - + + Archived + + Archived +
diff --git a/client_tickets.php b/client_tickets.php index 9854649a..45d81c8e 100644 --- a/client_tickets.php +++ b/client_tickets.php @@ -31,9 +31,17 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));

Tickets

- +
+ + + +
@@ -52,7 +60,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
diff --git a/client_vendors.php b/client_vendors.php index 30320a64..515bc2d8 100644 --- a/client_vendors.php +++ b/client_vendors.php @@ -14,7 +14,7 @@ $sql = mysqli_query( $mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM vendors WHERE vendor_client_id = $client_id - AND vendor_archived_at IS NULL + AND vendor_$archive_query AND vendor_template = 0 AND (vendor_name LIKE '%$q%' OR vendor_description LIKE '%$q%' OR vendor_account_number LIKE '%$q%' OR vendor_website LIKE '%$q%' OR vendor_contact_name LIKE '%$q%' OR vendor_email LIKE '%$q%' OR vendor_phone LIKE '%$phone_query%') ORDER BY $sort $order LIMIT $record_from, $record_to"); @@ -34,7 +34,13 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
@@ -42,6 +48,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
+
@@ -54,8 +61,12 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
- +
+ + Archived + + Archived +