mirror of
https://github.com/itflow-org/itflow
synced 2026-03-25 06:45:40 +00:00
Fix Creating Scheduled Tickets under Main Scheduled Tickets - Was assigning the primary contact the old way changed it to the new way
This commit is contained in:
@@ -655,10 +655,11 @@ if (isset($_POST['add_scheduled_ticket'])) {
|
|||||||
require_once('post/scheduled_ticket_model.php');
|
require_once('post/scheduled_ticket_model.php');
|
||||||
$start_date = sanitizeInput($_POST['start_date']);
|
$start_date = sanitizeInput($_POST['start_date']);
|
||||||
|
|
||||||
|
// If no contact is selected automatically choose the primary contact for the client
|
||||||
if ($client_id > 0 && $contact_id == 0) {
|
if ($client_id > 0 && $contact_id == 0) {
|
||||||
$sql = mysqli_query($mysqli, "SELECT primary_contact FROM clients WHERE client_id = $client_id");
|
$sql = mysqli_query($mysqli,"SELECT contact_id FROM contacts WHERE contact_client_id = $client_id AND contact_primary = 1");
|
||||||
$row = mysqli_fetch_array($sql);
|
$row = mysqli_fetch_array($sql);
|
||||||
$contact_id = intval($row['primary_contact']);
|
$contact_id = intval($row['contact_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add scheduled ticket
|
// Add scheduled ticket
|
||||||
|
|||||||
Reference in New Issue
Block a user