mirror of
https://github.com/itflow-org/itflow
synced 2026-09-01 12:25:11 +00:00
Email Invoice Only shows Billing and Primary, Quote shows Important Billing, Primary and Technical contacts that can be selected
This commit is contained in:
@@ -106,15 +106,15 @@ if (isset($_GET['invoice_id'])) {
|
||||
}
|
||||
$company_logo = escapeHtml($row['company_logo']);
|
||||
|
||||
// Send Email used to be gated on the PRIMARY contact having an email, which
|
||||
// hid the button on a client whose only emailable contact was a billing or
|
||||
// secondary one. The modal can send to any of them, so gate on whether the
|
||||
// client has anybody reachable at all.
|
||||
// Must use the same rule as the Send Email picker in
|
||||
// modals/invoice/invoice_email.php, or the button offers a modal that then
|
||||
// reports there is nobody to send to.
|
||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT(contact_id) AS emailable_contacts FROM contacts
|
||||
WHERE contact_client_id = $client_id
|
||||
AND contact_archived_at IS NULL
|
||||
AND contact_email IS NOT NULL
|
||||
AND contact_email != ''"));
|
||||
AND contact_email != ''
|
||||
" . documentContactFilterSql('invoice')));
|
||||
$emailable_contacts = intval($row['emailable_contacts']);
|
||||
|
||||
$sql_history = mysqli_query($mysqli, "SELECT history_created_at, history_description, history_status FROM history WHERE history_invoice_id = $invoice_id ORDER BY history_id DESC");
|
||||
|
||||
Reference in New Issue
Block a user