mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04:52 +00:00
After ticket Creation Redirect to ticket details with Client Side bar and Top bar, Remove Currency code from Client Add / Edit defaults to company currency for now
This commit is contained in:
@@ -36,7 +36,7 @@ if (isset($_POST['add_client'])) {
|
||||
$extended_log_description = '';
|
||||
|
||||
// Create client
|
||||
mysqli_query($mysqli, "INSERT INTO clients SET client_name = '$name', client_type = '$type', client_website = '$website', client_referral = '$referral', client_rate = $rate, client_currency_code = '$currency_code', client_net_terms = $net_terms, client_tax_id_number = '$tax_id_number', client_lead = $lead, client_abbreviation = '$abbreviation', client_notes = '$notes', client_accessed_at = NOW()");
|
||||
mysqli_query($mysqli, "INSERT INTO clients SET client_name = '$name', client_type = '$type', client_website = '$website', client_referral = '$referral', client_rate = $rate, client_currency_code = '$session_company_currency', client_net_terms = $net_terms, client_tax_id_number = '$tax_id_number', client_lead = $lead, client_abbreviation = '$abbreviation', client_notes = '$notes', client_accessed_at = NOW()");
|
||||
|
||||
$client_id = mysqli_insert_id($mysqli);
|
||||
|
||||
@@ -133,7 +133,7 @@ if (isset($_POST['edit_client'])) {
|
||||
|
||||
$client_id = intval($_POST['client_id']);
|
||||
|
||||
mysqli_query($mysqli, "UPDATE clients SET client_name = '$name', client_type = '$type', client_website = '$website', client_referral = '$referral', client_rate = $rate, client_currency_code = '$currency_code', client_net_terms = $net_terms, client_tax_id_number = '$tax_id_number', client_lead = $lead, client_abbreviation = '$abbreviation', client_notes = '$notes' WHERE client_id = $client_id");
|
||||
mysqli_query($mysqli, "UPDATE clients SET client_name = '$name', client_type = '$type', client_website = '$website', client_referral = '$referral', client_rate = $rate, client_net_terms = $net_terms, client_tax_id_number = '$tax_id_number', client_lead = $lead, client_abbreviation = '$abbreviation', client_notes = '$notes' WHERE client_id = $client_id");
|
||||
|
||||
// Create Referral if it doesn't exist
|
||||
$sql = mysqli_query($mysqli, "SELECT category_name FROM categories WHERE category_type = 'Referral' AND category_archived_at IS NULL AND category_name = '$referral'");
|
||||
|
||||
@@ -6,7 +6,6 @@ $type = sanitizeInput($_POST['type']);
|
||||
$website = preg_replace("(^https?://)", "", sanitizeInput($_POST['website']));
|
||||
$referral = sanitizeInput($_POST['referral']);
|
||||
$rate = floatval($_POST['rate'] ?? 0);
|
||||
$currency_code = sanitizeInput($_POST['currency_code'] ?? $session_company_currency); // So we dont have to to have a hidden form input if module sales is disabled
|
||||
$net_terms = intval($_POST['net_terms'] ?? $config_default_net_terms);
|
||||
$tax_id_number = sanitizeInput($_POST['tax_id_number'] ?? '');
|
||||
$abbreviation = sanitizeInput($_POST['abbreviation']);
|
||||
|
||||
@@ -183,7 +183,7 @@ if (isset($_POST['add_ticket'])) {
|
||||
|
||||
flash_alert("Ticket <strong>$config_ticket_prefix$ticket_number</strong> created");
|
||||
|
||||
redirect("ticket.php?ticket_id=$ticket_id");
|
||||
redirect("ticket.php?client_id=$client_id&ticket_id=$ticket_id");
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user