Update the remaining logic to take advantage of the moved contact_primary and contact_location fields

This commit is contained in:
johnnyq
2023-07-03 20:16:39 -04:00
parent 85c19e36c6
commit a5100ea187
34 changed files with 68 additions and 89 deletions

View File

@@ -328,7 +328,7 @@ if (isset($_GET['email_quote'])) {
$sql = mysqli_query($mysqli,"SELECT * FROM quotes
LEFT JOIN clients ON quote_client_id = client_id
LEFT JOIN contacts ON contact_id = primary_contact
LEFT JOIN contacts ON clients.client_id = contacts.contact_client_id AND contact_primary = 1
WHERE quote_id = $quote_id"
);