mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
DB Optimizing in Ticket Selections and relogicify mark billable also more logging
This commit is contained in:
@@ -25,8 +25,9 @@ if (isset($_POST['add_ticket'])) {
|
||||
$asset_id = intval($_POST['asset']);
|
||||
$location_id = intval($_POST['location']);
|
||||
$project_id = intval($_POST['project']);
|
||||
$use_primary_contact = intval($_POST['use_primary_contact']);
|
||||
$use_primary_contact = intval($_POST['use_primary_contact'] ?? 0);
|
||||
$ticket_template_id = intval($_POST['ticket_template_id']);
|
||||
$billable = intval($_POST['billable'] ?? 0);
|
||||
|
||||
// Add the primary contact as the ticket contact if "Use primary contact" is checked
|
||||
if ($use_primary_contact == 1) {
|
||||
@@ -35,12 +36,6 @@ if (isset($_POST['add_ticket'])) {
|
||||
$contact = intval($row['contact_id']);
|
||||
}
|
||||
|
||||
if (!isset($_POST['billable'])) {
|
||||
$billable = 1;
|
||||
} else {
|
||||
$billable = intval($_POST['billable']);
|
||||
}
|
||||
|
||||
//Get the next Ticket Number and add 1 for the new ticket number
|
||||
$ticket_number = $config_ticket_next_number;
|
||||
$new_config_ticket_next_number = $config_ticket_next_number + 1;
|
||||
@@ -170,10 +165,10 @@ if (isset($_POST['edit_ticket'])) {
|
||||
|
||||
$ticket_id = intval($_POST['ticket_id']);
|
||||
$contact_id = intval($_POST['contact']);
|
||||
$notify = intval($_POST['contact_notify']);
|
||||
$notify = intval($_POST['contact_notify'] ?? 0);
|
||||
$category_id = intval($_POST['category']);
|
||||
$ticket_subject = sanitizeInput($_POST['subject']);
|
||||
$billable = intval($_POST['billable']);
|
||||
$billable = intval($_POST['billable'] ?? 0);
|
||||
$ticket_priority = sanitizeInput($_POST['priority']);
|
||||
$details = mysqli_real_escape_string($mysqli, $_POST['details']);
|
||||
$vendor_ticket_number = sanitizeInput($_POST['vendor_ticket_number']);
|
||||
|
||||
Reference in New Issue
Block a user