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);
}