From 8d05633d7deb7ab6635b728fa80c01d4d8f39d71 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sat, 22 Feb 2025 14:02:31 -0500 Subject: [PATCH] Auto set client abbreviation if not set in add or edit client --- post/user/client_model.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/post/user/client_model.php b/post/user/client_model.php index 00255d86..c08352ff 100644 --- a/post/user/client_model.php +++ b/post/user/client_model.php @@ -10,5 +10,8 @@ $currency_code = sanitizeInput($_POST['currency_code'] ?? $session_company_curre $net_terms = intval($_POST['net_terms'] ?? $config_default_net_terms); $tax_id_number = sanitizeInput($_POST['tax_id_number'] ?? ''); $abbreviation = sanitizeInput($_POST['abbreviation']); +if (empty($abbreviation)) { + $abbreviation = shortenClient($name); +} $notes = sanitizeInput($_POST['notes']); $lead = intval($_POST['lead'] ?? 0);