From 0a475ffb14409d59c90fab9f3819fcf88a0aa181 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Fri, 18 Jul 2025 14:30:32 +0530 Subject: [PATCH] CHANGE_CLIENT_SHORT_NAME_IN_EVERY_PLACE : RV --- app/Views/leads_form.php | 4 +-- app/Views/leads_form_handler.php | 43 +++++++++++++++++++++----------- app/Views/leads_non_eb.php | 4 +-- app/Views/newClientModal.php | 26 ++++++++++++++----- 4 files changed, 53 insertions(+), 24 deletions(-) diff --git a/app/Views/leads_form.php b/app/Views/leads_form.php index 01586d13..76b6ef5e 100644 --- a/app/Views/leads_form.php +++ b/app/Views/leads_form.php @@ -207,7 +207,7 @@
+ placeholder="Enter Client Short Name" onkeyup="validateInput(this, 'clients', 'short_name')" required>
- +
@@ -104,7 +104,7 @@
- +
@@ -117,6 +117,17 @@ let isGSTValid = false; function validateInputForClient(input, table, field) { + + let owner_type = $('#Owner_type').val(); + let client_type = $('#client_type').val(); + + console.log('owner_type', owner_type); + console.log('client_type', client_type); + + if((client_type == 2 || owner_type == 2) && field == 'short_name'){ + return; + } + let value = $(input).val(); if (!value) return; @@ -132,12 +143,15 @@ isGSTValidating = false; if (isDuplicate) { toastr.warning(message, 'WARNING'); - $(input).val(''); + // $(input).val(''); isGSTValid = false; - } else { - isGSTValid = true; - } + $('#client_add_modal_submit_btn').prop('disabled', true); + } else { + isGSTValid = true; + $('#client_add_modal_submit_btn').prop('disabled', false); + } }); + $('#hide_smbt_btn button').prop('disabled', false); }