Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
74fb6eb556
@ -161,6 +161,7 @@ $routes->group("/employee", ["filter" => "authMVC"], function ($routes) {
|
|||||||
$routes->get("test-rack-rate", "EmployeeController::testRackRate");
|
$routes->get("test-rack-rate", "EmployeeController::testRackRate");
|
||||||
$routes->post("test-rack-rate", "EmployeeController::testRackRate");
|
$routes->post("test-rack-rate", "EmployeeController::testRackRate");
|
||||||
$routes->get('test_members_list', 'EmployeeController::test_members_list');
|
$routes->get('test_members_list', 'EmployeeController::test_members_list');
|
||||||
|
$routes->post('get_emp_history','EmployeeController::getEmpHistory');
|
||||||
});
|
});
|
||||||
|
|
||||||
$routes->group("/master", ["filter" => "authMVC"], function ($routes) {
|
$routes->group("/master", ["filter" => "authMVC"], function ($routes) {
|
||||||
|
|||||||
@ -27,7 +27,7 @@ class ReimbursementClaimStatusConversation extends Conversation
|
|||||||
|
|
||||||
$this->bot->types();
|
$this->bot->types();
|
||||||
if ($data){
|
if ($data){
|
||||||
$this->say("The claim status for the claim Number {$data['claim_number']} is currently in {$data['claim_status']} status. <br> More Detailed Information is sent to your mail");
|
$this->say("The claim status for the claim Number {$data['claim_number']} is currently in <strong>{$data['client_status']}</strong> status. <br> More Detailed Information is sent to your mail");
|
||||||
$this->bot->startConversation(new doYouWantToContinueConversation());
|
$this->bot->startConversation(new doYouWantToContinueConversation());
|
||||||
}else{
|
}else{
|
||||||
$this->say("No Claim Raised against the user.");
|
$this->say("No Claim Raised against the user.");
|
||||||
|
|||||||
@ -676,13 +676,15 @@ class ClientController extends AdminController
|
|||||||
|
|
||||||
$client_id = $this->request->getPost('client_id');
|
$client_id = $this->request->getPost('client_id');
|
||||||
$insurer_id = $this->request->getPost('insurer_id');
|
$insurer_id = $this->request->getPost('insurer_id');
|
||||||
|
$record_date = $this->request->getPost('record_date');
|
||||||
|
|
||||||
$CD_Account_Number = $this->CDMasterModel
|
$CD_Account_Number = $this->CDMasterModel
|
||||||
->where('client_id', $client_id)
|
->where('client_id', $client_id)
|
||||||
->where('insurer_id', $insurer_id)
|
->where('insurer_id', $insurer_id)
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
// Prepare the array with data
|
// Prepare the array with data
|
||||||
|
$date = \DateTime::createFromFormat('d/m/Y', $record_date);
|
||||||
|
$record_date = $date->format('Y-m-d');
|
||||||
$data = [
|
$data = [
|
||||||
'amount' => $this->request->getPost('amount'),
|
'amount' => $this->request->getPost('amount'),
|
||||||
'sub_type_id' => $this->request->getPost('sub_type_id'),
|
'sub_type_id' => $this->request->getPost('sub_type_id'),
|
||||||
@ -694,7 +696,10 @@ class ClientController extends AdminController
|
|||||||
'description' => $this->request->getPost('description'),
|
'description' => $this->request->getPost('description'),
|
||||||
'transaction_type' => $this->request->getPost('transaction_type') ?: 'Credit',
|
'transaction_type' => $this->request->getPost('transaction_type') ?: 'Credit',
|
||||||
'updated_by' => 1,
|
'updated_by' => 1,
|
||||||
|
'record_date' => $record_date
|
||||||
];
|
];
|
||||||
|
// log_message('error','data for insert'.json_encode($data));die();
|
||||||
|
// print_rr($data);die();
|
||||||
|
|
||||||
|
|
||||||
// Call the saveDeposit function from DepositHelper
|
// Call the saveDeposit function from DepositHelper
|
||||||
|
|||||||
@ -25,6 +25,7 @@ use App\Models\InsurerExcelExportTemplateModel;
|
|||||||
use App\Models\InsurerModel;
|
use App\Models\InsurerModel;
|
||||||
use App\Models\ClientDepositModel;
|
use App\Models\ClientDepositModel;
|
||||||
use App\Models\PolicyPremium2Model;
|
use App\Models\PolicyPremium2Model;
|
||||||
|
use App\Models\AuditHistoryModel;
|
||||||
|
|
||||||
|
|
||||||
use App\Controllers\Jobs;
|
use App\Controllers\Jobs;
|
||||||
@ -64,6 +65,7 @@ class EmployeeController extends AdminController
|
|||||||
protected $insurerModel;
|
protected $insurerModel;
|
||||||
protected $cashDepositModel;
|
protected $cashDepositModel;
|
||||||
protected $PolicyPremium2Model;
|
protected $PolicyPremium2Model;
|
||||||
|
protected $auditHistory;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
@ -84,6 +86,7 @@ class EmployeeController extends AdminController
|
|||||||
$this->insurerModel = new InsurerModel();
|
$this->insurerModel = new InsurerModel();
|
||||||
$this->cashDepositModel = new ClientDepositModel();
|
$this->cashDepositModel = new ClientDepositModel();
|
||||||
$this->PolicyPremium2Model = new PolicyPremium2Model();
|
$this->PolicyPremium2Model = new PolicyPremium2Model();
|
||||||
|
$this->auditHistory = new AuditHistoryModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function list()
|
public function list()
|
||||||
@ -2725,4 +2728,18 @@ class EmployeeController extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getEmpHistory(){
|
||||||
|
|
||||||
|
$emp_id = $this->request->getPost('emp_id');
|
||||||
|
|
||||||
|
$data['emp_history'] = $this->auditHistory->select('field_name,old_value,new_value,created_by,created_at')->where('pk',$emp_id)->where('table_name','employees')->findAll();
|
||||||
|
|
||||||
|
$emp_pol_pk = $this->employeePolicyModel->select('id')->where('employee_id',$emp_id)->first()['id'];
|
||||||
|
$data['emp_pol_history'] = $this->auditHistory->select('field_name,old_value,new_value,created_by,created_at')->where('pk',$emp_pol_pk)->where('table_name','employee_polices')->findAll();
|
||||||
|
|
||||||
|
return $this->respond(['status' => true, 'data' => $data],200);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,6 +66,9 @@ class LeadsController extends BaseController
|
|||||||
protected $clientType;
|
protected $clientType;
|
||||||
protected $leadType;
|
protected $leadType;
|
||||||
protected $leadsStatus;
|
protected $leadsStatus;
|
||||||
|
protected $claim_type_for_gpa;
|
||||||
|
protected $cause_of_death;
|
||||||
|
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
@ -98,6 +101,19 @@ class LeadsController extends BaseController
|
|||||||
'completed_with_corrections' => 'Completed with Corrections',
|
'completed_with_corrections' => 'Completed with Corrections',
|
||||||
'completed_without_corrections' => 'Completed w/o Corrections',
|
'completed_without_corrections' => 'Completed w/o Corrections',
|
||||||
];
|
];
|
||||||
|
$this->claim_type_for_gpa = [
|
||||||
|
'accident_death' => 'Accident Death',
|
||||||
|
'permanent_total_disablement' => 'Permanent Total Disablement',
|
||||||
|
'permanent_partial_disablement' => 'Permanent Partial Disablement',
|
||||||
|
'temporary_total_disablement_benefit' => 'Temporary Total Disablement benefit'
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->cause_of_death = [
|
||||||
|
'natural_death' => 'Natural Death',
|
||||||
|
'suicide' => 'Suicide',
|
||||||
|
'accident' => 'Accident'
|
||||||
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewLeadsList()
|
public function viewLeadsList()
|
||||||
@ -125,7 +141,7 @@ class LeadsController extends BaseController
|
|||||||
// Fetch insurer and TPA branch data
|
// Fetch insurer and TPA branch data
|
||||||
$data['insurer'] = $this->insurerBranchModel->getInsurerBranchesWithInsurerNames();
|
$data['insurer'] = $this->insurerBranchModel->getInsurerBranchesWithInsurerNames();
|
||||||
$data['tpa'] = $this->tpaBranchModel->getTpaBranchesWithTpaNames();
|
$data['tpa'] = $this->tpaBranchModel->getTpaBranchesWithTpaNames();
|
||||||
|
// print_r($data['tpa']);die();
|
||||||
// Fetch sales team members who are active in team 5
|
// Fetch sales team members who are active in team 5
|
||||||
$data['salse_team'] = $this->userModel
|
$data['salse_team'] = $this->userModel
|
||||||
->select('user_profiles.*')
|
->select('user_profiles.*')
|
||||||
@ -136,7 +152,10 @@ class LeadsController extends BaseController
|
|||||||
->findAll();
|
->findAll();
|
||||||
|
|
||||||
// dd($data);
|
// dd($data);
|
||||||
|
$data['lastFiveYears'] = $this->getLastFiveFinancialYears();
|
||||||
|
$data['gpaClaimType'] = $this->claim_type_for_gpa;
|
||||||
|
$data['causeOfDeath'] = $this->cause_of_death;
|
||||||
|
// dd($lastFiveYears);
|
||||||
if ($this->request->is('get')) {
|
if ($this->request->is('get')) {
|
||||||
// Fetch leads data
|
// Fetch leads data
|
||||||
$data ['lead_data_list'] = $this->leadsModel->getLeadDataForLising();
|
$data ['lead_data_list'] = $this->leadsModel->getLeadDataForLising();
|
||||||
@ -272,7 +291,18 @@ class LeadsController extends BaseController
|
|||||||
|
|
||||||
$last_3_years_claims = null;
|
$last_3_years_claims = null;
|
||||||
if($value != 2){
|
if($value != 2){
|
||||||
$last_3_years_claims = $data['finyear'];
|
$last_3_years_claims = [];
|
||||||
|
$finyear = json_decode($data['finyear']);
|
||||||
|
|
||||||
|
foreach ($finyear as $year){
|
||||||
|
$received_policy_type = ($year->finyear[0]->policy_type);
|
||||||
|
if ($value == $received_policy_type){
|
||||||
|
array_push($last_3_years_claims,$year);
|
||||||
|
}else{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$last_3_years_claims = json_encode($last_3_years_claims);
|
||||||
}
|
}
|
||||||
|
|
||||||
$processedData[] = [
|
$processedData[] = [
|
||||||
@ -340,7 +370,7 @@ class LeadsController extends BaseController
|
|||||||
'notes' => $data['notes'] ?? null,
|
'notes' => $data['notes'] ?? null,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
// print_r($processedData);die();
|
||||||
return $processedData;
|
return $processedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2329,4 +2359,26 @@ class LeadsController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getLastFiveFinancialYears() {
|
||||||
|
$currentYear = date('Y');
|
||||||
|
$currentMonth = date('m');
|
||||||
|
|
||||||
|
// In India, the financial year starts from April (04)
|
||||||
|
if ($currentMonth < 4) {
|
||||||
|
$currentYear--; // Adjust year if it's Jan-Mar
|
||||||
|
}
|
||||||
|
|
||||||
|
$financialYears = [];
|
||||||
|
|
||||||
|
for ($i = 0; $i < 5; $i++) {
|
||||||
|
$startYear = $currentYear - $i - 1;
|
||||||
|
$endYear = $currentYear - $i;
|
||||||
|
$financialYears[] = "$startYear-$endYear";
|
||||||
|
}
|
||||||
|
|
||||||
|
return $financialYears;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -224,13 +224,22 @@ class ChatbotHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function getReimbursementClaimStatus($chat_session_info){
|
public static function getReimbursementClaimStatus($chat_session_info){
|
||||||
|
|
||||||
|
$client_claim_status = [
|
||||||
|
'Received' => [1,2,3,4],
|
||||||
|
'Under Process' => [5,6,7,10],
|
||||||
|
'Finished' => [9,11,12],
|
||||||
|
'Rejected' => [8],
|
||||||
|
'Cancelled' => [13,14]
|
||||||
|
];
|
||||||
$emp_id = $chat_session_info['emp_id'];
|
$emp_id = $chat_session_info['emp_id'];
|
||||||
|
log_message('error','emp_id'.$emp_id);
|
||||||
$emp_code = $chat_session_info['emp_code'];
|
$emp_code = $chat_session_info['emp_code'];
|
||||||
$client_id = $chat_session_info['client_id'];
|
$client_id = $chat_session_info['client_id'];
|
||||||
$client_branch_id = $chat_session_info['client_branch_id'];
|
$client_branch_id = $chat_session_info['client_branch_id'];
|
||||||
|
|
||||||
$ticketMaster = new TicketMasterModel();
|
$ticketMaster = new TicketMasterModel();
|
||||||
$data = $ticketMaster->select('tcs.claim_status,ticket_master.claim_number,ticket_master.id')
|
$data = $ticketMaster->select('tcs.id as tcs_id,tcs.claim_status,ticket_master.claim_number,ticket_master.id,ticket_master.emp_name,ticket_master.emp_mail')
|
||||||
// ->join('client_policy cp',"cp.client_id = {$client_id} and cp.client_branch_id = {$client_branch_id} and cp.policy_id = {$policy_id} and cp.is_active = 1")
|
// ->join('client_policy cp',"cp.client_id = {$client_id} and cp.client_branch_id = {$client_branch_id} and cp.policy_id = {$policy_id} and cp.is_active = 1")
|
||||||
->join('ticket_claim_status tcs',"ticket_master.claim_status_id = tcs.id and tcs.is_active = 1")
|
->join('ticket_claim_status tcs',"ticket_master.claim_status_id = tcs.id and tcs.is_active = 1")
|
||||||
->where('ticket_master.emp_id',$emp_id)
|
->where('ticket_master.emp_id',$emp_id)
|
||||||
@ -238,14 +247,38 @@ class ChatbotHelper
|
|||||||
->where('ticket_master.is_active',1)
|
->where('ticket_master.is_active',1)
|
||||||
->orderBy('ticket_master.created_at', 'DESC')
|
->orderBy('ticket_master.created_at', 'DESC')
|
||||||
->first();
|
->first();
|
||||||
|
$server_claim_status = $data['tcs_id'];
|
||||||
|
$matched_key = null;
|
||||||
|
foreach ($client_claim_status as $key => $statuses) {
|
||||||
|
if (in_array($server_claim_status, $statuses)) {
|
||||||
|
$matched_key = $key;
|
||||||
|
break; // Stop loop once found
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
log_message('error','Data from ticket master'.json_encode($data));
|
||||||
|
// print_r($data);
|
||||||
|
// die();
|
||||||
$ticket_controller = new TicketController();
|
$ticket_controller = new TicketController();
|
||||||
|
|
||||||
if (!empty($data)){
|
if (!empty($data) && !empty($matched_key)){
|
||||||
$ticket_id = $data['id'];
|
$ticket_id = $data['id'];
|
||||||
$mail_content = $ticket_controller->constructMailContent($ticket_id);
|
$mail_content = Self::ReimbursementStatusMailTemplate($data['emp_name'],$data['claim_number'],$matched_key);
|
||||||
$mail_response = $ticket_controller->sendTrigger($mail_content);
|
$common = ['mail_type'=>'Claim Status'];
|
||||||
|
$email_id = $data['emp_mail'];
|
||||||
|
$res = MailHelper::send_email(['mail' => $email_id, 'subject' => 'Here is your claim status you requested in bot.', 'message' => $mail_content,'common'=>$common]);
|
||||||
|
|
||||||
|
$res = json_decode($res);
|
||||||
|
log_message('error','res: '.json_encode($res));
|
||||||
|
if($res->status == 'success')
|
||||||
|
{
|
||||||
|
$data['client_status'] = $matched_key;
|
||||||
return $data;
|
return $data;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false;
|
||||||
@ -253,6 +286,283 @@ class ChatbotHelper
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function ReimbursementStatusMailTemplate($emp_name, $claim_number, $client_status) {
|
||||||
|
$template = '
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<!--[if gte mso 9]>
|
||||||
|
<xml>
|
||||||
|
<o:OfficeDocumentSettings>
|
||||||
|
<o:AllowPNG/>
|
||||||
|
<o:PixelsPerInch>96</o:PixelsPerInch>
|
||||||
|
</o:OfficeDocumentSettings>
|
||||||
|
</xml>
|
||||||
|
<![endif]-->
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="x-apple-disable-message-reformatting">
|
||||||
|
<!--[if !mso]><!-->
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"><!--<![endif]-->
|
||||||
|
<title></title>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
@media only screen and (min-width: 640px) {
|
||||||
|
.u-row {
|
||||||
|
width: 620px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.u-row .u-col {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.u-row .u-col-100 {
|
||||||
|
width: 620px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 640px) {
|
||||||
|
.u-row-container {
|
||||||
|
max-width: 100% !important;
|
||||||
|
padding-left: 0px !important;
|
||||||
|
padding-right: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.u-row {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.u-row .u-col {
|
||||||
|
display: block !important;
|
||||||
|
width: 100% !important;
|
||||||
|
min-width: 320px !important;
|
||||||
|
max-width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.u-row .u-col>div {
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.u-row .u-col img {
|
||||||
|
max-width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
table,
|
||||||
|
td,
|
||||||
|
tr {
|
||||||
|
border-collapse: collapse;
|
||||||
|
vertical-align: top
|
||||||
|
}
|
||||||
|
|
||||||
|
.ie-container table,
|
||||||
|
.mso-container table {
|
||||||
|
table-layout: fixed
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
line-height: inherit
|
||||||
|
}
|
||||||
|
|
||||||
|
a[x-apple-data-detectors=true] {
|
||||||
|
color: inherit !important;
|
||||||
|
text-decoration: none !important
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
table,
|
||||||
|
td {
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="clean-body u_body" style="margin: 0;padding: 0;-webkit-text-size-adjust: 100%;background-color: #F9F9F9;color: #000000">
|
||||||
|
<!--[if IE]><div class="ie-container"><![endif]-->
|
||||||
|
<!--[if mso]><div class="mso-container"><![endif]-->
|
||||||
|
<table style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;min-width: 320px;Margin: 0 auto;background-color: #F9F9F9;width:100%" cellpadding="0" cellspacing="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="vertical-align: top">
|
||||||
|
<td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top">
|
||||||
|
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="center" style="background-color: #F9F9F9;"><![endif]-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="u-row-container" style="padding: 0px;background-color: transparent">
|
||||||
|
<div class="u-row" style="margin: 0 auto;min-width: 320px;max-width: 620px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;">
|
||||||
|
<div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;">
|
||||||
|
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:620px;"><tr style="background-color: transparent;"><![endif]-->
|
||||||
|
|
||||||
|
<!--[if (mso)|(IE)]><td align="center" width="620" style="width: 620px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;" valign="top"><![endif]-->
|
||||||
|
<div class="u-col u-col-100" style="max-width: 320px;min-width: 620px;display: table-cell;vertical-align: top;">
|
||||||
|
<div style="height: 100%;width: 100% !important;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;">
|
||||||
|
<!--[if (!mso)&(!IE)]><!-->
|
||||||
|
<div style="box-sizing: border-box; height: 100%; padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;"><!--<![endif]-->
|
||||||
|
|
||||||
|
<table style="font-family:times new roman,times;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:times new roman,times;" align="left">
|
||||||
|
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td style="padding-right: 0px;padding-left: 0px;" align="center">
|
||||||
|
|
||||||
|
<img align="center" border="0" src="https://assets.unlayer.com/projects/263979/1739609649412-nhance_logo.png?w=372px" alt="" title="" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: inline-block !important;border: none;height: auto;float: none;width: 31%;max-width: 186px;" width="186" />
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!--[if (!mso)&(!IE)]><!-->
|
||||||
|
</div><!--<![endif]-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--[if (mso)|(IE)]></td><![endif]-->
|
||||||
|
<!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="u-row-container" style="padding: 0px;background-color: transparent">
|
||||||
|
<div class="u-row" style="margin: 0 auto;min-width: 320px;max-width: 620px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;">
|
||||||
|
<div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;">
|
||||||
|
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:620px;"><tr style="background-color: transparent;"><![endif]-->
|
||||||
|
|
||||||
|
<!--[if (mso)|(IE)]><td align="center" width="620" style="width: 620px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]-->
|
||||||
|
<div class="u-col u-col-100" style="max-width: 320px;min-width: 620px;display: table-cell;vertical-align: top;">
|
||||||
|
<div style="height: 100%;width: 100% !important;">
|
||||||
|
<!--[if (!mso)&(!IE)]><!-->
|
||||||
|
<div style="box-sizing: border-box; height: 100%; padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"><!--<![endif]-->
|
||||||
|
|
||||||
|
<table style="font-family:times new roman,times;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:times new roman,times;" align="left">
|
||||||
|
|
||||||
|
<div style="font-size: 14px; line-height: 140%; text-align: left; word-wrap: break-word;">
|
||||||
|
<p style="line-height: 140%; margin: 0px;"> </p>
|
||||||
|
<p style="line-height: 140%; margin: 0px;">Dear [[member_name]],</p>
|
||||||
|
<p style="line-height: 140%; margin: 0px;">Your Claim Number [[claim_number]] is currently in the <strong>[[status]]</strong> status with us.</p>
|
||||||
|
<p style="line-height: 140%; margin: 0px;"> </p>
|
||||||
|
<p style="line-height: 140%; margin: 0px;"> </p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!--[if (!mso)&(!IE)]><!-->
|
||||||
|
</div><!--<![endif]-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--[if (mso)|(IE)]></td><![endif]-->
|
||||||
|
<!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="u-row-container" style="padding: 0px;background-color: transparent">
|
||||||
|
<div class="u-row" style="margin: 0 auto;min-width: 320px;max-width: 620px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;">
|
||||||
|
<div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;">
|
||||||
|
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:620px;"><tr style="background-color: transparent;"><![endif]-->
|
||||||
|
|
||||||
|
<!--[if (mso)|(IE)]><td align="center" width="620" style="width: 620px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;" valign="top"><![endif]-->
|
||||||
|
<div class="u-col u-col-100" style="max-width: 320px;min-width: 620px;display: table-cell;vertical-align: top;">
|
||||||
|
<div style="height: 100%;width: 100% !important;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;">
|
||||||
|
<!--[if (!mso)&(!IE)]><!-->
|
||||||
|
<div style="box-sizing: border-box; height: 100%; padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;"><!--<![endif]-->
|
||||||
|
|
||||||
|
<table style="font-family:times new roman,times;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:times new roman,times;" align="left">
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<img alt="Alternate image text" src="https://ci3.googleusercontent.com/meips/ADKq_NZ1tC_lDp1mJDJ6iwpQvycq0vGPIeb0bF_z4SVXl6h2csrbTBpjuVtXZuXhPHAIRyGfRvc30Y83qZtaXRsM4_p2B9-yGkYAS56f6UraLELku6bQTXbhUaAyXGeq8TndT-y0vuvSLRhMi8iS9xL62fcwJ8r-MqMCdiwLcvuYRFZHcWeuPmkC_ByeA0H0v3lVozfDHgTThXzpuzsfkMMhg4wcUoxWxVNg4GNkS9dv=s0-d-e1-ft#https://res.cloudinary.com/mailmodo/image/upload/v1731739899/editor/p/86755bd3-1482-4348-86df-ac4c01829407/93af6a8f9f9d7c81c28b1b51d9127cea_fv4fpe.gif" width="22" height="auto" class="CToWUd __web-inspector-hide-shortcut__" data-bit="iit" style="border: 0px solid transparent; height: auto; line-height: 13px; outline: 0px; text-decoration: none; object-fit: cover; border-radius: 0px; display: block; width: 21.9907px; font-size: 13px; margin-left: auto; margin-right: auto;">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table style="font-family:times new roman,times;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:times new roman,times;" align="left">
|
||||||
|
|
||||||
|
<div style="font-size: 14px; line-height: 140%; text-align: center; word-wrap: break-word;">
|
||||||
|
<p style="line-height: 140%; margin: 0px;">ⓒ2024 Nhance India Insurance Broking Pvt Ltd</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!--[if (!mso)&(!IE)]><!-->
|
||||||
|
</div><!--<![endif]-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--[if (mso)|(IE)]></td><![endif]-->
|
||||||
|
<!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--[if (mso)|(IE)]></td></tr></table><![endif]-->
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<!--[if mso]></div><![endif]-->
|
||||||
|
<!--[if IE]></div><![endif]-->
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
';
|
||||||
|
|
||||||
|
// Replace placeholders with actual values
|
||||||
|
$replacedTemplate = str_replace(
|
||||||
|
['[[member_name]]', '[[claim_number]]', '[[status]]'],
|
||||||
|
[$emp_name, $claim_number, $client_status],
|
||||||
|
$template
|
||||||
|
);
|
||||||
|
|
||||||
|
return $replacedTemplate;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -63,6 +63,7 @@ class DepositHelper
|
|||||||
'updated_by' => $data['updated_by'],
|
'updated_by' => $data['updated_by'],
|
||||||
'balance' => $newBalance, // Include the new balance in the data array
|
'balance' => $newBalance, // Include the new balance in the data array
|
||||||
'cd_ac_pk'=> isset($data['cd_ac_pk'])?$data['cd_ac_pk']:null,
|
'cd_ac_pk'=> isset($data['cd_ac_pk'])?$data['cd_ac_pk']:null,
|
||||||
|
'record_date' => $data['record_date'] ?? null
|
||||||
];
|
];
|
||||||
|
|
||||||
// Insert data and get the insert ID
|
// Insert data and get the insert ID
|
||||||
|
|||||||
@ -27,7 +27,8 @@ class ClientDepositModel extends Model
|
|||||||
"endorsement_no",
|
"endorsement_no",
|
||||||
"event_name",
|
"event_name",
|
||||||
"unit",
|
"unit",
|
||||||
"cd_ac_pk"
|
"cd_ac_pk",
|
||||||
|
"record_date"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -46,6 +46,38 @@
|
|||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* Timeline Design */
|
||||||
|
.timeline {
|
||||||
|
position: relative;
|
||||||
|
padding-left: 30px;
|
||||||
|
border-left: 3px solid #007bff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-item {
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-dot {
|
||||||
|
position: absolute;
|
||||||
|
left: -10px;
|
||||||
|
top: 5px;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
background: #007bff;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-content {
|
||||||
|
background: #f8f9fa;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 5px;
|
||||||
|
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<?php $pro_rata_total = 0; $gst_total = 0 ?>
|
<?php $pro_rata_total = 0; $gst_total = 0 ?>
|
||||||
|
|
||||||
<div class="row" id="client_list">
|
<div class="row" id="client_list">
|
||||||
@ -154,6 +186,8 @@
|
|||||||
) {
|
) {
|
||||||
?>
|
?>
|
||||||
<a class="dropdown-item" onclick="get_emp_master_data_for_update(this, '<?= $employee['employee_id'];?>', '<?= $employee['status'];?>')" ><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
<a class="dropdown-item" onclick="get_emp_master_data_for_update(this, '<?= $employee['employee_id'];?>', '<?= $employee['status'];?>')" ><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||||
|
<a class="dropdown-item" onclick="get_emp_history(this, '<?= $employee['employee_id'];?>')" > <i class="mdi mdi-history mr-2 text-muted font-18 vertical-middle"></i>Employee History</a>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if(in_array($employee['policy_type_id'], [2,3,4,5]) && $employee['emp_status'] == 'active' && $employee['status'] == 'active' && !empty($employee['tpa_id'])) { ?>
|
<?php if(in_array($employee['policy_type_id'], [2,3,4,5]) && $employee['emp_status'] == 'active' && $employee['status'] == 'active' && !empty($employee['tpa_id'])) { ?>
|
||||||
@ -270,6 +304,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</div><!-- /.modal -->
|
</div><!-- /.modal -->
|
||||||
|
|
||||||
|
<!-- Modal content for Emp History -->
|
||||||
|
<div class="modal fade" id="emp_history_modal" tabindex="-1" aria-labelledby="emp_history_modal_label" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title" id="emp_history_modal_label">Employee History</h4>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div id = "emp_history_content"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
@ -543,5 +591,92 @@
|
|||||||
if (charcode >= 48 && charcode <= 57 || charcode == 46) return true;
|
if (charcode >= 48 && charcode <= 57 || charcode == 46) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
function showModal() {
|
||||||
|
var myModal = new bootstrap.Modal(document.getElementById('emp_history_modal'));
|
||||||
|
myModal.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_emp_history(input, emp_id) {
|
||||||
|
$('.loader').fadeIn();
|
||||||
|
$('.loader-mask').fadeIn();
|
||||||
|
|
||||||
|
let url = '<?= base_url("employee/get_emp_history")?>';
|
||||||
|
let requestData = { emp_id: emp_id };
|
||||||
|
|
||||||
|
sendAjaxRequestForGlobal(url, 'POST', requestData, function(response) {
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
|
|
||||||
|
if (response.status === true) {
|
||||||
|
console.log('response data length', response.data.emp_history.length);
|
||||||
|
|
||||||
|
// **Clear old data**
|
||||||
|
$('#emp_history_content').html('');
|
||||||
|
|
||||||
|
// **Check if data exists**
|
||||||
|
if (response.data.emp_history.length > 0) {
|
||||||
|
let historyTable = `
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table w-100">
|
||||||
|
<thead class="bg-light">
|
||||||
|
<tr>
|
||||||
|
<th>Field</th>
|
||||||
|
<th>Change</th>
|
||||||
|
<th>User</th>
|
||||||
|
<th>Date/Time</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
`;
|
||||||
|
|
||||||
|
// **Loop through the data dynamically**
|
||||||
|
response.data.emp_history.forEach(row => {
|
||||||
|
historyTable += `
|
||||||
|
<tr>
|
||||||
|
<td>${row.field_name}</td>
|
||||||
|
<td>${row.old_value} => ${row.new_value}</td>
|
||||||
|
<td>${row.created_by}</td>
|
||||||
|
<td>${row.created_at}</td>
|
||||||
|
</tr>
|
||||||
|
`;
|
||||||
|
});
|
||||||
|
|
||||||
|
historyTable += `
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
|
||||||
|
// **Append to modal**
|
||||||
|
$('#emp_history_content').append(historyTable);
|
||||||
|
} else {
|
||||||
|
$('#emp_history_content').html('<p class="text-center text-muted">No history available.</p>');
|
||||||
|
}
|
||||||
|
|
||||||
|
// **Show the modal**
|
||||||
|
showModal();
|
||||||
|
} else {
|
||||||
|
let message = response.message;
|
||||||
|
toastr.error(message, 'ERROR');
|
||||||
|
}
|
||||||
|
}, function(xhr, status, error) {
|
||||||
|
console.error('Error fetching data:', error);
|
||||||
|
console.error(xhr.responseText);
|
||||||
|
toastr.error('An error occurred while fetching the report page.', 'ERROR');
|
||||||
|
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeModal(){
|
||||||
|
var myModalEl = document.getElementById('emp_history_modal');
|
||||||
|
var modalInstance = bootstrap.Modal.getInstance(myModalEl);
|
||||||
|
if (modalInstance) {
|
||||||
|
modalInstance.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -161,28 +161,29 @@ table.dataTable tbody td {
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
|
|
||||||
const table = document.getElementById("tickets-table");
|
const table = document.getElementById("tickets-table");
|
||||||
|
|
||||||
// Create custom dropdown
|
|
||||||
function createCustomDropdown(row) {
|
function createCustomDropdown(row) {
|
||||||
// Get the original dropdown items
|
|
||||||
const originalDropdown = row.querySelector('.dropdown-menu');
|
const originalDropdown = row.querySelector('.dropdown-menu');
|
||||||
if (!originalDropdown) return null;
|
if (!originalDropdown) return null;
|
||||||
|
|
||||||
// Create new dropdown with proper background and spacing
|
|
||||||
const customDropdown = document.createElement('div');
|
const customDropdown = document.createElement('div');
|
||||||
customDropdown.className = 'custom-dropdown-menu';
|
customDropdown.className = 'custom-dropdown-menu';
|
||||||
|
|
||||||
// Copy inner content while maintaining icon alignment
|
// Clone the items but remove their original click handlers
|
||||||
customDropdown.innerHTML = originalDropdown.innerHTML;
|
const items = originalDropdown.querySelectorAll('.dropdown-item');
|
||||||
|
items.forEach(item => {
|
||||||
|
const newItem = item.cloneNode(true);
|
||||||
|
// Preserve the attributes but remove the onclick
|
||||||
|
newItem.removeAttribute('onclick');
|
||||||
|
customDropdown.appendChild(newItem);
|
||||||
|
});
|
||||||
|
|
||||||
return customDropdown;
|
return customDropdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
let activeDropdown = null;
|
let activeDropdown = null;
|
||||||
|
|
||||||
// Add click event listener to rows
|
|
||||||
table.querySelectorAll("tbody tr").forEach(row => {
|
table.querySelectorAll("tbody tr").forEach(row => {
|
||||||
const customDropdown = createCustomDropdown(row);
|
const customDropdown = createCustomDropdown(row);
|
||||||
if (!customDropdown) return;
|
if (!customDropdown) return;
|
||||||
@ -195,46 +196,49 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide any active dropdown
|
|
||||||
if (activeDropdown) {
|
if (activeDropdown) {
|
||||||
activeDropdown.style.display = 'none';
|
activeDropdown.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get click position
|
|
||||||
const rect = event.target.getBoundingClientRect();
|
const rect = event.target.getBoundingClientRect();
|
||||||
|
|
||||||
// Position the dropdown with some offset
|
|
||||||
customDropdown.style.display = 'block';
|
customDropdown.style.display = 'block';
|
||||||
customDropdown.style.position = 'fixed';
|
customDropdown.style.position = 'fixed';
|
||||||
customDropdown.style.left = `${rect.left}px`;
|
customDropdown.style.left = `${rect.left}px`;
|
||||||
customDropdown.style.top = `${rect.bottom + 5}px`; // Add 5px gap
|
customDropdown.style.top = `${rect.bottom + 5}px`;
|
||||||
|
|
||||||
// Set as active dropdown
|
|
||||||
activeDropdown = customDropdown;
|
activeDropdown = customDropdown;
|
||||||
|
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Preserve click handlers and add auto-close
|
// Handle clicks on dropdown items
|
||||||
customDropdown.querySelectorAll('.dropdown-item').forEach(item => {
|
customDropdown.querySelectorAll('.dropdown-item').forEach(item => {
|
||||||
item.addEventListener('click', function(e) {
|
item.addEventListener('click', function(e) {
|
||||||
const onclickAttr = this.getAttribute('onclick');
|
e.preventDefault();
|
||||||
if (onclickAttr) {
|
e.stopPropagation();
|
||||||
eval(onclickAttr);
|
|
||||||
|
// Get the data-id and other attributes from the original button
|
||||||
|
const originalItem = row.querySelector(`.dropdown-item[data-id="${this.getAttribute('data-id')}"]`);
|
||||||
|
|
||||||
|
// For edit functionality
|
||||||
|
if (this.classList.contains('btnEdit')) {
|
||||||
|
const id = this.getAttribute('data-id');
|
||||||
|
if (id) {
|
||||||
|
getLeadsDataForEdit(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For RFQ links
|
||||||
const href = this.getAttribute('href');
|
const href = this.getAttribute('href');
|
||||||
if (href && href !== '#') {
|
if (href && href !== '#' && !this.classList.contains('btnEdit')) {
|
||||||
window.location.href = href;
|
window.location.href = href;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close the dropdown after handling the click
|
// Close the dropdown
|
||||||
if (activeDropdown) {
|
if (activeDropdown) {
|
||||||
activeDropdown.style.display = 'none';
|
activeDropdown.style.display = 'none';
|
||||||
activeDropdown = null;
|
activeDropdown = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
e.stopPropagation();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -281,7 +285,7 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
$('#client_id').select2();
|
$('#client_id').select2();
|
||||||
$('#client_branch_id').select2();
|
$('#client_branch_id').select2();
|
||||||
$('#source_policy_id').select2();
|
// $('#source_policy_id').select2();
|
||||||
$('#salse_person_id').select2({
|
$('#salse_person_id').select2({
|
||||||
placeholder: "Select Salse Person",
|
placeholder: "Select Salse Person",
|
||||||
});
|
});
|
||||||
|
|||||||
@ -107,6 +107,7 @@
|
|||||||
<thead class="bg-light">
|
<thead class="bg-light">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="font-weight-medium">Date</th>
|
<th class="font-weight-medium">Date</th>
|
||||||
|
<th class="font-weight-medium">Record Date</th>
|
||||||
<th class="font-weight-medium">Unit</th>
|
<th class="font-weight-medium">Unit</th>
|
||||||
<th class="font-weight-medium">Policy</th>
|
<th class="font-weight-medium">Policy</th>
|
||||||
<th class="font-weight-medium">Endorsement No</th>
|
<th class="font-weight-medium">Endorsement No</th>
|
||||||
@ -122,6 +123,7 @@
|
|||||||
<?php foreach($depositdata as $row) { ?>
|
<?php foreach($depositdata as $row) { ?>
|
||||||
<tr id="<?php echo $row->id;?>">
|
<tr id="<?php echo $row->id;?>">
|
||||||
<td><?php echo date('d-M-Y h:i A', strtotime($row->created_at)); ?></td>
|
<td><?php echo date('d-M-Y h:i A', strtotime($row->created_at)); ?></td>
|
||||||
|
<td><?php echo isset($row->record_date)? date('d-M-Y', strtotime($row->record_date)):'-' ?></td>
|
||||||
<td><?php echo $row->unit ?? ' - '; ?></td>
|
<td><?php echo $row->unit ?? ' - '; ?></td>
|
||||||
<!-- <td><?php echo $row->policy_name ?? '<center> - </center>'; ?></td> -->
|
<!-- <td><?php echo $row->policy_name ?? '<center> - </center>'; ?></td> -->
|
||||||
<td>
|
<td>
|
||||||
@ -139,8 +141,8 @@
|
|||||||
<td><?php echo $row->endorsement_no ?? '<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><?php echo isset($subTypeOptions[$row->sub_type]) ? $subTypeOptions[$row->sub_type] : ''; ?>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo ($row->transaction_type == 'Credit') ? $row->amount : ''; ?></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->transaction_type == 'Debit') ? $row->amount : '-'; ?></td>
|
||||||
<td><?php echo $row->balance; ?></td>
|
<td><?php echo $row->balance; ?></td>
|
||||||
<td><?php echo $row->description; ?></td>
|
<td><?php echo $row->description; ?></td>
|
||||||
<td><?php echo $row->username; ?></td>
|
<td><?php echo $row->username; ?></td>
|
||||||
@ -205,6 +207,8 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="field-1" class="control-label">Amount<span class="text-danger">*</span></label>
|
<label for="field-1" class="control-label">Amount<span class="text-danger">*</span></label>
|
||||||
<input type="number" class="form-control" id="amount" placeholder="Amount" required>
|
<input type="number" class="form-control" id="amount" placeholder="Amount" required>
|
||||||
|
<br><label for="record_date">Record Date <span class="text-danger"></span></label>
|
||||||
|
<input type="text" class="form-control policy_start_date" id="record_date" name="record_date" placeholder="Record Date">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -264,6 +268,12 @@ $(document).ready(function() {
|
|||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
|
||||||
|
var record_date = flatpickr("#record_date",{
|
||||||
|
dateFormat: "d/m/Y",
|
||||||
|
allowInput: false,
|
||||||
|
|
||||||
|
});
|
||||||
$('#tickets-table').DataTable({
|
$('#tickets-table').DataTable({
|
||||||
dom: "<'row'<'col-sm-0'f><'col-sm-7 text-right'B>>" +
|
dom: "<'row'<'col-sm-0'f><'col-sm-7 text-right'B>>" +
|
||||||
"<'row'<'col-sm-12'tr>>" +
|
"<'row'<'col-sm-12'tr>>" +
|
||||||
@ -293,6 +303,8 @@ $(document).ready(function() {
|
|||||||
paging: true ,
|
paging: true ,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@ -320,6 +332,7 @@ $(document).ready(function() {
|
|||||||
var insurerId = '<?php echo $insurerName->id; ?>';
|
var insurerId = '<?php echo $insurerName->id; ?>';
|
||||||
var transactionTypeValue = $('input[name="transactionMode"]:checked').val();
|
var transactionTypeValue = $('input[name="transactionMode"]:checked').val();
|
||||||
var subType = "";
|
var subType = "";
|
||||||
|
var record_date = $('#record_date').val();
|
||||||
|
|
||||||
if(amount == ""){
|
if(amount == ""){
|
||||||
toastr.warning('Amount field is required')
|
toastr.warning('Amount field is required')
|
||||||
@ -372,7 +385,8 @@ $(document).ready(function() {
|
|||||||
transaction_type: transactionType,
|
transaction_type: transactionType,
|
||||||
sub_type_id: subType, // Include sub_type_id
|
sub_type_id: subType, // Include sub_type_id
|
||||||
client_id: clientId,
|
client_id: clientId,
|
||||||
insurer_id: insurerId
|
insurer_id: insurerId,
|
||||||
|
record_date : record_date
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
// Handle success response
|
// Handle success response
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user