Leads: clients marked as leads are left out of the client pickers in record windows, bulk edits, Dispatch, the client switcher, the transaction filter and export, report pickers and coverage, template reports and use windows, agent banners, portal announcements, RMM client linking and managed instances, keeping the record's own client and the lead whose page it is; quote pickers keep leads after the clients marked Lead, global search lists them after matching clients marked Lead, new clientNotLeadSql helper, 26.11.9 changelog entries

This commit is contained in:
johnnyq
2026-11-18 12:21:25 -05:00
parent 34fa126a35
commit 00724866e3
47 changed files with 70 additions and 51 deletions

View File

@@ -114,7 +114,7 @@ if (!managerEnabled()) { ?>
<select class="form-select select2" name="client_id">
<option value="0">- None - one of your own -</option>
<?php
$sql_clients = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE client_archived_at IS NULL OR client_id = $client_id ORDER BY client_name ASC");
$sql_clients = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE (client_archived_at IS NULL OR client_id = $client_id)" . clientNotLeadSql($client_id) . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql_clients)) { ?>
<option value="<?= intval($row['client_id']) ?>" <?= intval($row['client_id']) === $client_id ? 'selected' : '' ?><?= selectOptionClient($row['client_id'], $row['client_name'], $row['client_abbreviation'] ?? '') ?>><?= escapeHtml($row['client_name']) ?></option>
<?php } ?>