From 43a7b7faa54276c73449d2644ffaa4f5fa76b719 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Mon, 3 Nov 2025 17:08:55 -0500 Subject: [PATCH] [Feature] Allow searching quote via Global Search --- agent/global_search.php | 64 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/agent/global_search.php b/agent/global_search.php index 28c89007..47c863d5 100644 --- a/agent/global_search.php +++ b/agent/global_search.php @@ -109,11 +109,20 @@ if (isset($_GET['query'])) { ORDER BY credential_id DESC LIMIT 5" ); + $sql_quotes = mysqli_query($mysqli, "SELECT * FROM quotes + LEFT JOIN clients ON quote_client_id = client_id + LEFT JOIN categories ON quote_category_id = category_id + WHERE quote_archived_at IS NULL + AND (CONCAT(quote_prefix,quote_number) LIKE '%$query%' OR quote_number LIKE '%$query%' OR quote_scope LIKE '%$query%') + $access_permission_query + ORDER BY quote_number DESC LIMIT 5" + ); + $sql_invoices = mysqli_query($mysqli, "SELECT * FROM invoices LEFT JOIN clients ON invoice_client_id = client_id LEFT JOIN categories ON invoice_category_id = category_id WHERE invoice_archived_at IS NULL - AND (CONCAT(invoice_prefix,invoice_number) LIKE '%$query%' OR invoice_scope LIKE '%$query%') + AND (CONCAT(invoice_prefix,invoice_number) LIKE '%$query%' OR invoice_number LIKE '%$query%' OR invoice_scope LIKE '%$query%') $access_permission_query ORDER BY invoice_number DESC LIMIT 5" ); @@ -628,6 +637,57 @@ if (isset($_GET['query'])) { + 0) { ?> + + + +
+
+
+
Quotes
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
NumberStatusAmountClient
+
+
+
+ + + 0) { ?> @@ -662,7 +722,7 @@ if (isset($_GET['query'])) { ?> - +