CHNAGE_BDS_CLIENTLIST_WITH_DOB
This commit is contained in:
parent
f94fdb53d9
commit
900533bf6f
@ -3679,7 +3679,10 @@ class ClientController extends AdminController
|
||||
{
|
||||
// ---------for client-----------------------------------------------------------------------------
|
||||
|
||||
$clients = $this->clientModel->where('is_active', 1)->findAll();
|
||||
$clients = $this->clientModel
|
||||
->select("*, DATE_FORMAT(dob, '%d-%m-%Y') as dob")
|
||||
->where('is_active', 1)
|
||||
->findAll();
|
||||
|
||||
$clientIds = array_column($clients, 'id');
|
||||
|
||||
@ -3814,7 +3817,7 @@ class ClientController extends AdminController
|
||||
// Add additional fields if client type is 2
|
||||
if ($client_type == 2) {
|
||||
$client_data = array_merge($client_data, [
|
||||
'dob' => $postData['dob'],
|
||||
'dob' => change_date_format($postData['dob'],'d/m/Y','Y-m-d'),
|
||||
'aadhar' => $postData['aadhar'],
|
||||
'phone' => $postData['phone'],
|
||||
'email' => $postData['email'],
|
||||
|
||||
@ -802,8 +802,8 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="cost_center">PAN<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="pan" placeholder="Enter PAN No" name="pan" onchange="validateInput(this, 'clients', 'pan')" required>
|
||||
<label for="cost_center">PAN</label>
|
||||
<input type="text" class="form-control" id="pan" placeholder="Enter PAN No" name="pan" onchange="validateInput(this, 'clients', 'pan')">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -828,8 +828,13 @@
|
||||
<input type="email" class="form-control" id="email" placeholder="Enter Email" name="email">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="cost_center">PAN</label>
|
||||
<input type="text" class="form-control" id="pan" placeholder="Enter PAN No" name="pan" onchange="validateInput(this, 'clients', 'pan')">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="aadhar">Aadhar<span class="text-danger">*</span></label>
|
||||
<label for="aadhar">Aadhar</label>
|
||||
<input type="text" class="form-control" id="aadhar" placeholder="Enter Aadher No" name="aadhar" maxlength="12" onchange="validateInput(this, 'clients', 'aadhar')">
|
||||
</div>
|
||||
|
||||
@ -1052,6 +1057,9 @@ $(document).ready(function(){
|
||||
}
|
||||
});
|
||||
|
||||
$('#aadhar').attr('data-parsley-required', 'false');
|
||||
$('#aadhar').removeAttr('required');
|
||||
|
||||
|
||||
team_id = <?php echo json_encode(user_team()); ?>;
|
||||
console.log('team_id', team_id);
|
||||
@ -3129,6 +3137,12 @@ $("#client_form").submit(function(event) {
|
||||
console.log('client_type', $('#client_type').val());
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
|
||||
$('#aadhar').attr('data-parsley-required', 'false');
|
||||
$('#aadhar').removeAttr('required');
|
||||
|
||||
|
||||
isClientFormSubmitting = true;
|
||||
var isValid = $('#client_form').parsley().validate();
|
||||
if (!isValid) {
|
||||
|
||||
@ -737,7 +737,8 @@ function appendClients(data)
|
||||
|
||||
let client_show_name = item.client_name;
|
||||
if (item.client_type == 2) {
|
||||
client_show_name = item.client_name + ' - ' + (item.pan ?? 'N/A');
|
||||
client_show_name = item.client_name + ' - ' + (item.dob ?? 'N/A');
|
||||
// console.log(client_show_name);
|
||||
}
|
||||
|
||||
var option = $('<option>', {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user