Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
305902eb12
2
.gitignore
vendored
2
.gitignore
vendored
@ -33,3 +33,5 @@ build/
|
|||||||
composer.lock
|
composer.lock
|
||||||
.env
|
.env
|
||||||
.phpunit*
|
.phpunit*
|
||||||
|
phpqueue.sh
|
||||||
|
|
||||||
|
|||||||
@ -4779,6 +4779,15 @@ class ClientController extends AdminController
|
|||||||
|
|
||||||
// dd($finalJson);
|
// dd($finalJson);
|
||||||
|
|
||||||
|
// $baseWhere = [
|
||||||
|
// 'client_id' => 159,
|
||||||
|
// 'client_policy_id' => 336,
|
||||||
|
// 'insurer_id' => 1,
|
||||||
|
// 'cd_ac_pk' => 56,
|
||||||
|
// 'event_name' => "addition",
|
||||||
|
// ];
|
||||||
|
// $return_value = check_cd_entry_exist($baseWhere);
|
||||||
|
// dd($return_value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4105,6 +4105,9 @@ class EmpDataServiceController extends BaseController
|
|||||||
AND emp_endorsement.pk IN (" . implode(',', $arrayData['employeeIds']) . ")
|
AND emp_endorsement.pk IN (" . implode(',', $arrayData['employeeIds']) . ")
|
||||||
AND employee_polices.claim_status = 0
|
AND employee_polices.claim_status = 0
|
||||||
AND emp_endorsement.field_name = 'date_of_exit'
|
AND emp_endorsement.field_name = 'date_of_exit'
|
||||||
|
AND emp_endorsement.is_active = 1
|
||||||
|
AND emp_endorsement.actions = 'd'
|
||||||
|
AND emp_endorsement.status != 'truncated';
|
||||||
")->getRow();
|
")->getRow();
|
||||||
|
|
||||||
// dd(db_connect()->getLastQuery(), $amount);
|
// dd(db_connect()->getLastQuery(), $amount);
|
||||||
|
|||||||
@ -1422,11 +1422,12 @@ class MasterController extends AdminController
|
|||||||
if ($insert) {
|
if ($insert) {
|
||||||
|
|
||||||
//for CD Tranction Table
|
//for CD Tranction Table
|
||||||
|
$cd_tranction_data['cd_ac_pk'] = $this->CDMasterModel->insertID();
|
||||||
$response = DepositHelper::saveDeposit($cd_tranction_data, $loggedInUserID);
|
$response = DepositHelper::saveDeposit($cd_tranction_data, $loggedInUserID);
|
||||||
|
|
||||||
$cd_data = $this->CDMasterModel->where('client_id', $data['client_id'])->where('insurer_id', $data['insurer_id'])->findAll();
|
$cd_data = $this->CDMasterModel->where('client_id', $data['client_id'])->where('insurer_id', $data['insurer_id'])->findAll();
|
||||||
|
|
||||||
return $this->respond(['status' => true, 'data' => $cd_data, 'cd_ac_no'=>$data['cd_ac_no'], 'message' => 'CD Account number created successfully'], 200);
|
return $this->respond(['status' => true, 'data' => $cd_data, 'cd_ac_no'=>$data['cd_ac_no'], 'message' => 'CD Account number created successfully', "FOR BDS PURPOSE"], 200);
|
||||||
}else{
|
}else{
|
||||||
return $this->respond(['status' => false, 'message' => 'Failed to created CD Account number'], 200);
|
return $this->respond(['status' => false, 'message' => 'Failed to created CD Account number'], 200);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -306,6 +306,12 @@ class PolicyTransactionController extends BaseController
|
|||||||
$data['policy_with_corr'] = 1;
|
$data['policy_with_corr'] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($data['is_cd_reduce_from_bds'])) {
|
||||||
|
$data['is_cd_reduce_from_bds'] = 0;
|
||||||
|
} elseif ($data['is_cd_reduce_from_bds']) {
|
||||||
|
$data['is_cd_reduce_from_bds'] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if($data['ct_type'] == ""){
|
if($data['ct_type'] == ""){
|
||||||
$data['ct_type'] = 1;
|
$data['ct_type'] = 1;
|
||||||
}
|
}
|
||||||
@ -342,7 +348,7 @@ class PolicyTransactionController extends BaseController
|
|||||||
$this->policyTransactionModel->update($insert, ['client_policy_id' => $client_policy_id]);
|
$this->policyTransactionModel->update($insert, ['client_policy_id' => $client_policy_id]);
|
||||||
$emp_policy_insert = $this->InsertIndividualEmpPolicyTable($emp_data, $client_policy_id);
|
$emp_policy_insert = $this->InsertIndividualEmpPolicyTable($emp_data, $client_policy_id);
|
||||||
|
|
||||||
if ($data['client_type'] == 1 && $data['status'] == 'completed') {
|
if ($data['client_type'] == 1 && $data['status'] == 'completed' && $data['is_cd_reduce_from_bds'] == 1) {
|
||||||
$this->processCompletedStatus($data, $client_policy_id, $data['insurer_id']);
|
$this->processCompletedStatus($data, $client_policy_id, $data['insurer_id']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -362,6 +368,7 @@ class PolicyTransactionController extends BaseController
|
|||||||
|
|
||||||
private function updateInceptionPolicy($id, $data)
|
private function updateInceptionPolicy($id, $data)
|
||||||
{
|
{
|
||||||
|
// print_r($data); die;
|
||||||
if ($this->policyTransactionModel->update($id, $data)) {
|
if ($this->policyTransactionModel->update($id, $data)) {
|
||||||
|
|
||||||
$this->insertTransactionStatus($id, $data, 1);
|
$this->insertTransactionStatus($id, $data, 1);
|
||||||
@ -391,7 +398,7 @@ class PolicyTransactionController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($data['status'] == 'completed' && $data['ct_type'] == 2) {
|
if ($data['status'] == 'completed' && $data['ct_type'] == 2) {
|
||||||
if($data['client_type'] == 1){
|
if($data['client_type'] == 1 && $data['is_cd_reduce_from_bds'] == 1){
|
||||||
$this->processCompletedStatus($data, $data['client_policy_id'], $data['insurer_id']);
|
$this->processCompletedStatus($data, $data['client_policy_id'], $data['insurer_id']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -426,7 +433,12 @@ class PolicyTransactionController extends BaseController
|
|||||||
foreach ($data['follow_insurer_id'] as $index => $insurer) {
|
foreach ($data['follow_insurer_id'] as $index => $insurer) {
|
||||||
|
|
||||||
// Separate the insurer and insurer branch
|
// Separate the insurer and insurer branch
|
||||||
list($insurer_branch_id, $insurer_id) = explode('-', $insurer);
|
if(isset($insurer) && !empty($insurer)){
|
||||||
|
list($insurer_branch_id, $insurer_id) = explode('-', $insurer);
|
||||||
|
}else{
|
||||||
|
$insurer_branch_id = null;
|
||||||
|
$insurer_id = null;
|
||||||
|
}
|
||||||
|
|
||||||
// Prepare each co-share detail entry
|
// Prepare each co-share detail entry
|
||||||
$coShareDetails[] = [
|
$coShareDetails[] = [
|
||||||
@ -547,7 +559,7 @@ class PolicyTransactionController extends BaseController
|
|||||||
private function processCompletedStatus($data, $client_policy_id, $insurer_id)
|
private function processCompletedStatus($data, $client_policy_id, $insurer_id)
|
||||||
{
|
{
|
||||||
$totalAmount = (int)$data['total'][0] ?? 0;
|
$totalAmount = (int)$data['total'][0] ?? 0;
|
||||||
$description = 'The following amount of Rs. ' . $totalAmount . '/- has been debited for the ' . $data['emp_count'] . ' employees at Inception.';
|
$description = 'The following amount of Rs. ' . $totalAmount . '/- has been debited for the ' . $data['emp_count'] . ' employees at Inception (BDS).';
|
||||||
|
|
||||||
$cdTransactionData = [
|
$cdTransactionData = [
|
||||||
'amount' => $totalAmount,
|
'amount' => $totalAmount,
|
||||||
@ -562,8 +574,9 @@ class PolicyTransactionController extends BaseController
|
|||||||
'updated_by' => get_session_userid(),
|
'updated_by' => get_session_userid(),
|
||||||
'event_name' => 'inception',
|
'event_name' => 'inception',
|
||||||
'is_active' => 1,
|
'is_active' => 1,
|
||||||
|
'cd_ac_pk' => $data['cd_ac_pk']
|
||||||
];
|
];
|
||||||
|
|
||||||
DepositHelper::saveDeposit($cdTransactionData, get_session_userid());
|
DepositHelper::saveDeposit($cdTransactionData, get_session_userid());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -987,7 +1000,6 @@ class PolicyTransactionController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Policy Transaction Endorsement
|
// Policy Transaction Endorsement
|
||||||
@ -1102,6 +1114,12 @@ class PolicyTransactionController extends BaseController
|
|||||||
$data['policy_with_corr'] = 1;
|
$data['policy_with_corr'] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($data['is_cd_reduce_from_bds'])) {
|
||||||
|
$data['is_cd_reduce_from_bds'] = 0;
|
||||||
|
} elseif ($data['is_cd_reduce_from_bds']) {
|
||||||
|
$data['is_cd_reduce_from_bds'] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if(empty($data['data_received_date'])){
|
if(empty($data['data_received_date'])){
|
||||||
$data['data_received_date'] = null;
|
$data['data_received_date'] = null;
|
||||||
}else{
|
}else{
|
||||||
@ -1171,8 +1189,8 @@ class PolicyTransactionController extends BaseController
|
|||||||
'policy_type_id' => $issue_type['policy_type_id'] ?? null,
|
'policy_type_id' => $issue_type['policy_type_id'] ?? null,
|
||||||
'issue_type' => $issue_type['issue_type'] ?? null,
|
'issue_type' => $issue_type['issue_type'] ?? null,
|
||||||
'source_client_policy_id' => $issue_type['source_client_policy_id'] ?? null,
|
'source_client_policy_id' => $issue_type['source_client_policy_id'] ?? null,
|
||||||
'cd_ac_no' => $issue_type['cd_ac_no'] ?? null,
|
'cd_ac_no' => isset( $data['cd_ac_no']) && !empty($data['cd_ac_no']) ? $data['cd_ac_no'] : $issue_type['cd_ac_no'] ?? null,
|
||||||
'cd_ac_pk' => $issue_type['cd_ac_pk'] ?? null,
|
'cd_ac_pk' => isset( $data['cd_ac_pk']) && !empty($data['cd_ac_pk']) ? $data['cd_ac_pk'] : $issue_type['cd_ac_pk'] ?? null,
|
||||||
// 'policy_issue_date' => $issue_type['policy_issue_date'] ?? null,
|
// 'policy_issue_date' => $issue_type['policy_issue_date'] ?? null,
|
||||||
'policy_start_date' => $issue_type['policy_start_date'] ?? null,
|
'policy_start_date' => $issue_type['policy_start_date'] ?? null,
|
||||||
'policy_end_date' => $issue_type['policy_end_date'] ?? null,
|
'policy_end_date' => $issue_type['policy_end_date'] ?? null,
|
||||||
@ -1231,6 +1249,7 @@ class PolicyTransactionController extends BaseController
|
|||||||
$update = $this->policyTransactionModel->where('id', $id)->set($data)->update();
|
$update = $this->policyTransactionModel->where('id', $id)->set($data)->update();
|
||||||
|
|
||||||
if ($update) {
|
if ($update) {
|
||||||
|
|
||||||
$this->insertTransactionStatus($id, $data, 1);
|
$this->insertTransactionStatus($id, $data, 1);
|
||||||
$this->handleCompletedStatus($data, $id);
|
$this->handleCompletedStatus($data, $id);
|
||||||
$this->insertOrUpdateCoShareDetails($data, $id);
|
$this->insertOrUpdateCoShareDetails($data, $id);
|
||||||
@ -1243,13 +1262,13 @@ class PolicyTransactionController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function handleCompletedStatus($data, $policy_tran_id)
|
private function handleCompletedStatus($data, $policy_tran_id)
|
||||||
{
|
{
|
||||||
if ($data['status'] == 'completed' && $data['ct_type'] == 2) {
|
if ($data['client_type'] == 1 && $data['status'] == 'completed' && $data['is_cd_reduce_from_bds'] == 1) {
|
||||||
|
|
||||||
$tolamt = $data['total'][0] ?? 0;
|
$tolamt = $data['total'][0] ?? 0;
|
||||||
|
|
||||||
$description = 'The following amount of Rs. ' . round($tolamt, 2) . '/- has been' .
|
$description = 'The following amount of Rs. ' . round($tolamt, 2) . '/- has been' .
|
||||||
($data['action_type'] == 'deletion' ? ' Credit ' : ' Debit ') . 'from the policy transaction';
|
($data['action_type'] == 'deletion' ? ' Credit ' : ' Debit ') . 'from the policy transaction (BDS)';
|
||||||
|
|
||||||
$cd_tranction_data = [
|
$cd_tranction_data = [
|
||||||
'amount' => $tolamt,
|
'amount' => $tolamt,
|
||||||
@ -1264,6 +1283,7 @@ class PolicyTransactionController extends BaseController
|
|||||||
'updated_by' => get_session_userid(),
|
'updated_by' => get_session_userid(),
|
||||||
'event_name' => $data['action_type'],
|
'event_name' => $data['action_type'],
|
||||||
'is_active' => 1,
|
'is_active' => 1,
|
||||||
|
'cd_ac_pk' => $data['cd_ac_pk'] ?? null,
|
||||||
];
|
];
|
||||||
|
|
||||||
DepositHelper::saveDeposit($cd_tranction_data, get_session_userid());
|
DepositHelper::saveDeposit($cd_tranction_data, get_session_userid());
|
||||||
@ -1589,6 +1609,7 @@ class PolicyTransactionController extends BaseController
|
|||||||
->select("
|
->select("
|
||||||
pt_co_share_details.*,
|
pt_co_share_details.*,
|
||||||
policy_transaction.bro_payable_by,
|
policy_transaction.bro_payable_by,
|
||||||
|
policy_transaction.cd_ac_pk,
|
||||||
(
|
(
|
||||||
select cd_ac_no
|
select cd_ac_no
|
||||||
from cd_master
|
from cd_master
|
||||||
@ -1616,9 +1637,12 @@ class PolicyTransactionController extends BaseController
|
|||||||
->where('is_active', 1)
|
->where('is_active', 1)
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
|
$cd_ac_no = db_connect()->table('cd_master')->where('id', $is_copay_yes['cd_ac_pk'] ?? null)->get()->getRowArray();
|
||||||
|
|
||||||
if ($totalCount) {
|
if ($totalCount) {
|
||||||
return $this->respond(['status' => true, 'code' => 200, 'data' => $totalCount, 'is_copay_yes' => $is_copay_yes], 200);
|
return $this->respond(['status' => true, 'code' => 200, 'data' => $totalCount, 'is_copay_yes' => $is_copay_yes, "cd_master_data" => $cd_ac_no], 200);
|
||||||
} else {
|
} else {
|
||||||
|
$insurer_data = $this->clientPolicyModel->where('id', $client_policy_id)->where('is_active', 1)->first();
|
||||||
return $this->respond(['status' => false, 'code' => 404, 'message' => 'Failed to get data'], 200);
|
return $this->respond(['status' => false, 'code' => 404, 'message' => 'Failed to get data'], 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,8 +32,11 @@ class DepositHelper
|
|||||||
*/
|
*/
|
||||||
public static function saveDeposit(array $data, int $loggedInUserID): array
|
public static function saveDeposit(array $data, int $loggedInUserID): array
|
||||||
{
|
{
|
||||||
|
|
||||||
|
log_message("error", 'saveDeposit function called '. json_encode($data));
|
||||||
|
|
||||||
// Retrieve the last known balance
|
// Retrieve the last known balance
|
||||||
$lastBalance = self::calculateLastBalance($data['client_id'], $data['insurer_id'], $data['cd_ac_no']);
|
$lastBalance = self::calculateLastBalance($data['client_id'], $data['insurer_id'], $data['cd_ac_no'], $data['cd_ac_pk'] ?? null);
|
||||||
|
|
||||||
// Calculate the new balance based on the transaction type
|
// Calculate the new balance based on the transaction type
|
||||||
$newBalance = self::calculateBalance(
|
$newBalance = self::calculateBalance(
|
||||||
@ -91,15 +94,21 @@ class DepositHelper
|
|||||||
*
|
*
|
||||||
* @return float The last known balance.
|
* @return float The last known balance.
|
||||||
*/
|
*/
|
||||||
public static function calculateLastBalance(int $clientId, int $insurerId, $cd_ac_no): float
|
public static function calculateLastBalance(int $clientId, int $insurerId, $cd_ac_no, $cd_ac_pk): float
|
||||||
{
|
{
|
||||||
$model = new ClientDepositModel();
|
$model = new ClientDepositModel();
|
||||||
|
|
||||||
// $getLastBalanceQuery = "SELECT balance FROM cash_deposit WHERE client_id = ? AND insurer_id = ? ORDER BY created_at DESC LIMIT 1";
|
// $getLastBalanceQuery = "SELECT balance FROM cash_deposit WHERE client_id = ? AND insurer_id = ? ORDER BY created_at DESC LIMIT 1";
|
||||||
// $getLastBalanceParams = [$clientId, $insurerId];
|
// $getLastBalanceParams = [$clientId, $insurerId];
|
||||||
|
|
||||||
$getLastBalanceQuery = "SELECT balance FROM cash_deposit WHERE cd_ac_no = ? AND is_active = 1 ORDER BY created_at DESC LIMIT 1";
|
if(empty($cd_ac_pk)){
|
||||||
$getLastBalanceParams = [$cd_ac_no];
|
$getLastBalanceQuery = "SELECT balance FROM cash_deposit WHERE cd_ac_no = ? AND is_active = 1 ORDER BY created_at DESC LIMIT 1";
|
||||||
|
$getLastBalanceParams = [$cd_ac_no];
|
||||||
|
}else{
|
||||||
|
$getLastBalanceQuery = "SELECT balance FROM cash_deposit WHERE cd_ac_pk = ? AND is_active = 1 ORDER BY created_at DESC LIMIT 1";
|
||||||
|
$getLastBalanceParams = [$cd_ac_pk];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$lastBalance = $model->query($getLastBalanceQuery, $getLastBalanceParams)->getRow()->balance ?? 0;
|
$lastBalance = $model->query($getLastBalanceQuery, $getLastBalanceParams)->getRow()->balance ?? 0;
|
||||||
|
|
||||||
|
|||||||
@ -677,3 +677,69 @@ if (!function_exists('is_json_string')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!function_exists('check_cd_entry_exist')) {
|
||||||
|
function check_cd_entry_exist($params)
|
||||||
|
{
|
||||||
|
$db = db_connect();
|
||||||
|
|
||||||
|
$client_id = $params['client_id'];
|
||||||
|
$client_policy_id = $params['client_policy_id'];
|
||||||
|
$insurer_id = $params['insurer_id'];
|
||||||
|
$cd_ac_pk = $params['cd_ac_pk'];
|
||||||
|
$event_name = $params['event_name'];
|
||||||
|
|
||||||
|
// Check if truncated entry (sub_type = 8) exists
|
||||||
|
$has_truncated = $db->table('cash_deposit')
|
||||||
|
->where('client_id', $client_id)
|
||||||
|
->where('insurer_id', $insurer_id)
|
||||||
|
->where('cd_ac_pk', $cd_ac_pk)
|
||||||
|
->where('client_policy_id', $client_policy_id)
|
||||||
|
->where('event_name', $event_name)
|
||||||
|
->where('sub_type', 8)
|
||||||
|
->where('is_active', 1)
|
||||||
|
->countAllResults();
|
||||||
|
|
||||||
|
if ($has_truncated) {
|
||||||
|
|
||||||
|
echo "has_truncated";
|
||||||
|
// Get all entries with same details (including truncated)
|
||||||
|
$entries = $db->table('cash_deposit')
|
||||||
|
->where('client_id', $client_id)
|
||||||
|
->where('insurer_id', $insurer_id)
|
||||||
|
->where('cd_ac_pk', $cd_ac_pk)
|
||||||
|
->where('client_policy_id', $client_policy_id)
|
||||||
|
->where('event_name', $event_name)
|
||||||
|
->where('is_active', 1)
|
||||||
|
->where('sub_type !=', 8)
|
||||||
|
->get()
|
||||||
|
->getResultArray();
|
||||||
|
|
||||||
|
if (count($entries) > 1) {
|
||||||
|
// Only one entry found (truncated)
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Check if any other entry exists
|
||||||
|
$entry = $db->table('cash_deposit')
|
||||||
|
->where('client_id', $client_id)
|
||||||
|
->where('insurer_id', $insurer_id)
|
||||||
|
->where('cd_ac_pk', $cd_ac_pk)
|
||||||
|
->where('client_policy_id', $client_policy_id)
|
||||||
|
->where('event_name', $event_name)
|
||||||
|
->where('is_active', 1)
|
||||||
|
->get()
|
||||||
|
->getRowArray();
|
||||||
|
|
||||||
|
if (!empty($entry)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -79,6 +79,7 @@ class PolicyTransactionModel extends Model
|
|||||||
'cd_ac_pk',
|
'cd_ac_pk',
|
||||||
'install_due_date',
|
'install_due_date',
|
||||||
'policy_with_corr',
|
'policy_with_corr',
|
||||||
|
'is_cd_reduce_from_bds',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
@ -783,6 +784,19 @@ class PolicyTransactionModel extends Model
|
|||||||
->join('user_profiles AS service_user', 'policy_transaction.serviced_by = service_user.id', 'left')
|
->join('user_profiles AS service_user', 'policy_transaction.serviced_by = service_user.id', 'left')
|
||||||
->where('policy_transaction.is_active', 1)
|
->where('policy_transaction.is_active', 1)
|
||||||
->where('pt_co_share_details.is_active', 1);
|
->where('pt_co_share_details.is_active', 1);
|
||||||
|
|
||||||
|
if (
|
||||||
|
(!in_array(get_role_id(), [1, 5])) &&
|
||||||
|
!(
|
||||||
|
in_array(MANAGEMENT_TEAM_ID, user_team()) ||
|
||||||
|
in_array(FINANCE_TEAM_ID, user_team()) ||
|
||||||
|
in_array(BUSINESS_TEAM_ID, user_team())
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
if (get_role_id() == 4 && in_array(POS_TEAM_ID, user_team())) {
|
||||||
|
$builder->where('policy_transaction.created_by', get_session_userid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check if the start date and end date are provided
|
// Check if the start date and end date are provided
|
||||||
if ($start_date != 0 && $end_date != 0 && $date_type != 0 && $date_type != 'statement_month') {
|
if ($start_date != 0 && $end_date != 0 && $date_type != 0 && $date_type != 'statement_month') {
|
||||||
|
|||||||
@ -732,9 +732,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<?php if ((get_role_id() == 1 || get_role_id() == 5) || (in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()))) { ?>
|
<?php if ((get_role_id() == 1 || get_role_id() == 5) || (in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()) || in_array(POS_TEAM_ID, user_team()))) { ?>
|
||||||
|
|
||||||
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team())) { ?>
|
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(POS_TEAM_ID, user_team()) ) { ?>
|
||||||
<li>
|
<li>
|
||||||
<a href="#policyReports" data-toggle="collapse" class="waves-effect">
|
<a href="#policyReports" data-toggle="collapse" class="waves-effect">
|
||||||
<i class="ri-file-chart-fill"></i>
|
<i class="ri-file-chart-fill"></i>
|
||||||
@ -745,68 +745,76 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="<?= base_url('/policy_tranction/report/list') ?>">BDS</a>
|
<a href="<?= base_url('/policy_tranction/report/list') ?>">BDS</a>
|
||||||
</li>
|
</li>
|
||||||
|
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team())) { ?>
|
||||||
|
<li>
|
||||||
|
<a href="<?= base_url('/policy_tranction/report/report-varience-list') ?>">Variance</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="<?= base_url('/policy_tranction/report/report-outstanding-list') ?>">Outstanding</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="<?= base_url('/bdsReport/irba_report') ?>">IRDA Reports</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="<?= base_url('/bdsReport/renewal_report') ?>">Renewal Reports</a>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if ((get_role_id() == 1 || get_role_id() == 5) || (in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()) )) { ?>
|
||||||
|
<li>
|
||||||
|
<a href="#policyPendingActions" data-toggle="collapse" class="waves-effect">
|
||||||
|
<i class="mdi mdi-timer-sand"></i>
|
||||||
|
<span> Policy Pending Actions </span>
|
||||||
|
</a>
|
||||||
|
<div class="collapse" id="policyPendingActions">
|
||||||
|
<ul class="nav-third-level">
|
||||||
|
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team())) { ?>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?= base_url('/policy_tranction/report/report-varience-list') ?>">Variance</a>
|
<a href="<?= base_url('/policy_tranction/report/report-finance-list') ?>">Finance Team</a>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team())) { ?>
|
||||||
|
<li>
|
||||||
|
<a href="<?= base_url('/policy_tranction/report/report-business-list') ?>">Business Team</a>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if ((get_role_id() == 1 || get_role_id() == 5) || (in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()) )) { ?>
|
||||||
|
<li>
|
||||||
|
<a href="#policyMasters" data-toggle="collapse" class="waves-effect">
|
||||||
|
<i class="ri-database-2-line"></i>
|
||||||
|
<span> Masters </span>
|
||||||
|
</a>
|
||||||
|
<div class="collapse" id="policyMasters">
|
||||||
|
<ul class="nav-third-level">
|
||||||
|
<li>
|
||||||
|
<a href="<?= base_url('/master/cash_deposite/list') ?>">CD Master</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?= base_url('/policy_tranction/report/report-outstanding-list') ?>">Outstanding</a>
|
<a href="<?= base_url('/master/vehicle/list') ?>">Vehicle Master</a>
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="<?= base_url('/bdsReport/irba_report') ?>">IRDA Reports</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="<?= base_url('/bdsReport/renewal_report') ?>">Renewal Reports</a>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<li>
|
<?php if ((get_role_id() == 1 || get_role_id() == 5) || (in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()))) { ?>
|
||||||
<a href="#policyPendingActions" data-toggle="collapse" class="waves-effect">
|
<li>
|
||||||
<i class="mdi mdi-timer-sand"></i>
|
<a href="<?= base_url('/dmsSearch') ?>">
|
||||||
<span> Policy Pending Actions </span>
|
<i class="ri-book-open-line"></i>
|
||||||
</a>
|
<span> Documents</span>
|
||||||
<div class="collapse" id="policyPendingActions">
|
</a>
|
||||||
<ul class="nav-third-level">
|
</li>
|
||||||
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team())) { ?>
|
<?php } ?>
|
||||||
<li>
|
|
||||||
<a href="<?= base_url('/policy_tranction/report/report-finance-list') ?>">Finance Team</a>
|
|
||||||
</li>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team())) { ?>
|
|
||||||
<li>
|
|
||||||
<a href="<?= base_url('/policy_tranction/report/report-business-list') ?>">Business Team</a>
|
|
||||||
</li>
|
|
||||||
<?php } ?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<a href="#policyMasters" data-toggle="collapse" class="waves-effect">
|
|
||||||
<i class="ri-database-2-line"></i>
|
|
||||||
<span> Masters </span>
|
|
||||||
</a>
|
|
||||||
<div class="collapse" id="policyMasters">
|
|
||||||
<ul class="nav-third-level">
|
|
||||||
<li>
|
|
||||||
<a href="<?= base_url('/master/cash_deposite/list') ?>">CD Master</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="<?= base_url('/master/vehicle/list') ?>">Vehicle Master</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<a href="<?= base_url('/dmsSearch') ?>">
|
|
||||||
<i class="ri-book-open-line"></i>
|
|
||||||
<span> Documents</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@ -426,7 +426,7 @@
|
|||||||
<select id="member_ecard_mail_customButton" class="form-control" style="border:none;right: 6px;width: auto;position: absolute;z-index: 1;top: 17px;height: 32px;float: right;" onchange="copyToClipboard(this)">
|
<select id="member_ecard_mail_customButton" class="form-control" style="border:none;right: 6px;width: auto;position: absolute;z-index: 1;top: 17px;height: 32px;float: right;" onchange="copyToClipboard(this)">
|
||||||
<option value="">PlaceHolders</option>
|
<option value="">PlaceHolders</option>
|
||||||
<?php foreach ($placeHolders as $value): ?>
|
<?php foreach ($placeHolders as $value): ?>
|
||||||
<?php if ($value == 'member_name' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'client_name' || $value == 'member_summary') { ?>
|
<?php if ($value) { ?>
|
||||||
<?php $valueChange = str_replace('_', ' ', $value);
|
<?php $valueChange = str_replace('_', ' ', $value);
|
||||||
$valueChange = ucwords($valueChange); ?>
|
$valueChange = ucwords($valueChange); ?>
|
||||||
<option value="{{<?php echo $value; ?>}}"><?php echo $valueChange; ?></option>
|
<option value="{{<?php echo $value; ?>}}"><?php echo $valueChange; ?></option>
|
||||||
|
|||||||
@ -119,6 +119,7 @@
|
|||||||
<input type="hidden" name="client_id" id="client_id_for_edit">
|
<input type="hidden" name="client_id" id="client_id_for_edit">
|
||||||
<input type="hidden" name="insurer_id" id="insurer_id">
|
<input type="hidden" name="insurer_id" id="insurer_id">
|
||||||
<input type="hidden" name="cd_ac_no" id="cd_ac_no">
|
<input type="hidden" name="cd_ac_no" id="cd_ac_no">
|
||||||
|
<input type="hidden" name="cd_ac_pk" id="cd_ac_pk">
|
||||||
<input type="hidden" name="ct_type" id="ct_type">
|
<input type="hidden" name="ct_type" id="ct_type">
|
||||||
<input type="hidden" name="" id="bro_payable_by">
|
<input type="hidden" name="" id="bro_payable_by">
|
||||||
<input type="hidden" name="" id="cop_yes">
|
<input type="hidden" name="" id="cop_yes">
|
||||||
@ -310,6 +311,15 @@
|
|||||||
<label for="policy_with_corr" style="position: relative;top: 33px;left: 25px;"> Policy with Correction</label>
|
<label for="policy_with_corr" style="position: relative;top: 33px;left: 25px;"> Policy with Correction</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label class="switch" style="position: relative;top: 32px;left: 20px;">
|
||||||
|
<input id="is_cd_reduce_from_bds" type="checkbox" name="is_cd_reduce_from_bds">
|
||||||
|
<span class="slider round" style="height: 27px;"></span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label for="is_cd_reduce_from_bds" style="position: relative;top: 33px;left: 25px;">Make Entry in CD <i class="fa fa-info-circle" data-toggle="tooltip" title="Enabling this will affect ( Credit/Debit ) the CD transaction. ( GMC, GPA, EDLI and GTLI, CD transaction from CRM )"></i></label>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
@ -585,6 +595,14 @@ $(document).ready(function(){
|
|||||||
var cd_ac_no = $(this).find('option:selected').attr('data-cd');
|
var cd_ac_no = $(this).find('option:selected').attr('data-cd');
|
||||||
var start_date = $(this).find('option:selected').attr('data-sd');
|
var start_date = $(this).find('option:selected').attr('data-sd');
|
||||||
var end_date = $(this).find('option:selected').attr('data-ed');
|
var end_date = $(this).find('option:selected').attr('data-ed');
|
||||||
|
var policy_type_id = $(this).find('option:selected').attr('data-ptid');
|
||||||
|
|
||||||
|
if(policy_type_id == 1 || policy_type_id == 2 || policy_type_id == 3 || policy_type_id == 4 || policy_type_id == 5 || policy_type_id == 6 || policy_type_id == 7){
|
||||||
|
$('#is_cd_reduce_from_bds').prop('disabled',true).prop('checked', false)
|
||||||
|
}else{
|
||||||
|
$('#is_cd_reduce_from_bds').prop('disabled',false)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// console.log('client_id', client_id);
|
// console.log('client_id', client_id);
|
||||||
// console.log('client_policy_id', client_policy_id);
|
// console.log('client_policy_id', client_policy_id);
|
||||||
@ -596,7 +614,7 @@ $(document).ready(function(){
|
|||||||
$('#policy_no').val(policy_no);
|
$('#policy_no').val(policy_no);
|
||||||
$('#insurer_id').val(insurer);
|
$('#insurer_id').val(insurer);
|
||||||
$('#tpa').val(tpa).change();
|
$('#tpa').val(tpa).change();
|
||||||
$('#cd_ac_no').val(cd_ac_no);
|
// $('#cd_ac_no').val(cd_ac_no);
|
||||||
$('#policy_start_date').val(start_date);
|
$('#policy_start_date').val(start_date);
|
||||||
$('#policy_end_date').val(end_date);
|
$('#policy_end_date').val(end_date);
|
||||||
|
|
||||||
@ -619,6 +637,9 @@ $(document).ready(function(){
|
|||||||
if(res.status == true){
|
if(res.status == true){
|
||||||
if(res.data.length > 0){
|
if(res.data.length > 0){
|
||||||
|
|
||||||
|
$('#ct_type').val(2)
|
||||||
|
$('#cd_ac_pk').val(res.is_copay_yes.cd_ac_pk);
|
||||||
|
$('#cd_ac_no').val(res.cd_master_data.cd_ac_no ?? "");
|
||||||
$('#bro_payable_by').val(res.data[0].bro_payable_by)
|
$('#bro_payable_by').val(res.data[0].bro_payable_by)
|
||||||
|
|
||||||
if(res.is_copay_yes && res.is_copay_yes.co_share == 1){
|
if(res.is_copay_yes && res.is_copay_yes.co_share == 1){
|
||||||
@ -633,9 +654,11 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
$('#ct_type').val(1)
|
||||||
addInsurerColumn()
|
addInsurerColumn()
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
$('#ct_type').val(1)
|
||||||
addInsurerColumn()
|
addInsurerColumn()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -914,6 +937,9 @@ function getPolicyTransactionDataForEndorsementEdit(input){
|
|||||||
$('#last_action_date').val(res.data.last_action_date);
|
$('#last_action_date').val(res.data.last_action_date);
|
||||||
$('#install_due_date').val(res.data.install_due_date);
|
$('#install_due_date').val(res.data.install_due_date);
|
||||||
$('#bro_payable_by').val(res.data.bro_payable_by);
|
$('#bro_payable_by').val(res.data.bro_payable_by);
|
||||||
|
$('#cd_ac_pk').val(res.data.cd_ac_pk);
|
||||||
|
$('#cd_ac_no').val(res.data.cd_ac_no);
|
||||||
|
$('#ct_type').val(res.data.ct_type);
|
||||||
|
|
||||||
if (res.data.policy_with_corr == 1) {
|
if (res.data.policy_with_corr == 1) {
|
||||||
$('#policy_with_corr').prop('checked', true);
|
$('#policy_with_corr').prop('checked', true);
|
||||||
@ -921,6 +947,12 @@ function getPolicyTransactionDataForEndorsementEdit(input){
|
|||||||
$('#policy_with_corr').prop('checked', false);
|
$('#policy_with_corr').prop('checked', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (res.data.is_cd_reduce_from_bds == 1) {
|
||||||
|
$('#is_cd_reduce_from_bds').prop('checked', true).prop('checked', false);
|
||||||
|
} else {
|
||||||
|
$('#is_cd_reduce_from_bds').prop('checked', false);
|
||||||
|
}
|
||||||
|
|
||||||
if (res.data.action_type == 'policy_instalment') {
|
if (res.data.action_type == 'policy_instalment') {
|
||||||
$('.install_due_date_div').show()
|
$('.install_due_date_div').show()
|
||||||
}else{
|
}else{
|
||||||
@ -937,6 +969,13 @@ function getPolicyTransactionDataForEndorsementEdit(input){
|
|||||||
addInsurerColumn();
|
addInsurerColumn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(res.data.policy_type_id == 1 || res.data.policy_type_id == 2 || res.data.policy_type_id == 3 || res.data.policy_type_id == 4 || res.data.policy_type_id == 5 || res.data.policy_type_id == 6 || res.data.policy_type_id == 7){
|
||||||
|
$('#is_cd_reduce_from_bds').prop('disabled',true).prop('checked', false);
|
||||||
|
}else{
|
||||||
|
$('#is_cd_reduce_from_bds').prop('disabled',false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
console.log('No data found');
|
console.log('No data found');
|
||||||
}
|
}
|
||||||
@ -1769,7 +1808,7 @@ function addInsurerColumn() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if(team_id.includes('3')){
|
}else if(team_id.includes('3') || team_id.includes('8')){
|
||||||
|
|
||||||
switch(index) {
|
switch(index) {
|
||||||
case 0: // Insurer selection
|
case 0: // Insurer selection
|
||||||
@ -2155,7 +2194,7 @@ function populateTable(dataArray, status = false) {
|
|||||||
cell.find('input[type="hidden"]').val(status ? data.id : '');
|
cell.find('input[type="hidden"]').val(status ? data.id : '');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}else if(team_id.includes('3')){
|
}else if(team_id.includes('3') || team_id.includes('8')){
|
||||||
switch (rowIndex) {
|
switch (rowIndex) {
|
||||||
case 0: // Insurer selection
|
case 0: // Insurer selection
|
||||||
cell.find('select').val(insurer);
|
cell.find('select').val(insurer);
|
||||||
|
|||||||
@ -698,6 +698,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
'data-itp' : item.itp,
|
'data-itp' : item.itp,
|
||||||
'data-bap' : item.bap,
|
'data-bap' : item.bap,
|
||||||
'data-tpa' : item.tpa_branch_id + '-' + item.tpa_id,
|
'data-tpa' : item.tpa_branch_id + '-' + item.tpa_id,
|
||||||
|
'data-ptid' : item.policy_type_id,
|
||||||
});
|
});
|
||||||
$('#client_policy_id').append(option);
|
$('#client_policy_id').append(option);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -123,6 +123,12 @@
|
|||||||
color: white !important;
|
color: white !important;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:disabled {
|
||||||
|
background-color: #e0e0e0;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="tab-pane fade active show" id="form">
|
<div class="tab-pane fade active show" id="form">
|
||||||
@ -422,6 +428,16 @@
|
|||||||
<label for="policy_with_corr" style="position: relative;top: 33px;left: 25px;"> Policy with Correction</label>
|
<label for="policy_with_corr" style="position: relative;top: 33px;left: 25px;"> Policy with Correction</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label class="switch" style="position: relative;top: 32px;left: 20px;">
|
||||||
|
<input id="is_cd_reduce_from_bds" type="checkbox" name="is_cd_reduce_from_bds">
|
||||||
|
<span class="slider round" style="height: 27px;"></span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label for="is_cd_reduce_from_bds" style="position: relative;top: 33px;left: 25px;"> Make Entry in CD <i class="fa fa-info-circle" data-toggle="tooltip" title="Enabling this will affect ( Credit/Debit ) the CD transaction. ( GMC, GPA, EDLI and GTLI, CD transaction from CRM )"></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- <div class="form-group col-md-3 current_date" style="display: none;">
|
<!-- <div class="form-group col-md-3 current_date" style="display: none;">
|
||||||
<label for="bp_igst">Process Start Date</label>
|
<label for="bp_igst">Process Start Date</label>
|
||||||
<input id="process_start_date" type="text" class="form-control" name="process_start_date" placeholder="DD/MM/YYYY">
|
<input id="process_start_date" type="text" class="form-control" name="process_start_date" placeholder="DD/MM/YYYY">
|
||||||
@ -1352,6 +1368,11 @@ $(document).ready(function(){
|
|||||||
$('#tpa_div').show();
|
$('#tpa_div').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(value == 1 || value == 2 || value == 3 || value == 4 || value == 5 || value == 6 || value == 7){
|
||||||
|
$('#is_cd_reduce_from_bds').prop('disabled',true).prop('checked', false)
|
||||||
|
}else{
|
||||||
|
$('#is_cd_reduce_from_bds').prop('disabled',false)
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1527,6 +1548,12 @@ function getPolicyTransactionDataForEdit(input) {
|
|||||||
$('#tpa_div').show();
|
$('#tpa_div').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(policy_type_id_for_hide_tpa == 1 || policy_type_id_for_hide_tpa == 2 || policy_type_id_for_hide_tpa == 3 || policy_type_id_for_hide_tpa == 4 || policy_type_id_for_hide_tpa == 5 || policy_type_id_for_hide_tpa == 6 || policy_type_id_for_hide_tpa == 7){
|
||||||
|
$('#is_cd_reduce_from_bds').prop('disabled',true).prop('checked', false)
|
||||||
|
}else{
|
||||||
|
$('#is_cd_reduce_from_bds').prop('disabled',false)
|
||||||
|
}
|
||||||
|
|
||||||
if(res.data.client_policy_id != 0 && res.data.client_policy_id != null){
|
if(res.data.client_policy_id != 0 && res.data.client_policy_id != null){
|
||||||
$('#hide_file_upload').show();
|
$('#hide_file_upload').show();
|
||||||
}else{
|
}else{
|
||||||
@ -1744,6 +1771,12 @@ function getPolicyTransactionDataForEdit(input) {
|
|||||||
$('#policy_with_corr').prop('checked', false);
|
$('#policy_with_corr').prop('checked', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (res.data.is_cd_reduce_from_bds == 1) {
|
||||||
|
$('#is_cd_reduce_from_bds').prop('checked', true).prop('checked', false);
|
||||||
|
} else {
|
||||||
|
$('#is_cd_reduce_from_bds').prop('checked', false);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
console.log('No data found');
|
console.log('No data found');
|
||||||
}
|
}
|
||||||
@ -3917,7 +3950,7 @@ function addInsurerColumn() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if(team_id.includes('3')){
|
}else if(team_id.includes('3') || team_id.includes('8')){
|
||||||
|
|
||||||
switch(index) {
|
switch(index) {
|
||||||
case 0: // Insurer selection
|
case 0: // Insurer selection
|
||||||
@ -4312,7 +4345,7 @@ function populateTable(dataArray, cd_ac_pk) {
|
|||||||
cell.find('input[type="hidden"]').val(data.id);
|
cell.find('input[type="hidden"]').val(data.id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}else if(team_id.includes('3')){
|
}else if(team_id.includes('3') || team_id.includes('8')){
|
||||||
|
|
||||||
switch (rowIndex) {
|
switch (rowIndex) {
|
||||||
case 0: // Insurer selection
|
case 0: // Insurer selection
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user