CHANGE_INSURER_TPA_CLIENT_AND_OTHERS_FIELDS : RV
This commit is contained in:
parent
e884e93fc6
commit
91ec327d19
@ -107,7 +107,7 @@ class ClientController extends AdminController
|
||||
|
||||
}
|
||||
|
||||
public function Testing()
|
||||
public function Testing() //this function for only tsesting some logics not use for business logic
|
||||
{
|
||||
$results = $this->clientPolicyModel
|
||||
->select('id, policy_terms')
|
||||
@ -312,11 +312,12 @@ class ClientController extends AdminController
|
||||
// ];
|
||||
|
||||
$subTypeOptions = [
|
||||
1 => 'Replenishment',
|
||||
1 => 'Replenishment By Client',
|
||||
2 => 'Adjustment',
|
||||
3 => 'Refund From Deletion',
|
||||
4 => 'Debit',
|
||||
5 => 'Asset Policy',
|
||||
5 => 'Non EB',
|
||||
6 => 'Refund By Insurer',
|
||||
];
|
||||
|
||||
$data['subTypeOptions'] = $subTypeOptions;
|
||||
@ -448,7 +449,6 @@ class ClientController extends AdminController
|
||||
{
|
||||
$this->myLogger->logme('error','edit client general info function called');
|
||||
$uploadFilePath = ROOTPATH . 'public/uploads/logo/';
|
||||
// print_r($this->request->getFile('client_logo'));die;
|
||||
$file_name = file_Upload($this->request->getFile('client_logo'), $uploadFilePath);
|
||||
$id = $this->request->getPost('PrimaryKey');
|
||||
|
||||
@ -637,6 +637,11 @@ class ClientController extends AdminController
|
||||
|
||||
$this->myLogger->logme('error','Client branch CREATE function called');
|
||||
$data = $this->request->getPost();
|
||||
if (!isset($data['sez'])) {
|
||||
$data['sez'] = 0;
|
||||
} elseif ($data['sez']) {
|
||||
$data['sez'] = 1;
|
||||
}
|
||||
$data['created_by'] = get_session_userid();
|
||||
$insert = $this->clientBranchModel->insert($data);
|
||||
|
||||
@ -672,6 +677,11 @@ class ClientController extends AdminController
|
||||
$id = $this->request->getPost('branch_id_primarykey');
|
||||
$client_id = $this->request->getPost('client_id');
|
||||
$data = $this->request->getPost();
|
||||
if (!isset($data['sez'])) {
|
||||
$data['sez'] = 0;
|
||||
} elseif ($data['sez']) {
|
||||
$data['sez'] = 1;
|
||||
}
|
||||
$data['updated_by'] = get_session_userid();
|
||||
$insert = $this->clientBranchModel->update($id, $data);
|
||||
$this->myLogger->logme('error','Client branch EDITED by {data}', ['data' => get_session_userid()]);
|
||||
@ -1270,16 +1280,26 @@ class ClientController extends AdminController
|
||||
public function getClientPolicyById($id=null)
|
||||
{
|
||||
$this->myLogger->logme('error','getClientPolicyById function called');
|
||||
|
||||
if($id){
|
||||
$client_policy_data = $this->clientPolicyModel->where(['id' => $id, 'is_active' => 1])->first();
|
||||
$insurer_id = $client_policy_data['insurer_id'];
|
||||
$client_id = $client_policy_data['client_id'];
|
||||
$polices = $this->policesModel->where(['insurer_id' => $insurer_id, 'is_active' => 1])->findAll();
|
||||
|
||||
$base_policy_policy_type_id = 0;
|
||||
if($client_policy_data['base_policy'] != null){
|
||||
$base_policy_policy_type_id = $this->clientPolicyModel->select('policy_type_id')->where(['id' => $client_policy_data['base_policy'], 'is_active' => 1])->first();
|
||||
}
|
||||
|
||||
$polices = $this->policesModel
|
||||
->select('policies.*, policy_type.policy_type')
|
||||
->join('policy_type', 'policy_type.id = policies.policy_type_id')
|
||||
->where(['policies.insurer_id' => $insurer_id, 'policies.is_active' => 1])
|
||||
->findAll();
|
||||
$client_policy_list = $this->clientPolicyModel->getpolicyWithPattern( $client_id );
|
||||
$cd_data = $this->CDMasterModel->where('client_id', $client_id)->where('insurer_id', $insurer_id)->findAll();
|
||||
|
||||
|
||||
return $this->respond(['status' => true,'code' => 200, 'client_policy_list' => $client_policy_list, 'data' => $client_policy_data, 'cd_data' => $cd_data, "insurer_id" => $client_policy_data['insurer_id'], 'policy' => $polices], 200);
|
||||
return $this->respond(['status' => true,'code' => 200, 'client_policy_list' => $client_policy_list, 'data' => $client_policy_data, 'cd_data' => $cd_data, "insurer_id" => $client_policy_data['insurer_id'], 'policy' => $polices, 'base_policy_type_id' => $base_policy_policy_type_id['policy_type_id']], 200);
|
||||
}else{
|
||||
return $this->respond(['status' => false,'code' => 404, 'message' => 'no data found'], 200);
|
||||
}
|
||||
@ -2266,7 +2286,8 @@ class ClientController extends AdminController
|
||||
|
||||
|
||||
|
||||
public function get_cd_ac($client_id, $insurer_id){
|
||||
public function get_cd_ac($client_id, $insurer_id)
|
||||
{
|
||||
|
||||
$cd_data = $this->CDMasterModel
|
||||
->where('client_id', $client_id)
|
||||
@ -2307,7 +2328,8 @@ class ClientController extends AdminController
|
||||
}
|
||||
|
||||
|
||||
public function checkPolicyType($policy_type_id, $client_branch_id, $client_id){
|
||||
public function checkPolicyType($policy_type_id, $client_branch_id, $client_id)
|
||||
{
|
||||
|
||||
$policyCount = $this->clientPolicyModel
|
||||
->where('policy_type_id', $policy_type_id)
|
||||
@ -2372,7 +2394,8 @@ class ClientController extends AdminController
|
||||
|
||||
|
||||
|
||||
public function getPolicyTermsFormJson($policy_type_id){
|
||||
public function getPolicyTermsFormJson($policy_type_id)
|
||||
{
|
||||
|
||||
$JSON = $this->policyTypeModel->where('id', $policy_type_id)->first();
|
||||
return $this->respond(['status' => true, 'data' => $JSON], 200);
|
||||
@ -2403,7 +2426,8 @@ class ClientController extends AdminController
|
||||
}
|
||||
|
||||
|
||||
public function checkAdditionPremiumJSON($client_id, $client_policy_id){
|
||||
public function checkAdditionPremiumJSON($client_id, $client_policy_id)
|
||||
{
|
||||
|
||||
$get_additional_rack_rate_relationship_json = $this->policyPremium2Model
|
||||
->where('client_id', $client_id)
|
||||
|
||||
@ -125,8 +125,6 @@ class MasterController extends AdminController
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function editInsurerOnboarding($id = null)
|
||||
{
|
||||
|
||||
@ -367,7 +365,6 @@ class MasterController extends AdminController
|
||||
// $this->loadLayout('insurer_onboarding', $data);
|
||||
}
|
||||
|
||||
|
||||
public function tpaRemove($id = null)
|
||||
{
|
||||
$this->myLogger->logme('error','TPA Remove function called');
|
||||
@ -382,8 +379,6 @@ class MasterController extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function removeTPABranch($id = null)
|
||||
{
|
||||
$this->myLogger->logme('error','TPA Branch Remove function called');
|
||||
@ -424,8 +419,6 @@ class MasterController extends AdminController
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function createTPAGeneralInfo()
|
||||
{
|
||||
|
||||
@ -483,12 +476,6 @@ class MasterController extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function createTPABranch()
|
||||
{
|
||||
|
||||
@ -521,8 +508,6 @@ class MasterController extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function editTPAOnboarding($id = null)
|
||||
{
|
||||
|
||||
@ -555,9 +540,6 @@ class MasterController extends AdminController
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function editTPAGeneralInfo()
|
||||
{
|
||||
$this->myLogger->logme('error','edit TPA general info function called');
|
||||
@ -624,7 +606,6 @@ class MasterController extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function editTPAGet($id = null)
|
||||
{
|
||||
$this->myLogger->logme('error','Edit TPA Onboarding function called');
|
||||
@ -639,7 +620,6 @@ class MasterController extends AdminController
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
public function editTPABranch()
|
||||
{
|
||||
$this->myLogger->logme('error','TPA branch CREATE function called');
|
||||
@ -680,7 +660,6 @@ class MasterController extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function tpaBranchList($id = null)
|
||||
{
|
||||
$this->myLogger->logme('error','TPA List function called');
|
||||
@ -693,14 +672,11 @@ class MasterController extends AdminController
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//Ends TPA Models
|
||||
|
||||
|
||||
|
||||
//Start KYC
|
||||
|
||||
|
||||
public function kycList()
|
||||
{
|
||||
$this->myLogger->logme('error','KYC list function called');
|
||||
|
||||
@ -19,6 +19,11 @@ class ClientBranchModel extends Model
|
||||
"created_by",
|
||||
"updated_by",
|
||||
"is_active",
|
||||
"pincode",
|
||||
"address1",
|
||||
"address2",
|
||||
"gst",
|
||||
"sez",
|
||||
];
|
||||
|
||||
public function getBranchAndContactByBranchId($branch_id){
|
||||
|
||||
@ -131,11 +131,12 @@ class ClientPolicyModel extends Model
|
||||
public function getinsurerswithclientid($id){
|
||||
|
||||
return $this->db->table('client_policy')
|
||||
->select('client_policy.*')
|
||||
->select('client_policy.*, cd_master.cd_ac_no')
|
||||
->select('insurers.name as insurer_name, insurers.short_name as insurer_short')
|
||||
->select('clients.client_name as client_name')
|
||||
->join('clients','clients.id=client_policy.client_id')
|
||||
->join('insurers', 'insurers.id = client_policy.insurer_id')
|
||||
->join('cd_master', 'cd_master.insurer_id = client_policy.insurer_id')
|
||||
->where('client_policy.client_id', $id)
|
||||
->groupBy('client_policy.insurer_id')
|
||||
->groupBy('client_policy.client_id', $id) // Group by insurer_id
|
||||
|
||||
@ -23,21 +23,22 @@ class InsurerModel extends Model
|
||||
|
||||
|
||||
|
||||
public function getCreatedByUserName(){
|
||||
public function getCreatedByUserName()
|
||||
{
|
||||
|
||||
return $this->db->table('insurers')
|
||||
->select('insurers.*')
|
||||
// ->select('user_profiles.first_name as user_name')
|
||||
// ->join('user_profiles', 'user_profiles.id = clients.created_by')
|
||||
->get()
|
||||
->getResult();
|
||||
|
||||
->getResult();
|
||||
}
|
||||
public function getInsurerName($insurerId)
|
||||
{
|
||||
// Fetch the insurer name based on the insurer ID
|
||||
$query = $this->select('id,name')
|
||||
->where('id', $insurerId)
|
||||
$query = $this->select('insurers.id,insurers.name, cd_master.cd_ac_no')
|
||||
->join('cd_master', 'cd_master.insurer_id = insurers.id')
|
||||
->where('insurers.id', $insurerId)
|
||||
->get();
|
||||
|
||||
if ($query->resultID->num_rows > 0) {
|
||||
@ -47,19 +48,6 @@ class InsurerModel extends Model
|
||||
|
||||
return null; // or handle accordingly if the insurer is not found
|
||||
}
|
||||
// public function getdepositData($id)
|
||||
// {
|
||||
// // Fetch the insurer name based on the insurer ID
|
||||
// $query = $this->db->table('cash_deposit')
|
||||
|
||||
|
||||
// ->get()
|
||||
|
||||
|
||||
// ->getResult();
|
||||
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ table.dataTable thead th {
|
||||
<th class="font-weight-medium">Insurer Name</th>
|
||||
<th class="font-weight-medium">Opening Date</th>
|
||||
<th class="font-weight-medium">CD Account No</th>
|
||||
<th class="font-weight-medium">Deposite Amount</th>
|
||||
<th class="font-weight-medium">Opening Amount</th>
|
||||
<th class="font-weight-medium">Date/User</th>
|
||||
<th class="font-weight-medium">Action</th>
|
||||
</tr>
|
||||
@ -85,7 +85,7 @@ table.dataTable thead th {
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="title">Add Cash Deposite</h4>
|
||||
<h4 class="modal-title" id="title">Add Opening Amount</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
|
||||
@ -140,8 +140,8 @@ table.dataTable thead th {
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="mobile">Deposite Amount<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="opening_bal" name="opening_bal" required>
|
||||
<label for="mobile">Opening Amount<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="opening_bal" name="opening_bal" onkeypress="return onlyNumbers(event)" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -215,7 +215,7 @@ table.dataTable thead th {
|
||||
$('#cd_ac_no').val('');
|
||||
$('#opening_bal').val('');
|
||||
$('#CDMasterForm').attr('action', '<?php echo base_url('master/cash_deposite/create');?>');
|
||||
$('#title').html('Add Cash Deposite');
|
||||
$('#title').html('Add Opening Amount');
|
||||
$('#btnSubmit').html('Submit');
|
||||
|
||||
|
||||
@ -237,7 +237,7 @@ table.dataTable thead th {
|
||||
$('body').on('click', '.btnEdit', function () {
|
||||
|
||||
var cd_id = $(this).attr('data-id');
|
||||
$('#title').html('Update Cash Deposite');
|
||||
$('#title').html('Update Opening Amount');
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo base_url('master/cash_deposite/list/');?>'+cd_id,
|
||||
@ -336,4 +336,11 @@ function removeCDMaster(element) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
function onlyNumbers(event) {
|
||||
var charcode;
|
||||
charcode = event.which || event.keyCode;
|
||||
if (charcode >= 48 && charcode <= 57 || charcode == 46) return true;
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@ -107,61 +107,12 @@ input:checked + .slider:before {
|
||||
<label for="pan">PAN<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="pan" placeholder="Enter PAN Number" data-parsley-error-message="Invalid PAN Number. Example: ABCDE1234F" value="<?= isset($client['pan']) ? $client['pan'] : '' ?>" name="pan" data-parsley-trigger="change" data-parsley-pattern="^[A-Z]{5}[0-9]{4}[A-Z]$" required>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<!-- <div class="form-group col-md-4">
|
||||
<label for="gst">GST<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="gst" placeholder="Enter GST Number" data-parsley-error-message="Invalid GST Number. Example: 12ABCDE1234F5Z6" value="<?= isset($client['gst']) ? $client['gst'] : '' ?>" name="gst" data-parsley-trigger="change" data-parsley-pattern="^\d{2}[A-Z]{5}\d{4}[A-Z]{1}[A-Z\d]{1}[Z]{1}[A-Z\d]{1}$" required>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="address1">Address 1<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="address1"
|
||||
placeholder="Enter Address 1" value="<?= isset($client['address1']) ? $client['address1'] : '' ?>" name="address1" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="address2">Address 2<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="address2"
|
||||
placeholder="Enter Address 2" value="<?= isset($client['address2']) ? $client['address2'] : '' ?>" name="address2" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="city">City<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="city"
|
||||
placeholder="Enter City" value="<?= isset($client['city']) ? $client['city'] : '' ?>" name="city" required>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="state">State<span
|
||||
class="text-danger">*</span></label>
|
||||
<select class="form-control" id="state" name="state" required>
|
||||
<option value="">Select State</option>
|
||||
<?php foreach($state as $value) { ?>
|
||||
<?php if(isset($client['state'])){ ?>
|
||||
<?php if($value['id'] == $client['state']) { ?>
|
||||
<option value="<?= $value['id'] ?>" selected><?= $value['state'] ?></option>
|
||||
<?php } else { ?>
|
||||
<option value="<?= $value['id'] ?>"><?= $value['state'] ?></option>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<option value="<?= $value['id'] ?>"><?= $value['state'] ?></option>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="pincode">Pincode<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="pincode"
|
||||
placeholder="Enter Pincode" onkeypress = "return onlyNumbers(event)" value="<?= isset($client['pincode']) ? $client['pincode'] : '' ?>" name="pincode" maxlength="6" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
|
||||
@ -51,7 +51,18 @@
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="address1">Address Line 1<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="address1" name="address1" placeholder="Enter Address 1" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="address2">Address Line 2<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="address2" placeholder="Enter Address 2" name="address2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="state">State<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="state" name="state" required>
|
||||
<option value="">Select State</option>
|
||||
@ -60,16 +71,35 @@
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="district">District<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="district" placeholder="Enter District"
|
||||
name="district" required>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="city">City<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="branch_city" placeholder="Enter City"
|
||||
name="city" required>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="gst">Pincode<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="pincode" placeholder="Enter Pincode" name="pincode" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="gst">GST<span class="text-danger">*</span></label>
|
||||
<input type="text" name="gst" class="form-control" id="gst" placeholder="Enter GST Number" data-parsley-error-message="Invalid GST Number. Example: 12ABCDE1234F5Z6" data-parsley-trigger="change" data-parsley-pattern="^\d{2}[A-Z]{5}\d{4}[A-Z]{1}[A-Z\d]{1}[Z]{1}[A-Z\d]{1}$" required>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label class="switch" style="position: relative;top: 43px;left: 20px;">
|
||||
<input id="sez" type="checkbox" name="sez">
|
||||
<span class="slider round" style="height: 27px;"></span>
|
||||
</label>
|
||||
|
||||
<label for="inception_type" style="position: relative;bottom: 5px;left: 85px;">SEZ</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@ -83,13 +113,17 @@
|
||||
name="name[]" id="name" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="last_name">Email<span class="text-danger">*</span></label>
|
||||
<input value="" type="text" class="form-control" placeholder="Enter Contact Email"
|
||||
name="email[]" id="email" data-parsley-trigger="change" data-parsley-type="email"
|
||||
required>
|
||||
<label for="designation">Designation<span class="text-danger">*</span></label>
|
||||
<input value="" type="text" class="form-control" placeholder="Enter Designation Name"
|
||||
name="designation[]" id="designation" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="last_name">Email<span class="text-danger">*</span></label>
|
||||
<input value="" type="text" class="form-control" placeholder="Enter Contact Email"
|
||||
name="email[]" id="email" data-parsley-trigger="change" data-parsley-type="email" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="mobile">Mobile<span class="text-danger">*</span></label>
|
||||
<input value="" type="text" class="form-control" placeholder="Enter Contact Mobile"
|
||||
@ -99,11 +133,6 @@
|
||||
data-parsley-required-message="Please enter a valid 10-digit mobile number."
|
||||
required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="designation">Designation<span class="text-danger">*</span></label>
|
||||
<input value="" type="text" class="form-control" placeholder="Enter Designation Name"
|
||||
name="designation[]" id="designation" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="display: flex;">
|
||||
<button style="margin-right: 10px;" type="button" class="btn btn-primary btn-sm ac"
|
||||
@ -224,7 +253,6 @@ $('#btnBranchAdd').click(function() {
|
||||
})
|
||||
|
||||
$('.btnBack').click(function() {
|
||||
|
||||
$('#add_branch').hide();
|
||||
$('#branch_table').show();
|
||||
$('.btnBack').hide();
|
||||
@ -408,11 +436,21 @@ $('body').on('click', '.btnBranchEdit', function() {
|
||||
$('#btnBranchAdd').hide();
|
||||
$('#branch_name').val(res.data.branch_name);
|
||||
$('#branch_code').val(res.data.branch_code);
|
||||
$('#pincode').val(res.data.pincode);
|
||||
$('#address1').val(res.data.address1);
|
||||
$('#address2').val(res.data.address2);
|
||||
$('#gst').val(res.data.gst);
|
||||
$('#state option[value="' + res.data.state + '"]').prop('selected', true);
|
||||
$('#district').val(res.data.district);
|
||||
$('#branch_city').val(res.data.city);
|
||||
$('#branch_PrimaryKey').val(res.data.id);
|
||||
|
||||
if(res.data.sez == 1){
|
||||
$('#sez').prop('checked', true);
|
||||
}else{
|
||||
$('#sez').prop('checked', false);
|
||||
}
|
||||
|
||||
$('#name').val(res.contact[0].name);
|
||||
$('#email').val(res.contact[0].email);
|
||||
$('#mobile').val(res.contact[0].mobile);
|
||||
@ -470,18 +508,18 @@ function appendContactHtml(contact = false, reset = false) {
|
||||
<input value="${contact !== undefined && contact !== false ? contact.name : ''}" type="text" class="form-control" placeholder="Enter Contact Name" name="name[]" id="${uniqueId}_name" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="${uniqueId}_last_name">Email<span class="text-danger">*</span></label>
|
||||
<input value="${contact !== undefined && contact !== false ? contact.email : ''}" type="text" class="form-control" placeholder="Enter Contact Email" name="email[]" id="${uniqueId}_email" data-parsley-trigger="change" data-parsley-type="email" required>
|
||||
<label for="${uniqueId}_designation">Designation<span class="text-danger">*</span></label>
|
||||
<input value="${contact !== undefined && contact !== false ? contact.designation : ''}" type="text" class="form-control" placeholder="Enter Designation Name" name="designation[]" id="${uniqueId}_designation" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="${uniqueId}_mobile">Mobile<span class="text-danger">*</span></label>
|
||||
<input value="${contact !== undefined && contact !== false ? contact.mobile : ''}" type="text" class="form-control" placeholder="Enter Contact Mobile" name="mobile[]" id="${uniqueId}_mobile" onchange="checkMobileNumber(this)" onkeypress = "return onlyNumbers(event)" maxlength="10" min="10" data-parsley-type-message="Please enter a valid 10-digit mobile number." data-parsley-required-message="Please enter a valid 10-digit mobile number." required>
|
||||
<label for="${uniqueId}_last_name">Email<span class="text-danger">*</span></label>
|
||||
<input value="${contact !== undefined && contact !== false ? contact.email : ''}" type="text" class="form-control" placeholder="Enter Contact Email" name="email[]" id="${uniqueId}_email" data-parsley-trigger="change" data-parsley-type="email" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="${uniqueId}_designation">Designation<span class="text-danger">*</span></label>
|
||||
<input value="${contact !== undefined && contact !== false ? contact.designation : ''}" type="text" class="form-control" placeholder="Enter Designation Name" name="designation[]" id="${uniqueId}_designation" required>
|
||||
<label for="${uniqueId}_mobile">Mobile<span class="text-danger">*</span></label>
|
||||
<input value="${contact !== undefined && contact !== false ? contact.mobile : ''}" type="text" class="form-control" placeholder="Enter Contact Mobile" name="mobile[]" id="${uniqueId}_mobile" onchange="checkMobileNumber(this)" onkeypress = "return onlyNumbers(event)" maxlength="10" min="10" data-parsley-type-message="Please enter a valid 10-digit mobile number." data-parsley-required-message="Please enter a valid 10-digit mobile number." required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="display: flex;">
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th class="font-weight-medium">Insurer Name</th>
|
||||
<th class="font-weight-medium">CD Account Number</th>
|
||||
<th class="font-weight-medium">Current Balance</th>
|
||||
<th class="font-weight-medium">Action</th>
|
||||
</tr>
|
||||
@ -30,9 +31,9 @@
|
||||
|
||||
<tr>
|
||||
<?php foreach ($clientData as $value): ?>
|
||||
<td>
|
||||
<?php echo $value->insurer_name;?>
|
||||
</td>
|
||||
|
||||
<td><?php echo $value->insurer_name;?></td>
|
||||
<td><?php echo $value->cd_ac_no;?></td>
|
||||
|
||||
<td>₹
|
||||
<?php
|
||||
@ -45,7 +46,6 @@
|
||||
echo "N/A"; // Display "Not Available" if balance information is not present
|
||||
}
|
||||
?>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<a class="dropdown-item"
|
||||
@ -53,13 +53,9 @@
|
||||
<i class="mdi mdi-eye mr-2 text-muted font-18 vertical-middle"></i>View Deposit
|
||||
</a>
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -58,7 +58,7 @@ table.dataTable thead th {
|
||||
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a class="dropdown-item" href="<?= base_url("client/list/"); ?><?= $row->id;?>"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||
<a class="dropdown-item" href="<?= base_url("client/deposit/{$row->id}"); ?>"><i class="mdi mdi-cash mr-2 text-muted font-18 vertical-middle"></i>Deposit</a>
|
||||
<a class="dropdown-item" href="<?= base_url("client/deposit/{$row->id}"); ?>"><i class="mdi mdi-cash mr-2 text-muted font-18 vertical-middle"></i>CD Tranctions</a>
|
||||
<?php if(get_role_id() != 3 && get_role_id() != 4) { ?>
|
||||
<a class="dropdown-item" data-id="<?= $row->id;?>" onclick="removeClient(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
||||
<?php } ?>
|
||||
|
||||
@ -307,7 +307,6 @@
|
||||
|
||||
$('.btnAdd').click(function() {
|
||||
|
||||
// fetchClientPolicyList()
|
||||
fetchClientBranch()
|
||||
|
||||
$('#policy_form')[0].reset();
|
||||
@ -564,6 +563,7 @@
|
||||
var OptionsHTML = '';
|
||||
OptionsHTML += '<option value="" selected>Select Policy</option>';
|
||||
$policy_type_value = $('#policy_type').val();
|
||||
|
||||
$.each(res.data, function(index, item) {
|
||||
|
||||
if ($policy_type_value == 3) {
|
||||
@ -621,6 +621,7 @@
|
||||
});
|
||||
|
||||
$('#policy').html(OptionsHTML);
|
||||
|
||||
}).fail(function(xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
@ -773,7 +774,7 @@
|
||||
$('#policy_form_action').val('<?= base_url("client/policy/edit"); ?>');
|
||||
|
||||
if (res.status === false) {
|
||||
toastr.error(res.status);
|
||||
toastr.error(res.message);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -869,7 +870,7 @@
|
||||
|
||||
setTimeout(function(){
|
||||
appendCDACNO(res.cd_data, res.data.cd_ac_no) // append and select the current CD Account Number
|
||||
appendPolicyList(res.policy, res.data.policy_id); // append and select the current policy
|
||||
appendPolicyList(res.policy, res.data.policy_id, ); // append and select the current policy
|
||||
appendBasePolicyList(res.client_policy_list, res.data.base_policy, res.data.client_branch_id); // append and select the Base palicy
|
||||
}, 2000)
|
||||
|
||||
@ -1314,12 +1315,13 @@
|
||||
})
|
||||
|
||||
|
||||
// featch client policy to list in the Base policy Dropdown list
|
||||
function fetchClientPolicyList() {
|
||||
|
||||
var client_id = $('#client_id_policy').val()
|
||||
var client_branch_id = $('#client_branch').val()
|
||||
|
||||
// //console.log('client_branch_id', client_branch_id)
|
||||
//console.log('client_branch_id', client_branch_id)
|
||||
|
||||
$.ajax({
|
||||
url: '<?= base_url("util/featch-client-policy-list/") ?>' + client_id,
|
||||
@ -1327,7 +1329,7 @@
|
||||
dataType: 'json',
|
||||
success: function(res) {
|
||||
|
||||
//console.log('one', res)
|
||||
//console.log('Base policy Dropdown list', res)
|
||||
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
@ -1380,7 +1382,6 @@
|
||||
|
||||
var dataId = 0;
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#base_policy').change(function() {
|
||||
|
||||
var client_policy_id = $(this).val() ? $(this).val() : 0;
|
||||
@ -1415,7 +1416,7 @@
|
||||
contentType: false,
|
||||
success: function(res) {
|
||||
|
||||
console.log(res)
|
||||
console.log('base policy ajax response', res)
|
||||
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
@ -1424,20 +1425,16 @@
|
||||
|
||||
if(res.status == true){
|
||||
|
||||
$('#insurer').val(res.data.insurer_branch_id + '-' + res.data.insurer_id)
|
||||
.change();
|
||||
$('#insurer').val(res.data.insurer_branch_id + '-' + res.data.insurer_id).change();
|
||||
$('#tpa').val(res.data.tpa_branch_id + '-' + res.data.tpa_id).change();
|
||||
$('#policy_no').val(res.data.policy_no).change();
|
||||
$('#start_date').val(rearrangeDateFormat(res.data.policy_start_date))
|
||||
.change();
|
||||
$('#start_date').val(rearrangeDateFormat(res.data.policy_start_date)).change();
|
||||
$('#end_date').val(rearrangeDateFormat(res.data.policy_end_date)).change();
|
||||
|
||||
var policeOptionHTML = '';
|
||||
$policy_type_value = $('#policy_type').val();
|
||||
$.each(res.policy, function(index, item) {
|
||||
|
||||
// //console.log(item);
|
||||
|
||||
policeOptionHTML += '<option data-id="' + item.policy_type_id +
|
||||
'" value="' + item.id + '" ' + (res.data.policy_id === item
|
||||
.id ?
|
||||
@ -1446,23 +1443,18 @@
|
||||
|
||||
});
|
||||
|
||||
console.log('policeOptionHTML', policeOptionHTML)
|
||||
|
||||
$('#policy').html(policeOptionHTML);
|
||||
|
||||
if (dataId == 3 || policy_type == 1) {
|
||||
|
||||
// //console.log('step 1')
|
||||
|
||||
setTimeout(function() {
|
||||
// //console.log('step 2')
|
||||
var $option = $('#policy').find('option[data-id="3"]');
|
||||
if ($option.length > 0) {
|
||||
// //console.log('step 3')
|
||||
$option.prop('selected', true).change();
|
||||
} else {
|
||||
// //console.log('step 4');
|
||||
toastr.warning(
|
||||
'The insurer does not have a GMC-Parents policy.',
|
||||
'Warning');
|
||||
toastr.warning('The insurer does not have a GMC-Parents policy.', 'Warning');
|
||||
}
|
||||
}, 1500);
|
||||
}
|
||||
@ -1488,7 +1480,7 @@
|
||||
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
|
||||
}
|
||||
|
||||
|
||||
// fetch the client branch list for the dropdown
|
||||
function fetchClientBranch() {
|
||||
|
||||
//console.log('function called');
|
||||
@ -1534,12 +1526,11 @@
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//append the client branch list for the dropdown
|
||||
function appendClientBranch(data) {
|
||||
|
||||
$('#client_branch').empty();
|
||||
|
||||
|
||||
$('#client_branch').append($('<option>', {
|
||||
value: '',
|
||||
text: 'Select Branch',
|
||||
@ -1560,13 +1551,13 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#client_branch").on('change', function() {
|
||||
// //console.log('fetchClientPolicyList change')
|
||||
fetchClientPolicyList();
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
//append the CD Account number for the dropdown
|
||||
function appendCDACNO(data, select = null) {
|
||||
|
||||
//console.log('appendCDACNO', data);
|
||||
@ -1593,6 +1584,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
// append Policies list to the dropdown for edit only
|
||||
function appendPolicyList(data, select = null, ) {
|
||||
|
||||
console.log('appendPolicyList', 'function called');
|
||||
@ -1608,7 +1600,7 @@
|
||||
$.each(data, function(index, item) {
|
||||
const option = $('<option>', {
|
||||
value: item.id, //policy id primary key
|
||||
text: item.name, // policy name
|
||||
text: item.name + ' - ' + item.policy_type, // policy name
|
||||
'data-id': item.policy_type_id //policy type id like gpa and gmc
|
||||
});
|
||||
|
||||
@ -1620,6 +1612,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
// append Base Policy to the dropdown for edit only
|
||||
function appendBasePolicyList(data, select = null, client_branch_id = null) {
|
||||
|
||||
console.log('appendBasePolicyList', 'function called');
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="emp_code">Account Manager ( L2 )</label>
|
||||
<label for="emp_code">Account Manager ( L1 )</label>
|
||||
<select class="form-control" id="account_manager" name="account_manager[]" multiple>
|
||||
<?php foreach($RM as $value) { ?>
|
||||
<?php if($value['role'] === '3') { ?>
|
||||
@ -26,7 +26,7 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="profile">Manager ( L1 )</label>
|
||||
<label for="profile">Manager ( L2 )</label>
|
||||
<select class="form-control" id="manager" name="manager">user_id
|
||||
<option value="">Select Manager</option>
|
||||
<?php foreach($RM as $value) { ?>
|
||||
|
||||
@ -50,7 +50,18 @@
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="address1">Address Line 1<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="address1" name="address1" placeholder="Enter Address 1" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="address2">Address Line 2<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="address2" placeholder="Enter Address 2" name="address2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="state">State<span
|
||||
class="text-danger">*</span></label>
|
||||
<select class="form-control" id="state" name="state" required>
|
||||
@ -60,18 +71,23 @@
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="district">District<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="district"
|
||||
placeholder="Enter District" name="district" required>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="city">City<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="branch_city"
|
||||
placeholder="Enter City" name="city" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="gst">Pincode<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="pincode" placeholder="Enter Pincode" name="pincode" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@ -85,18 +101,18 @@
|
||||
<input value="" type="text" class="form-control" placeholder="Enter Contact Name" name="name[]" id="name" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="last_name">Email<span class="text-danger">*</span></label>
|
||||
<input value="" type="email" data-parsley-type="email" class="form-control" placeholder="Enter Contact Email" name="email[]" id="email" required>
|
||||
<label for="designation">Designation<span class="text-danger">*</span></label>
|
||||
<input value="" type="text" class="form-control" placeholder="Enter Designation Name" name="designation[]" id="designation" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="mobile">Mobile<span class="text-danger">*</span></label>
|
||||
<input name="mobile[]" pattern="[0-9]{10}" value="" type="tel" data-parsley-type="number" data-parsley-length="[10,10]" class="form-control" placeholder="Enter Contact Mobile" id="mobile" required>
|
||||
<label for="last_name">Email<span class="text-danger">*</span></label>
|
||||
<input value="" type="email" data-parsley-type="email" class="form-control" placeholder="Enter Contact Email" name="email[]" id="email" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="designation">Designation<span class="text-danger">*</span></label>
|
||||
<input value="" type="text" class="form-control" placeholder="Enter Designation Name" name="designation[]" id="designation" required>
|
||||
<label for="mobile">Mobile<span class="text-danger">*</span></label>
|
||||
<input name="mobile[]" pattern="[0-9]{10}" value="" type="tel" data-parsley-type="number" data-parsley-length="[10,10]" class="form-control" placeholder="Enter Contact Mobile" id="mobile" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="display: flex;">
|
||||
@ -317,6 +333,9 @@
|
||||
$('#state option[value="' + res.insurerbranch.state + '"]').prop('selected', true);
|
||||
$('#district').val(res.insurerbranch.district);
|
||||
$('#branch_city').val(res.insurerbranch.city);
|
||||
$('#pincode').val(res.insurerbranch.pincode);
|
||||
$('#address1').val(res.insurerbranch.address1);
|
||||
$('#address2').val(res.insurerbranch.address2);
|
||||
|
||||
$('#contact_id_1').val(res.levelcontact[0].id);
|
||||
$('.form-row').find('#name').val(res.levelcontact[0].name);
|
||||
|
||||
@ -591,6 +591,9 @@
|
||||
<li>
|
||||
<a href="<?= base_url('/master/cash_deposite/list') ?>">CD Master</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= base_url('/user/list') ?>"> Users </a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
@ -608,12 +611,12 @@
|
||||
<span> Tickets </span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<!-- <li>
|
||||
<a href="<?= base_url('/user/list') ?>">
|
||||
<i class=" ri-user-3-line"></i>
|
||||
<span> Users </span>
|
||||
</a>
|
||||
</li>
|
||||
</li> -->
|
||||
<li>
|
||||
<a id="app_content_management" href="#sidebarDashboardsmenu" data-toggle="collapse" class="waves-effect" style="color: grey;">
|
||||
<i class="fa fa-info-circle" aria-hidden="true"></i>
|
||||
|
||||
@ -58,11 +58,11 @@
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="branch_name">Nhance team mail ID's<span class="text-danger">*</span></label>
|
||||
<label for="branch_name">Team mail ID<span class="text-danger">*</span></label>
|
||||
<textarea name="" id="nhance_team_mail_ids" class="form-control" placeholder="Example: jhon@gmail.com, dave@gmail.com"><?php echo isset($client['common_mails']) ? $client['common_mails'] : ''; ?></textarea>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="branch_name">HR mail ID's<span class="text-danger">*</span></label>
|
||||
<label for="branch_name">HR mail ID<span class="text-danger">*</span></label>
|
||||
<textarea name="" id="hr_mail_id" class="form-control" placeholder="Example: jhon@gmail.com, dave@gmail.com"><?php echo isset($client['hr_mails']) ? $client['hr_mails'] : ''; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -15,19 +15,19 @@
|
||||
placeholder="Enter Policy Type Name" value="<?= isset($policytype['policy_type']) ? $policytype['policy_type'] : '' ?>" name="policy_type" required>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="bap">Bap<span
|
||||
<label for="bap">BAP<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="bap"
|
||||
placeholder="Enter Bap" value="<?= isset($policytype['bap']) ? $policytype['bap'] : '' ?>" name="bap" required>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="allocg">Allocg<span
|
||||
<label for="allocg">Category<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="allocg"
|
||||
placeholder="Enter Allocg" value="<?= isset($policytype['allocg']) ? $policytype['allocg'] : '' ?>" name="allocg" required>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="alloci">Alloci<span
|
||||
<label for="alloci">BAP Category<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="alloci"
|
||||
placeholder="Enter Alloci" value="<?= isset($policytype['alloci']) ? $policytype['alloci'] : '' ?>" name="alloci" required>
|
||||
|
||||
@ -16,27 +16,19 @@
|
||||
<label for="tpa_short_name">TPA Short Name<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="short_name" placeholder="Enter Short Name" value="<?= isset($tpa['short_name']) ? $tpa['short_name'] : '' ?>" name="short_name" required>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="tpa_logo">TPA Logo<span class="text-danger"></span></label>
|
||||
<input type="file" class="form-control" onchange="PreviewImage();" id="tpa_logo" name="tpa_logo" accept="image/jpeg, image/jpg, image/png">
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="tpa_network_hospitals">Network Hospitals<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="tpa_network_hospitals" name="network_hospitals" placeholder="Enter Network Hospitals" value="<?= isset($tpa['network_hospitals']) ? $tpa['network_hospitals'] : '' ?>" required>
|
||||
<input type="url" class="form-control" id="tpa_network_hospitals" name="network_hospitals" placeholder="Enter Network Hospitals" value="<?= isset($tpa['network_hospitals']) ? $tpa['network_hospitals'] : '' ?>" required data-parsley-type="url">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-10">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="tpa_ecard_template">E-Card Template<span class="text-danger"></span></label>
|
||||
<textarea style="height: 380px;" class="form-control" id="ecard_content" placeholder="Enter E-card Content" name="ecard_content"><?= isset($template_data) ? $template_data : '' ?></textarea>
|
||||
</div>
|
||||
<div class="form-group col-md-2 float-right" style="position: relative;top: 0px;left: 40px;">
|
||||
<label for="tpa_logo_preview">Logo Preview<span class="text-danger"></span></label>
|
||||
<img src="<?= isset($tpa['tpa_logo']) && !empty($tpa['tpa_logo']) ? base_url() . "public/uploads/logo/" . $tpa['tpa_logo'] : base_url() . "public/assets/images/avatar_2x.png" ?>" width="100" height="100" id="uploadPreview" class="avatar img-circle img-thumbnail" alt="avatar" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row" id="view_pre_btn" style="display :none">
|
||||
@ -46,6 +38,10 @@
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="tpa_logo">TPA Logo<span class="text-danger"></span></label>
|
||||
<input type="file" class="form-control" onchange="PreviewImage();" id="tpa_logo" name="tpa_logo" accept="image/jpeg, image/jpg, image/png">
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="tpa_front_card_image">Front card Image<span class="text-danger"></span></label>
|
||||
<input type="file" class="form-control" onchange="PreviewImage2();" id="fc" name="fc" accept="image/jpeg, image/jpg, image/png">
|
||||
@ -57,6 +53,10 @@
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="tpa_logo_preview">TPA Logo Preview<span class="text-danger"></span></label>
|
||||
<img src="<?= isset($tpa['tpa_logo']) && !empty($tpa['tpa_logo']) ? base_url() . "public/uploads/logo/" . $tpa['tpa_logo'] : base_url() . "public/assets/images/avatar_2x.png" ?>" width="100" height="100" id="uploadPreview" class="avatar img-circle img-thumbnail" alt="avatar" />
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="tpa_front_card_preview">Front card Preview<span class="text-danger"></span></label>
|
||||
<img src="<?= isset($tpa['front_card']) && !empty($tpa['front_card']) ? base_url() . "public/uploads/template_bg/" . $tpa['front_card'] : base_url() . "public/assets/images/avatar_2x.png" ?>" width="100" height="100" id="uploadPreview2" class="avatar img-circle img-thumbnail" alt="avatar" />
|
||||
|
||||
@ -49,7 +49,18 @@
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="address1">Address Line 1<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="address1" name="address1" placeholder="Enter Address 1" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="address2">Address Line 2<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="address2" placeholder="Enter Address 2" name="address2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="state">State<span
|
||||
class="text-danger">*</span></label>
|
||||
<select class="form-control" id="state" name="state" required>
|
||||
@ -60,17 +71,22 @@
|
||||
<?php } }?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="district">District<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="district"
|
||||
placeholder="Enter District" name="district" required>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="city">City</label>
|
||||
<input type="text" class="form-control" id="branch_city"
|
||||
placeholder="Enter City" name="city" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="gst">Pincode<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="pincode" placeholder="Enter Pincode" name="pincode" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@ -83,18 +99,18 @@
|
||||
<input value="" type="text" class="form-control" placeholder="Enter Contact Name" name="name[]" id="name" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="last_name">Email<span class="text-danger">*</span></label>
|
||||
<input value="" data-parsley-type="email" type="email" data-parsley-type="email" class="form-control" placeholder="Enter Contact Email" name="email[]" id="email" required>
|
||||
<label for="designation">Designation<span class="text-danger">*</span></label>
|
||||
<input value="" type="text" class="form-control" placeholder="Enter Designation Name" name="designation[]" id="designation" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="mobile">Mobile<span class="text-danger">*</span></label>
|
||||
<input value="" data-parsley-type="number" data-parsley-length="[10,10]" type="tel" class="form-control" placeholder="Enter Contact Mobile" name="mobile[]" id="mobile" required>
|
||||
<label for="last_name">Email<span class="text-danger">*</span></label>
|
||||
<input value="" data-parsley-type="email" type="email" data-parsley-type="email" class="form-control" placeholder="Enter Contact Email" name="email[]" id="email" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="designation">Designation<span class="text-danger">*</span></label>
|
||||
<input value="" type="text" class="form-control" placeholder="Enter Designation Name" name="designation[]" id="designation" required>
|
||||
<label for="mobile">Mobile<span class="text-danger">*</span></label>
|
||||
<input value="" data-parsley-type="number" data-parsley-length="[10,10]" type="tel" class="form-control" placeholder="Enter Contact Mobile" name="mobile[]" id="mobile" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="display: flex;">
|
||||
@ -301,6 +317,9 @@ $(document).ready(function () {
|
||||
$('#district').val(res.tpabranch.district);
|
||||
$('#branch_city').val(res.tpabranch.city);
|
||||
$('#tpa_Branch_PrimaryKey').val(res.tpabranch.id);
|
||||
$('#pincode').val(res.tpabranch.pincode);
|
||||
$('#address1').val(res.tpabranch.address1);
|
||||
$('#address2').val(res.tpabranch.address2);
|
||||
|
||||
$('.form-row').find('#name').val(res.levelcontact[0].name);
|
||||
$('#email').val(res.levelcontact[0].email);
|
||||
@ -382,59 +401,56 @@ $(document).ready(function () {
|
||||
|
||||
function appendContactHtml(contact = false, reset = false) {
|
||||
|
||||
console.log('appendContactHtml function called ')
|
||||
contactCount++;
|
||||
console.log('appendContactHtml function called ')
|
||||
contactCount++;
|
||||
|
||||
var container = document.getElementById('container');
|
||||
var uniqueId = Date.now().toString();
|
||||
var container = document.getElementById('container');
|
||||
var uniqueId = Date.now().toString();
|
||||
|
||||
var html = `
|
||||
<div id="${uniqueId}">
|
||||
<hr>
|
||||
<h6 class="header-title">Contact ${contactCount}</h6>
|
||||
<br>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="${uniqueId}_first_name">Name<span class="text-danger">*</span></label>
|
||||
<input value="${contact !== undefined && contact !== false ? contact.name : ''}" type="text" class="form-control" placeholder="Enter Contact Name" name="name[]" id="${uniqueId}_name" required>
|
||||
var html = `
|
||||
<div id="${uniqueId}">
|
||||
<hr>
|
||||
<h6 class="header-title">Contact ${contactCount}</h6>
|
||||
<br>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="${uniqueId}_first_name">Name<span class="text-danger">*</span></label>
|
||||
<input value="${contact !== undefined && contact !== false ? contact.name : ''}" type="text" class="form-control" placeholder="Enter Contact Name" name="name[]" id="${uniqueId}_name" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="${uniqueId}_designation">Designation<span class="text-danger">*</span></label>
|
||||
<input value="${contact !== undefined && contact !== false ? contact.designation : ''}" type="text" class="form-control" placeholder="Enter Designation Name" name="designation[]" id="${uniqueId}_designation" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="${uniqueId}_last_name">Email<span class="text-danger">*</span></label>
|
||||
<input data-parsley-type="email" value="${contact !== undefined && contact !== false ? contact.email : ''}" type="email" class="form-control" placeholder="Enter Contact Email" name="email[]" id="${uniqueId}_email" required>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="${uniqueId}_last_name">Email<span class="text-danger">*</span></label>
|
||||
<input data-parsley-type="email" value="${contact !== undefined && contact !== false ? contact.email : ''}" type="email" class="form-control" placeholder="Enter Contact Email" name="email[]" id="${uniqueId}_email" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="${uniqueId}_mobile">Mobile<span class="text-danger">*</span></label>
|
||||
<input value="${contact !== undefined && contact !== false ? contact.mobile : ''}" type="tel" class="form-control" placeholder="Enter Contact Mobile" name="mobile[]" id="${uniqueId}_mobile" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="display: flex;">
|
||||
<button style="margin-right: 10px;" type="button" class="btn btn-primary btn-sm ac" onclick="appendContactHtml()" id="${uniqueId}_add">Add Contact</button>
|
||||
<button type="button" class="btn btn-danger btn-sm" onclick="removeContact(this)" id="${uniqueId}_remove">Remove</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="${uniqueId}_mobile">Mobile<span class="text-danger">*</span></label>
|
||||
<input value="${contact !== undefined && contact !== false ? contact.mobile : ''}" type="tel" class="form-control" placeholder="Enter Contact Mobile" name="mobile[]" id="${uniqueId}_mobile" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="${uniqueId}_designation">Designation<span class="text-danger">*</span></label>
|
||||
<input value="${contact !== undefined && contact !== false ? contact.designation : ''}" type="text" class="form-control" placeholder="Enter Designation Name" name="designation[]" id="${uniqueId}_designation" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="display: flex;">
|
||||
<button style="margin-right: 10px;" type="button" class="btn btn-primary btn-sm ac" onclick="appendContactHtml()" id="${uniqueId}_add">Add Contact</button>
|
||||
<button type="button" class="btn btn-danger btn-sm" onclick="removeContact(this)" id="${uniqueId}_remove">Remove</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
`;
|
||||
|
||||
if(reset == false){
|
||||
console.log(reset)
|
||||
container.insertAdjacentHTML('beforeend', html);
|
||||
storeButtonId(uniqueId + '_add');
|
||||
if(reset == false){
|
||||
console.log(reset)
|
||||
container.insertAdjacentHTML('beforeend', html);
|
||||
storeButtonId(uniqueId + '_add');
|
||||
|
||||
if (contactCount >= 3) {
|
||||
hideStoredAddButtons();
|
||||
if (contactCount >= 3) {
|
||||
hideStoredAddButtons();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function removeContact(button) {
|
||||
var uniqueId = button.id.split("_")[0];
|
||||
var contactSection = document.getElementById(uniqueId);
|
||||
@ -459,7 +475,6 @@ function storeButtonId(id) {
|
||||
localStorage.setItem('buttonIds', JSON.stringify(buttonIds));
|
||||
}
|
||||
|
||||
|
||||
function hideStoredAddButtons() {
|
||||
var storedIds = JSON.parse(localStorage.getItem('buttonIds')) || [];
|
||||
storedIds.forEach(function(id) {
|
||||
@ -505,48 +520,47 @@ function validateForm() {
|
||||
return isValid;
|
||||
}
|
||||
|
||||
function removeTPABranch(element) {
|
||||
|
||||
Swal.fire({
|
||||
title: "Are you sure?",
|
||||
text: "You need to remove this TPA branch.",
|
||||
icon: "info",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
confirmButtonText: "Yes",
|
||||
}).then((result) => {
|
||||
|
||||
function removeTPABranch(element) {
|
||||
|
||||
Swal.fire({
|
||||
title: "Are you sure?",
|
||||
text: "You need to remove this TPA branch.",
|
||||
icon: "info",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
confirmButtonText: "Yes",
|
||||
}).then((result) => {
|
||||
|
||||
if (result.isConfirmed) {
|
||||
var id = element.getAttribute('data-id');
|
||||
var form_action = '<?= base_url("master/tpa/branch/remove/") ?>' + id;
|
||||
$.ajax({
|
||||
url: form_action,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(res) {
|
||||
// console.log(res.status == true);
|
||||
if(res){
|
||||
if (res.status == true) {
|
||||
toastr.success('TPA branch removed successfully', 'success');
|
||||
location.reload();
|
||||
} else {
|
||||
toastr.warning('Failed to remove TPA branch', 'warning');
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
if (result.isConfirmed) {
|
||||
var id = element.getAttribute('data-id');
|
||||
var form_action = '<?= base_url("master/tpa/branch/remove/") ?>' + id;
|
||||
$.ajax({
|
||||
url: form_action,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(res) {
|
||||
// console.log(res.status == true);
|
||||
if(res){
|
||||
if (res.status == true) {
|
||||
toastr.success('TPA branch removed successfully', 'success');
|
||||
location.reload();
|
||||
} else {
|
||||
toastr.warning('Failed to remove TPA branch', 'warning');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
toastr.warning('Failed to remove TPA branch', 'warning');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@ -4,7 +4,16 @@
|
||||
<div class="card-body">
|
||||
|
||||
<div class="text-center">
|
||||
<div class="row">
|
||||
<div class="col-md-4"></div>
|
||||
<div class="col-md-4">
|
||||
<i class="font-24"></i>
|
||||
<h4>CD Account No : <?php echo isset($insurerName->cd_ac_no) && !empty($insurerName->cd_ac_no) ? $insurerName->cd_ac_no : 'N/A' ?></h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 col-xl-5">
|
||||
@ -12,8 +21,7 @@
|
||||
<i class="font-24"></i>
|
||||
<h4>Deposit Summary Of <?php echo $clientData->short_name?></h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-5">
|
||||
<div class="py-1">
|
||||
<i class=" font-24"></i>
|
||||
@ -21,9 +29,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row mt-3 text-center">
|
||||
|
||||
<div class="col-3">
|
||||
@ -56,6 +63,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -98,7 +106,8 @@
|
||||
id="tickets-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th class="font-weight-medium">CD Account No</th>
|
||||
<th class="font-weight-medium">Date</th>
|
||||
<!-- <th class="font-weight-medium">CD Account No</th> -->
|
||||
<th class="font-weight-medium">Policy Name</th>
|
||||
<th class="font-weight-medium">Endorsement No</th>
|
||||
<th class="font-weight-medium">Sub Type</th>
|
||||
@ -106,23 +115,22 @@
|
||||
<th class="font-weight-medium">Debit</th>
|
||||
<th class="font-weight-medium">Balance</th>
|
||||
<th class="font-weight-medium">Description</th>
|
||||
<th class="font-weight-medium">Date/User</th>
|
||||
<th class="font-weight-medium">User</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($depositdata as $row) { ?>
|
||||
<tr id="<?php echo $row->id;?>">
|
||||
<td><?php echo $row->cd_ac_no; ?></td>
|
||||
<td><?php echo $row->policy_name; ?></td>
|
||||
<td><?php echo $row->endorsement_no; ?></td>
|
||||
<td><?php echo date('d-M-Y h:i A', strtotime($row->created_at)); ?></td>
|
||||
<td><?php echo $row->policy_name ?? '<center> - </center>'; ?></td>
|
||||
<td><?php echo $row->endorsement_no ?? '<center> - </center>'; ?></td>
|
||||
<td><?php echo isset($subTypeOptions[$row->sub_type]) ? $subTypeOptions[$row->sub_type] : ''; ?>
|
||||
</td>
|
||||
<td><?php echo ($row->transaction_type == 'Credit') ? $row->amount : ''; ?></td>
|
||||
<td><?php echo ($row->transaction_type == 'Debit') ? $row->amount : ''; ?></td>
|
||||
<td><?php echo $row->balance; ?></td>
|
||||
<td><?php echo $row->description; ?></td>
|
||||
<td><?php echo date('d-M-Y h:i A', strtotime($row->created_at)); ?> by
|
||||
<?php echo $row->username; ?> </td>
|
||||
<td><?php echo $row->username; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
@ -156,23 +164,27 @@
|
||||
<label for="transactionMode" class="control-label">Transaction Mode</label>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="transactionMode" id="addMode"value="1" checked>
|
||||
<label class="form-check-label" for="addMode">Replenishment</label>
|
||||
<label class="form-check-label" for="addMode">Replenishment by Client</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="transactionMode" id="refund_by_insurer"value="6">
|
||||
<label class="form-check-label" for="addMode">Refund by Insurer</label>
|
||||
</div>
|
||||
<!-- <div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="transactionMode" id="adjustmentModeadd"value="2">
|
||||
<label class="form-check-label" for="adjustmentMode">Adjustment Add</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="transactionMode" id="adjustmentModereduce"value="3">
|
||||
<label class="form-check-label" for="adjustmentMode">Adjustment Reduce</label>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="transactionMode" id="assetpolicyadd"value="4">
|
||||
<label class="form-check-label" for="adjustmentMode">Asset policy Add</label>
|
||||
<label class="form-check-label" for="adjustmentMode">Non EB Credit</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="transactionMode" id="assetpolicyreduce"value="5">
|
||||
<label class="form-check-label" for="adjustmentMode">Asset policy Reduce</label>
|
||||
<label class="form-check-label" for="adjustmentMode">No EB Debit</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -323,6 +335,9 @@ $(document).ready(function() {
|
||||
}else if(transactionTypeValue == 5){
|
||||
transactionType = 'Debit'
|
||||
subType = '5'; // Asset Policy reduce
|
||||
}else if(transactionTypeValue == 6){
|
||||
transactionType = 'Debit'
|
||||
subType = '6'; // Refund by indurer
|
||||
}
|
||||
|
||||
console.log('transactionTypeValue', transactionTypeValue)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user