Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
6fe74739b1
@ -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>
|
||||
|
||||
@ -827,9 +827,8 @@
|
||||
<label for="cost_center">Email<span class="text-danger">*</span></label>
|
||||
<input type="email" class="form-control" id="email" placeholder="Enter Email" name="email">
|
||||
</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 +1051,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);
|
||||
@ -2655,7 +2657,7 @@ function appendOwner(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');
|
||||
}
|
||||
|
||||
var option = $('<option>', {
|
||||
@ -3129,6 +3131,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) {
|
||||
@ -3525,7 +3533,8 @@ $('#client_type').on('change', function() {
|
||||
|
||||
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 ?? '') + (item.pan ?? '');
|
||||
client_show_name = item.client_name + (item.dob ? ('- (' + item.dob + ' )' ) : '') + (item.pan ? ('- ' + item.pan ) : '');
|
||||
}
|
||||
var option = $('<option>', {
|
||||
value: item.id,
|
||||
|
||||
@ -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 ? ('- (' + item.dob + ' )' ) : '') + (item.pan ? ('- ' + item.pan ) : '');
|
||||
// console.log(client_show_name);
|
||||
}
|
||||
|
||||
var option = $('<option>', {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user