Fix var name in client edit post

This commit is contained in:
johnnyq 2024-11-17 14:59:54 -05:00
parent 9c24a780be
commit acec430e28
2 changed files with 3 additions and 3 deletions

View File

@ -149,7 +149,7 @@ if (isset($_POST['edit_client'])) {
// Logging
logAction("Client", "Edit", "$session_name edited client $name", $client_id, $client_id);
$_SESSION['alert_message'] = "Client <strong>$client_name</strong> updated";
$_SESSION['alert_message'] = "Client <strong>$name</strong> updated";
header("Location: " . $_SERVER["HTTP_REFERER"]);
}

View File

@ -3,10 +3,10 @@ $name = sanitizeInput($_POST['name']);
$type = sanitizeInput($_POST['type']);
$website = preg_replace("(^https?://)", "", sanitizeInput($_POST['website']));
$referral = sanitizeInput($_POST['referral']);
$rate = floatval($_POST['rate']);
$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']);
$tax_id_number = sanitizeInput($_POST['tax_id_number'] ?? '');
$abbreviation = sanitizeInput($_POST['abbreviation']);
$notes = sanitizeInput($_POST['notes']);
$lead = intval($_POST['lead'] ?? 0);