From ac2dd049590acbf11b343d4eeca772900bfb3461 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Wed, 18 Jun 2025 16:56:40 -0400 Subject: [PATCH] Moved Has Base Vendor Template Icon to the the end of the Vendors Table listing --- vendors.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/vendors.php b/vendors.php index 90a03f90..9278357b 100644 --- a/vendors.php +++ b/vendors.php @@ -19,6 +19,7 @@ $sql = mysqli_query( $mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM vendors LEFT JOIN clients ON client_id = vendor_client_id + LEFT JOIN vendor_templates ON vendors.vendor_template_id = vendor_templates.vendor_template_id WHERE vendor_$archive_query 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%') $client_query @@ -139,6 +140,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); Website + Action @@ -183,8 +185,13 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); $vendor_created_at = nullable_htmlentities($row['vendor_created_at']); $vendor_archived_at = nullable_htmlentities($row['vendor_archived_at']); $vendor_template_id = intval($row['vendor_template_id']); + $vendor_template_name = nullable_htmlentities($row['vendor_template_name']); + if ($vendor_template_id) { + $vendor_template_display = "
$vendor_template_name
"; + } else { + $vendor_template_display = ""; + } - ?> @@ -201,7 +208,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
"; } ?>
+
@@ -229,6 +236,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); +