Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev

This commit is contained in:
Gowtham M 2025-11-13 16:09:11 +05:30
commit e6917db425
75 changed files with 1508 additions and 734 deletions

View File

@ -42,6 +42,7 @@ $routes->post("add_advertise_image", "AppContentManagementController::add_advert
$routes->get("add_image_index", "AppContentManagementController::add_image_index");
$routes->get("getAdvertiseImage/(:any)", "AppContentManagementController::getAdvertiseImage/$1");
$routes->get("frontend_content", "AppContentManagementController::frontend_content");
$routes->get('showAdvertiseImage/(:any)', 'AdvertiseController::showAdvertiseImage/$1');
// $routes->get('/', 'LoginController::index');

View File

@ -40,36 +40,58 @@ class AppContentManagementController extends AdminController
// $this->loadLayout('client_onboarding', $data);
}
public function add_advertise_image(){
public function add_advertise_image() {
try {
$file = $this->request->getFile('advertise_image');
//1) original file name for vaildations
$fileName = $file->getClientName(); //original file name for vaildations
$existing = $this->addImgModel->where('name', $fileName)->where('is_active', 1)->first();
if($existing){ return $this->respond(['status' => false, 'message' => 'This file has already been uploaded in active state.'], 400); }
// print_r($this->request->getPost());die;
$uploadFilePath = ROOTPATH . 'public/uploads/advertiseImage/';
$file_name = file_Upload($this->request->getFile('advertise_image'), $uploadFilePath);
$data['id'] = $this->request->getPost('add_image_id');
// $data['created_by'] = get_session_userid();
$data['name'] = $file_name;
//skip 1) and use this
// $fileName = $file->getRandomName(); // Same Name Multiple time upload means different name
if($data['id'] == 0){
$insert = $this->addImgModel->insert($data);
if($insert){
return $this->respond(['status' => true,'code' => 200,'data' => "success"], 200);
if (!$file || !$file->isValid()) {
return $this->respond(['status' => false, 'message' => 'No file uploaded or invalid file.'], 400);
}
}else{
return $this->respond(['status' => false,'code' => 404,'message' => 'no data found'], 200);
$uploadPath = WRITEPATH . 'uploads/advertiseImage/';
if (!is_dir($uploadPath)) mkdir($uploadPath, 0755, true);
}
}else{
$id = $data['id'];
$update = $this->addImgModel->update($id,$data);
if($update){
return $this->respond(['status' => true,'code' => 200,'data' => "success"], 200);
$file->move($uploadPath, $fileName);
}else{
return $this->respond(['status' => false,'code' => 404,'message' => 'no data found'], 200);
}
$id = $this->request->getPost('add_image_id');
$data = ['name' => $fileName];
if ($id == 0) {
$this->addImgModel->insert($data);
} else {
$this->addImgModel->update($id, $data);
}
return $this->respond(['status' => true, 'message' => 'Image saved successfully.']);
} catch (\Exception $e) {
return $this->respond(['status' => false, 'message' => $e->getMessage()], 500);
}
}
public function showAdvertiseImage($fileName)
{
$filePath = WRITEPATH . 'uploads/advertiseImage/' . $fileName;
if (!file_exists($filePath)) {
return $this->response->setStatusCode(404, 'File not found');
}
$mimeType = mime_content_type($filePath);
header('Content-Type: ' . $mimeType);
readfile($filePath);
exit;
}
public function getAdvertiseImage($image_id){
$image_data = $this->addImgModel->select('name')->where(['id' => $image_id])->first();

View File

@ -181,8 +181,8 @@ class BDSReportController extends AdminController
'Client' => 'client'
];
$data['tab_name'] = "IRDA Reports";
$data['page_name'] = "IRDA Report";
return $this->loadLayout('irba_report', $data);
} else {
@ -926,7 +926,7 @@ class BDSReportController extends AdminController
$data['default_end'] = $default_start->format('d-m-Y');
$data['default_start'] = $default_start->modify('-60 days')->format('d-m-Y');
$data['issuer'] = [1 => 'JIBS', 2 => 'Nhance'];
$data['tab_name'] = "Renewal Report";
$data['tab_name'] = "Renewal Reports";
$data['page_name'] = "Renewal Report";
return $this->loadLayout('renewal_search', $data);
} else {
@ -1152,21 +1152,23 @@ class BDSReportController extends AdminController
public function getMultiReport($report_type){
$data['tab_name'] = "BDS Report";
$data['page_name'] = "BDS Report";
$data['tab_name'] = "BDS Reports";
if ($report_type == 1){
$data['page_title'] = "BDS TAT Report";
$data['page_name'] = "BDS TAT Report";
$data['page_title'] = "";
$data['data'] = $this->bdsTATReport(true); // Functional Based called means True
}else if ($report_type == 2){
$data['page_title'] = "Account Manager Status Report";
$data['page_name'] = "Account Manager Status Report";
$data['page_title'] = "";
$data['data'] = $this->accountMangerStatusBDSReport();
}else{
$data['page_title'] = "Account Manager TAT Report";
$data['page_name'] = "Account Manager TAT Report";
$data['page_title'] = "";
$data['data'] = $this->accountManagerTatBDSReport();
}

View File

@ -478,7 +478,7 @@ class ClientController extends AdminController
public function index()
{
$this->myLogger->logme('error', 'Client list function called');
$headerData['tab_name'] = 'Client List';
$headerData['tab_name'] = 'Clients';
$headerData['page_name'] = 'Clients'; // Both Browser Tab name And Page name are same.
$data['clientList'] = $this->clientModel->getCreatedByUserName(1); // passing client_type
$data['client_rm'] = $this->clientRMModel->getAllClientRM();
@ -5644,7 +5644,7 @@ class ClientController extends AdminController
}
public function sendextraparam()
{
{
// $data = db_connect()->table('jobs')->where('id', 1677)->get()->getRowArray();
// // dd($data);
// $return = $this->updatePolicyTransactionDataWhileClinetPolicyUpdate(json_decode($data['payload'], true));
@ -5661,7 +5661,7 @@ class ClientController extends AdminController
// $employeeController = new EmployeeController();
// $employeeController->truncateFileData('633');
$res = $this->getHrAccessData(4005); dd($res);
// $res = $this->getHrAccessData(4075); dd($res);
// ---------- TICKET SERVICE CONTROLLER --------------------------------------------------------------------------------
@ -5702,8 +5702,8 @@ class ClientController extends AdminController
// ---------- POLICY TRANSACTION CONTROLLER --------------------------------------------------------------------------------
$policyTransactionController = new PolicyTransactionController();
// $res = $policyTransactionController->validateInsurerStatement(['file_id' => '57']);
// $res = $policyTransactionController->updateInsurerStatement(['file_id' => '22']);
// $res = $policyTransactionController->validateInsurerStatement(['file_id' => '62']);
// $res = $policyTransactionController->updateInsurerStatement(['file_id' => '62']);
// dd('-----', $res);
// ----------EMP DATA SERVICE CONTROLLER--------------------------------------------------------------------------------
@ -7025,177 +7025,434 @@ class ClientController extends AdminController
return $combinedHrAccessData;
}
// do not remove this commented items
// public function constructHrAccessData($data, $client_id , $pre_client_id)
// {
// // print_rr($data);die;
// $preHrs = $data['pre_hr_data'];
// $postHrs = $data['post_hr_data'];
// $hrAccessTableData = $data['hr_access_table_data'];
// $merged = [];
// // Merge based on mobile and email
// foreach ($postHrs as $post) {
// $found = false;
// foreach ($preHrs as $index => $pre) {
// if ( trim($post['hr_mobile']) == trim($pre['hr_mobile']) && trim($post['hr_mail']) == trim($pre['hr_mail']) ) {
// $merged[] = [
// 'pre_hr_id' => $pre['pre_hr_id'],
// 'post_hr_id' => $post['post_hr_id'],
// 'hr_name' => $post['hr_name'],
// 'hr_mobile' => $post['hr_mobile'],
// 'hr_mail' => $post['hr_mail'],
// 'pre_branch_id' => $pre['pre_branch_id'] ?? null,
// 'post_branch_id' => $post['post_branch_id'] ?? null,
// 'post_branch_name' => $post['post_branch_name'] ?? null
// ];
// unset($preHrs[$index]); // remove matched pre_hr
// $found = true;
// break;
// }
// }
// if (!$found) {
// $merged[] = [
// 'pre_hr_id' => null,
// 'post_hr_id' => $post['post_hr_id'],
// 'hr_name' => $post['hr_name'],
// 'hr_mobile' => $post['hr_mobile'],
// 'hr_mail' => $post['hr_mail'],
// 'pre_branch_id' => $pre['pre_branch_id'] ?? null,
// 'post_branch_id' => $post['post_branch_id'] ?? null ,
// 'post_branch_name' => $post['post_branch_name'] ?? null
// ];
// }
// }
// // Remaining preHrs (not matched)
// foreach ($preHrs as $pre) {
// foreach ($merged as $value) {
// if ( trim($pre['hr_mobile']) == trim($value['hr_mobile']) && trim($pre['hr_mail']) == trim($value['hr_mail']) ) {
// continue 2; // Skip adding this pre_hr as it's already matched
// }
// }
// $merged[] = [
// 'pre_hr_id' => $pre['pre_hr_id'],
// 'post_hr_id' => null,
// 'hr_name' => $pre['hr_name'],
// 'hr_mobile' => $pre['hr_mobile'],
// 'hr_mail' => $pre['hr_mail'],
// 'pre_branch_id' => $pre['pre_branch_id'] ?? null,
// 'post_branch_id' => $post['post_branch_id'] ?? null ,
// 'post_branch_name' => $post['post_branch_name'] ?? null
// ];
// }
// // dd($merged);
// $result = [];
// if (empty($hrAccessTableData)) {
// // No access data — fill result with hr data and other fields as null
// foreach ($merged as $hr) {
// $result[] = [
// 'hr_access_table_pk' => null,
// 'post_client_id' => $client_id ?? null,
// 'pre_hr_id' => $hr['pre_hr_id'] ?? null,
// 'post_hr_id' => $hr['post_hr_id'] ?? null,
// 'allowed_pre_modules' => [],
// 'allowed_post_modules' => [],
// 'allowed_pre_policies' => [],
// 'allowed_active_policies' => [],
// 'allowed_cd' => [],
// 'hr_name' => $hr['hr_name'] ?? null,
// 'hr_mobile' => $hr['hr_mobile'] ?? null,
// 'hr_mail' => $hr['hr_mail'] ?? null,
// 'pre_branch_id' => $hr['pre_branch_id'] ?? null,
// 'post_branch_id' => $hr['post_branch_id'] ?? null ,
// 'post_branch_name' => $hr['post_branch_name'] ?? null ,
// 'pre_client_id' => $pre_client_id ?? null
// ];
// }
// } else {
// // First create a map of HR data by post_hr_id for quick lookup
// $hrMap = [];
// foreach ($merged as $hr) {
// $hrMap[$hr['post_hr_id']] = $hr;
// }
// // Process access data first
// foreach ($hrAccessTableData as $access) {
// $post_hr_id = $access['post_hr_id'];
// // Check if this HR exists in our merged data
// if (isset($hrMap[$post_hr_id])) {
// $hr = $hrMap[$post_hr_id];
// $temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail'];
// // Parse allowed modules
// $allowed_modules = json_decode($access['allowed_modules'], true) ?? null;
// $allowed_pre_modules = $allowed_modules['pre'] ?? [];
// $allowed_post_modules = $allowed_modules['post'] ?? [];
// $result[$temp_arr_key] = [
// 'hr_access_table_pk' => $access['id'] ?? null,
// 'post_client_id' => $access['post_client_id'] ?? null,
// 'pre_hr_id' => $hr['pre_hr_id'] ?? null,
// 'post_hr_id' => $hr['post_hr_id'] ?? null,
// 'allowed_pre_modules' => $allowed_pre_modules,
// 'allowed_post_modules' => $allowed_post_modules,
// 'allowed_pre_policies' => json_decode($access['allowed_pre_policies'], true) ?? [],
// 'allowed_active_policies' => json_decode($access['allowed_active_policies'], true) ?? [],
// 'allowed_cd' => json_decode($access['allowed_cd'], true) ?? [],
// 'hr_name' => $hr['hr_name'],
// 'hr_mobile' => $hr['hr_mobile'],
// 'hr_mail' => $hr['hr_mail'],
// 'pre_branch_id' => $hr['pre_branch_id'] ?? null,
// 'post_branch_id' => $hr['post_branch_id'] ?? null ,
// 'post_branch_name' => $hr['post_branch_name'] ?? null ,
// 'pre_client_id' => $pre_client_id ?? null
// ];
// // Remove from map so we know it's been processed
// unset($hrMap[$post_hr_id]);
// }
// }
// // Now process any remaining HRs that didn't have access records
// foreach ($hrMap as $hr) {
// $temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail'];
// $result[$temp_arr_key] = [
// 'hr_access_table_pk' => null,
// 'post_client_id' => $client_id ?? null,
// 'pre_hr_id' => $hr['pre_hr_id'] ?? null,
// 'post_hr_id' => $hr['post_hr_id'] ?? null,
// 'allowed_pre_modules' => [],
// 'allowed_post_modules' => [],
// 'allowed_pre_policies' => [],
// 'allowed_active_policies' => [],
// 'allowed_cd' => [],
// 'hr_name' => $hr['hr_name'] ?? null,
// 'hr_mobile' => $hr['hr_mobile'] ?? null,
// 'hr_mail' => $hr['hr_mail'] ?? null,
// 'pre_branch_id' => $hr['pre_branch_id'] ?? null,
// 'post_branch_id' => $hr['post_branch_id'] ?? null ,
// 'post_branch_name' => $hr['post_branch_name'] ?? null ,
// 'pre_client_id' => $pre_client_id ?? null
// ];
// }
// }
// $resultData['hr_access_data'] = array_values($result);
// $resultData['pre_policy_data'] = $data['pre_policy_data'];
// $resultData['post_policy_data'] = $data['post_policy_data'];
// $resultData['post_cd_data'] = $data['post_cd_data'];
// return $resultData;
// }
public function constructHrAccessData($data, $client_id , $pre_client_id)
{
// print_rr($data);die;
{
try{
$preHrs = $data['pre_hr_data'];
$postHrs = $data['post_hr_data'];
$hrAccessTableData = $data['hr_access_table_data'];
$merged = [];
$preHrs = $data['pre_hr_data'];
$postHrs = $data['post_hr_data'];
$hrAccessTableData = $data['hr_access_table_data'];
$merged = [];
// Merge based on mobile and email
foreach ($postHrs as $post) {
$found = false;
foreach ($preHrs as $index => $pre) {
// Merge based on mobile and email
foreach ($postHrs as $post) {
$found = false;
foreach ($preHrs as $index => $pre) {
if ( trim($post['hr_mobile']) == trim($pre['hr_mobile']) && trim($post['hr_mail']) == trim($pre['hr_mail']) ) {
if ( trim($post['hr_mobile']) == trim($pre['hr_mobile']) && trim($post['hr_mail']) == trim($pre['hr_mail']) ) {
$merged[] = [
'pre_hr_id' => $pre['pre_hr_id'],
'post_hr_id' => $post['post_hr_id'],
'hr_name' => $post['hr_name'],
'hr_mobile' => $post['hr_mobile'],
'hr_mail' => $post['hr_mail'],
'pre_branch_id' => $pre['pre_branch_id'] ?? null,
'post_branch_id' => $post['post_branch_id'] ?? null,
'post_branch_name' => $post['post_branch_name'] ?? null
];
unset($preHrs[$index]); // remove matched pre_hr
$found = true;
break;
}
}
if (!$found) {
$merged[] = [
'pre_hr_id' => $pre['pre_hr_id'],
'pre_hr_id' => null,
'post_hr_id' => $post['post_hr_id'],
'hr_name' => $post['hr_name'],
'hr_mobile' => $post['hr_mobile'],
'hr_mail' => $post['hr_mail'],
'pre_branch_id' => $pre['pre_branch_id'] ?? null,
'post_branch_id' => $post['post_branch_id'] ?? null,
'post_branch_name' => $post['post_branch_name'] ?? null
'post_branch_id' => $post['post_branch_id'] ?? null ,
'post_branch_name' => $post['post_branch_name'] ?? null
];
unset($preHrs[$index]); // remove matched pre_hr
$found = true;
break;
}
}
if (!$found) {
// Remaining preHrs (not matched)
foreach ($preHrs as $pre) {
foreach ($merged as $value) {
if ( trim($pre['hr_mobile']) == trim($value['hr_mobile']) && trim($pre['hr_mail']) == trim($value['hr_mail']) ) {
continue 2; // Skip adding this pre_hr as it's already matched
}
}
$merged[] = [
'pre_hr_id' => null,
'post_hr_id' => $post['post_hr_id'],
'hr_name' => $post['hr_name'],
'hr_mobile' => $post['hr_mobile'],
'hr_mail' => $post['hr_mail'],
'pre_hr_id' => $pre['pre_hr_id'],
'post_hr_id' => null,
'hr_name' => $pre['hr_name'],
'hr_mobile' => $pre['hr_mobile'],
'hr_mail' => $pre['hr_mail'],
'pre_branch_id' => $pre['pre_branch_id'] ?? null,
'post_branch_id' => $post['post_branch_id'] ?? null ,
'post_branch_name' => $post['post_branch_name'] ?? null
];
}
}
// Remaining preHrs (not matched)
foreach ($preHrs as $pre) {
$result = [];
foreach ($merged as $value) {
if ( trim($pre['hr_mobile']) == trim($value['hr_mobile']) && trim($pre['hr_mail']) == trim($value['hr_mail']) ) {
continue 2; // Skip adding this pre_hr as it's already matched
}
}
$merged[] = [
'pre_hr_id' => $pre['pre_hr_id'],
'post_hr_id' => null,
'hr_name' => $pre['hr_name'],
'hr_mobile' => $pre['hr_mobile'],
'hr_mail' => $pre['hr_mail'],
'pre_branch_id' => $pre['pre_branch_id'] ?? null,
'post_branch_id' => $post['post_branch_id'] ?? null ,
'post_branch_name' => $post['post_branch_name'] ?? null
];
}
if (empty($hrAccessTableData)) {
// dd($merged);
$result = [];
if (empty($hrAccessTableData)) {
// No access data — fill result with hr data and other fields as null
foreach ($merged as $hr) {
$result[] = [
'hr_access_table_pk' => null,
'post_client_id' => $client_id ?? null,
'pre_hr_id' => $hr['pre_hr_id'] ?? null,
'post_hr_id' => $hr['post_hr_id'] ?? null,
'allowed_pre_modules' => [],
'allowed_post_modules' => [],
'allowed_pre_policies' => [],
'allowed_active_policies' => [],
'allowed_cd' => [],
'hr_name' => $hr['hr_name'] ?? null,
'hr_mobile' => $hr['hr_mobile'] ?? null,
'hr_mail' => $hr['hr_mail'] ?? null,
'pre_branch_id' => $hr['pre_branch_id'] ?? null,
'post_branch_id' => $hr['post_branch_id'] ?? null ,
'post_branch_name' => $hr['post_branch_name'] ?? null ,
'pre_client_id' => $pre_client_id ?? null
];
}
} else {
// First create a map of HR data by post_hr_id for quick lookup
$hrMap = [];
foreach ($merged as $hr) {
$hrMap[$hr['post_hr_id']] = $hr;
}
// Process access data first
foreach ($hrAccessTableData as $access) {
$post_hr_id = $access['post_hr_id'];
// Check if this HR exists in our merged data
if (isset($hrMap[$post_hr_id])) {
$hr = $hrMap[$post_hr_id];
$temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail'];
// Parse allowed modules
$allowed_modules = json_decode($access['allowed_modules'], true) ?? null;
$allowed_pre_modules = $allowed_modules['pre'] ?? [];
$allowed_post_modules = $allowed_modules['post'] ?? [];
$result[$temp_arr_key] = [
'hr_access_table_pk' => $access['id'] ?? null,
'post_client_id' => $access['post_client_id'] ?? null,
// No access data — fill result with hr data and other fields as null
foreach ($merged as $hr) {
$result[] = [
'hr_access_table_pk' => null,
'post_client_id' => $client_id ?? null,
'pre_hr_id' => $hr['pre_hr_id'] ?? null,
'post_hr_id' => $hr['post_hr_id'] ?? null,
'allowed_pre_modules' => $allowed_pre_modules,
'allowed_post_modules' => $allowed_post_modules,
'allowed_pre_policies' => json_decode($access['allowed_pre_policies'], true) ?? [],
'allowed_active_policies' => json_decode($access['allowed_active_policies'], true) ?? [],
'allowed_cd' => json_decode($access['allowed_cd'], true) ?? [],
'hr_name' => $hr['hr_name'],
'hr_mobile' => $hr['hr_mobile'],
'hr_mail' => $hr['hr_mail'],
'allowed_pre_modules' => [],
'allowed_post_modules' => [],
'allowed_pre_policies' => [],
'allowed_active_policies' => [],
'allowed_cd' => [],
'hr_name' => $hr['hr_name'] ?? null,
'hr_mobile' => $hr['hr_mobile'] ?? null,
'hr_mail' => $hr['hr_mail'] ?? null,
'pre_branch_id' => $hr['pre_branch_id'] ?? null,
'post_branch_id' => $hr['post_branch_id'] ?? null ,
'post_branch_name' => $hr['post_branch_name'] ?? null ,
'pre_client_id' => $pre_client_id ?? null
];
}
// Remove from map so we know it's been processed
unset($hrMap[$post_hr_id]);
} else {
// First create a map of HR data by post_hr_id for quick lookup
$hrMap = [];
foreach ($merged as $hr) {
if(!empty($hr['post_hr_id'])){
$hrMap['post_hr_id_' . $hr['post_hr_id']] = $hr;
}else{
$hrMap['pre_hr_id_' . $hr['pre_hr_id']] = $hr;
}
}
// Process access data first
foreach ($hrAccessTableData as $access) {
$post_hr_id = $access['post_hr_id'];
$pre_hr_id = $access['pre_hr_id'];
if (empty($post_hr_id) && !empty($pre_hr_id)) {
$type_of_access_data = "PRE";
} elseif (!empty($post_hr_id) && empty($pre_hr_id)) {
$type_of_access_data = "POST";
} elseif (!empty($post_hr_id) && !empty($pre_hr_id)) {
$type_of_access_data = "POST&PRE";
} else {
$type_of_access_data = "UNKNOWN";
}
// Check if this HR exists in our merged data
if (isset($hrMap['post_hr_id_' . $post_hr_id])) {
$hr = $hrMap['post_hr_id_' . $post_hr_id];
$temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail'] . $post_hr_id;
// Parse allowed modules
$allowed_modules = json_decode($access['allowed_modules'], true) ?? null;
$allowed_pre_modules = $allowed_modules['pre'] ?? [];
$allowed_post_modules = $allowed_modules['post'] ?? [];
$result[$temp_arr_key] = [
'hr_access_table_pk' => $access['id'] ?? null,
'post_client_id' => $access['post_client_id'] ?? null,
'pre_hr_id' => $hr['pre_hr_id'] ?? null,
'post_hr_id' => $hr['post_hr_id'] ?? null,
'allowed_pre_modules' => $allowed_pre_modules,
'allowed_post_modules' => $allowed_post_modules,
'allowed_pre_policies' => json_decode($access['allowed_pre_policies'], true) ?? [],
'allowed_active_policies' => json_decode($access['allowed_active_policies'], true) ?? [],
'allowed_cd' => json_decode($access['allowed_cd'], true) ?? [],
'hr_name' => $hr['hr_name'],
'hr_mobile' => $hr['hr_mobile'],
'hr_mail' => $hr['hr_mail'],
'pre_branch_id' => $hr['pre_branch_id'] ?? null,
'post_branch_id' => $hr['post_branch_id'] ?? null ,
'post_branch_name' => $hr['post_branch_name'] ?? null ,
'pre_client_id' => $pre_client_id ?? null,
'type_of_access_data' => $type_of_access_data ?? null
];
// Remove from map so we know it's been processed
unset($hrMap['post_hr_id_' . $post_hr_id]);
}else if (isset($hrMap['pre_hr_id_' . $pre_hr_id])){
$hr = $hrMap['pre_hr_id_' . $pre_hr_id];
$temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail'] . $post_hr_id;
// Parse allowed modules
$allowed_modules = json_decode($access['allowed_modules'], true) ?? null;
$allowed_pre_modules = $allowed_modules['pre'] ?? [];
$allowed_post_modules = $allowed_modules['post'] ?? [];
$result[$temp_arr_key] = [
'hr_access_table_pk' => $access['id'] ?? null,
'post_client_id' => $access['post_client_id'] ?? null,
'pre_hr_id' => $hr['pre_hr_id'] ?? null,
'post_hr_id' => $hr['post_hr_id'] ?? null,
'allowed_pre_modules' => $allowed_pre_modules,
'allowed_post_modules' => $allowed_post_modules,
'allowed_pre_policies' => json_decode($access['allowed_pre_policies'], true) ?? [],
'allowed_active_policies' => json_decode($access['allowed_active_policies'], true) ?? [],
'allowed_cd' => json_decode($access['allowed_cd'], true) ?? [],
'hr_name' => $hr['hr_name'],
'hr_mobile' => $hr['hr_mobile'],
'hr_mail' => $hr['hr_mail'],
'pre_branch_id' => $hr['pre_branch_id'] ?? null,
'post_branch_id' => $hr['post_branch_id'] ?? null ,
'post_branch_name' => $hr['post_branch_name'] ?? null ,
'pre_client_id' => $pre_client_id ?? null,
'type_of_access_data' => $type_of_access_data ?? null
];
// Remove from map so we know it's been processed
unset($hrMap['pre_hr_id_' . $pre_hr_id]);
}
}
// Now process any remaining HRs that didn't have access records
foreach ($hrMap as $hr) {
$temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail'];
$post_hr_id = $hr['post_hr_id'];
$pre_hr_id = $hr['pre_hr_id'];
if (empty($post_hr_id) && !empty($pre_hr_id)) {
$type_of_access_data = "PRE";
} elseif (!empty($post_hr_id) && empty($pre_hr_id)) {
$type_of_access_data = "POST";
} elseif (!empty($post_hr_id) && !empty($pre_hr_id)) {
$type_of_access_data = "POST&PRE";
} else {
$type_of_access_data = "UNKNOWN";
}
$result[$temp_arr_key] = [
'hr_access_table_pk' => null,
'post_client_id' => $client_id ?? null,
'pre_hr_id' => $hr['pre_hr_id'] ?? null,
'post_hr_id' => $hr['post_hr_id'] ?? null,
'allowed_pre_modules' => [],
'allowed_post_modules' => [],
'allowed_pre_policies' => [],
'allowed_active_policies' => [],
'allowed_cd' => [],
'hr_name' => $hr['hr_name'] ?? null,
'hr_mobile' => $hr['hr_mobile'] ?? null,
'hr_mail' => $hr['hr_mail'] ?? null,
'pre_branch_id' => $hr['pre_branch_id'] ?? null,
'post_branch_id' => $hr['post_branch_id'] ?? null ,
'post_branch_name' => $hr['post_branch_name'] ?? null ,
'pre_client_id' => $pre_client_id ?? null,
'type_of_access_data' => $type_of_access_data ?? null
];
}
}
// Now process any remaining HRs that didn't have access records
foreach ($hrMap as $hr) {
$temp_arr_key = $hr['hr_mobile'] . $hr['hr_mail'];
// dd($result);
$resultData['hr_access_data'] = array_values($result);
$resultData['pre_policy_data'] = $data['pre_policy_data'];
$resultData['post_policy_data'] = $data['post_policy_data'];
$resultData['post_cd_data'] = $data['post_cd_data'];
$result[$temp_arr_key] = [
'hr_access_table_pk' => null,
'post_client_id' => $client_id ?? null,
'pre_hr_id' => $hr['pre_hr_id'] ?? null,
'post_hr_id' => $hr['post_hr_id'] ?? null,
'allowed_pre_modules' => [],
'allowed_post_modules' => [],
'allowed_pre_policies' => [],
'allowed_active_policies' => [],
'allowed_cd' => [],
'hr_name' => $hr['hr_name'] ?? null,
'hr_mobile' => $hr['hr_mobile'] ?? null,
'hr_mail' => $hr['hr_mail'] ?? null,
'pre_branch_id' => $hr['pre_branch_id'] ?? null,
'post_branch_id' => $hr['post_branch_id'] ?? null ,
'post_branch_name' => $hr['post_branch_name'] ?? null ,
'pre_client_id' => $pre_client_id ?? null
];
}
return $resultData;
} catch (\Throwable $th) {
$this->myLogger->logme("error", "REST-AUTH-CONTROLLER - updateInsurerStatement: Exception: " . $th->getMessage() . " --- Line: " . $th->getLine() . " --- Trace: " . $th->getTraceAsString());
return [];
$errorData = [
'message' => $th->getMessage(),
'file' => $th->getFile(),
'line' => $th->getLine(),
'code' => $th->getCode(),
'trace' => $th->getTraceAsString(),
'trace_array' => $th->getTrace(), // full array version (optional)
'function' => $th->getTrace()[0]['function'] ?? null,
'class' => $th->getTrace()[0]['class'] ?? null,
];
return ['status' => 'failed', 'code' => 500, 'message' => $th->getMessage(), 'error_data' => $errorData];
}
$resultData['hr_access_data'] = array_values($result);
$resultData['pre_policy_data'] = $data['pre_policy_data'];
$resultData['post_policy_data'] = $data['post_policy_data'];
$resultData['post_cd_data'] = $data['post_cd_data'];
return $resultData;
}
public function saveHrAccessData()
@ -7236,7 +7493,6 @@ class ClientController extends AdminController
$post_hr_id = $value['post_hr_id'];
// $preBranchId = $this->getPreBranchIdByPostBranchId($post_branch_id);
// if (!empty($preBranchId)) {
// $value['pre_branch_id'] = $preBranchId;
// $value['pre_client_id'] = $this->getPreClientIdByPreBranchId($preBranchId);
@ -7847,7 +8103,4 @@ class ClientController extends AdminController
}

View File

@ -136,7 +136,7 @@ class EmployeeController extends AdminController
// dd($this->request->getGet());
$this->myLogger->logme('error', 'list called');
$data['tab_name'] = 'Members';
$data['page_name'] = "Members";
$this->loadLayout('employee_list', $data);
@ -795,7 +795,8 @@ class EmployeeController extends AdminController
$this->myLogger->logme('error', 'list called');
$data['page_name'] = "Endorsement";
$data['tab_name'] = "Endorsements";
$data['page_name'] = "Endorsements";
$this->loadLayout('endorsement_list', $data);
}
@ -2810,6 +2811,9 @@ class EmployeeController extends AdminController
$data['employees'] = $employee_data;
$data['clients'] = $this->clientModel->findAll();
// dd($data);
$data['tab_name'] = "Employees";
$data['page_name'] = "Employees";
return $this->loadLayout('test_members_list',$data);
}
@ -3107,6 +3111,7 @@ class EmployeeController extends AdminController
// print_r($data); die;
// }
$data['tab_name'] = "Retail Endorsement";
$data['page_name'] = "Retail Endorsement";
$this->loadLayout('retail_endorsement_list', $data);

View File

@ -506,7 +506,8 @@ class EmployeeRestController extends AdminController
if ($dateTime instanceof \DateTime) {
return $dateTime->format('Y-m-d');
} else {
return null;
// return null;
return change_date_format($dateString);
}
}
@ -1714,7 +1715,7 @@ class EmployeeRestController extends AdminController
try {
$client = $this->clientModel->where('id',$this->request->getGet('client_id'))->first();
if($client) {
if(!empty($client)) {
$client['client_logo'] = base_url().'public/uploads/logo/'.$client['client_logo'];
$clientPolicy = $this->clientPolicyModel->where('client_id',$this->request->getGet('client_id'))
->where('client_branch_id',$this->request->getGet('client_branch_id'))->findAll();

View File

@ -110,7 +110,7 @@ class MasterController extends AdminController
public function insurerList()
{
$this->myLogger->logme('error','Insurer list function called');
$headerData['tab_name'] = 'Insurer List';
$headerData['tab_name'] = 'Insurer Masters';
$headerData['page_name'] = 'Insurers';
$data['insurerList'] = $this->insurerModel->where('is_active',1)->findAll();
$data['insurer_rm'] = $this->insurerRMModel->getAllClientRM();
@ -250,7 +250,7 @@ class MasterController extends AdminController
{
$this->myLogger->logme('error','Insurer Onboarding function called');
$headerData['tab_name'] = 'Insurer Master';
$headerData['tab_name'] = 'Insurer Masters';
$headerData['page_name'] = 'Insurers';
$types = array(
@ -519,7 +519,7 @@ class MasterController extends AdminController
public function tpaList()
{
$this->myLogger->logme('error','TPA list function called');
$headerData['tab_name'] = 'TPA List';
$headerData['tab_name'] = 'TPA Masters';
$headerData['page_name'] = 'TPA';
$data['tpaList'] = $this->tpaModel->where('is_active',1)->findAll();
// $data['insurer_rm'] = $this->insurerRMModel->getAllClientRM();
@ -566,7 +566,7 @@ class MasterController extends AdminController
{
$this->myLogger->logme('error','TPA Onboarding function called');
$headerData['tab_name'] = 'TPA Master';
$headerData['tab_name'] = 'TPA Masters';
$headerData['page_name'] = 'TPA';
@ -851,7 +851,7 @@ class MasterController extends AdminController
public function kycList()
{
$this->myLogger->logme('error','KYC list function called');
$headerData['tab_name'] = 'KYC List';
$headerData['tab_name'] = 'KYC Masters';
$headerData['page_name'] = 'KYC';
$data['kycList'] = $this->kycEntityTypeModel->where('is_active',1)->findAll();
// $data['insurer_rm'] = $this->insurerRMModel->getAllClientRM();
@ -898,7 +898,7 @@ class MasterController extends AdminController
{
$this->myLogger->logme('error','KYC Onboarding function called');
$headerData['tab_name'] = 'KYC Master';
$headerData['tab_name'] = 'KYC Masters';
$headerData['page_name'] = 'KYC';
@ -1043,7 +1043,7 @@ class MasterController extends AdminController
public function policyTypeList()
{
$this->myLogger->logme('error','Policy Type list function called');
$headerData['tab_name'] = 'Policy Type List';
$headerData['tab_name'] = 'Policy Type Masters';
$headerData['page_name'] = 'Policy Type';
$data['policyList'] = $this->policyTypeModel->where('is_active',1)->findAll();
// $data['insurer_rm'] = $this->insurerRMModel->getAllClientRM();
@ -1090,7 +1090,7 @@ class MasterController extends AdminController
{
$this->myLogger->logme('error','Policy Type Onboarding function called');
$headerData['tab_name'] = 'Policy Type Master';
$headerData['tab_name'] = 'Policy Type Masters';
$headerData['page_name'] = 'Policy Type';
@ -1246,7 +1246,7 @@ class MasterController extends AdminController
//start CD Master list
public function CDMasterList()
{
$data['tab_name'] = 'CD Master List';
$data['tab_name'] = 'CD Masters';
$data['page_name'] = 'CD Master';
$data['CD_Master_Data'] = $this->CDMasterModel->getCDMasterList();
$data['insurers'] = $this->insurerModel->where('is_active', 1)->findAll();
@ -1668,7 +1668,7 @@ class MasterController extends AdminController
public function VehicleMasterList()
{
$data['tab_name'] = 'Vehicle Master';
$data['tab_name'] = 'Vehicle Masters';
$data['page_name'] = 'Vehicles';
$data['vehicle_type'] = [
'two_wheeler' => 'Two Wheeler',
@ -2076,9 +2076,7 @@ class MasterController extends AdminController
{
$nhanceBranchModel = new NhanceBranchModel();
$method = $this->request->getMethod();
$data['tab_name'] = 'Nhance Branch';
$data['page_name'] = 'Nhance Branchs';
if ($method === 'post') {
$id = $this->request->getPost('pk') ?? null;
@ -2120,7 +2118,7 @@ class MasterController extends AdminController
}
$data = $nhanceBranchModel->where('is_active', 1)->orderBy('id', 'DESC')->findAll();
return $this->loadLayout('nhance_branch_list', ['data' => $data]);
return $this->loadLayout('nhance_branch_list', ['data' => $data,'tab_name' => 'Nhance Branchs','page_name' => 'Nhance Branchs']);
} elseif ($method === 'delete') {
@ -2160,8 +2158,7 @@ class MasterController extends AdminController
{
$vehicleTypeModel = new VehicleTypeModel();
$method = $this->request->getMethod();
$data['tab_name'] = 'Vehicle Type';
$data['page_name'] = 'Vehicle Types';
if ($method === 'post') {
$id = $this->request->getPost('pk') ?? null;
@ -2203,7 +2200,7 @@ class MasterController extends AdminController
}
$data = $vehicleTypeModel->where('is_active', 1)->orderBy('id', 'DESC')->findAll();
return $this->loadLayout('vehicle_type_master_list', ['data' => $data]);
return $this->loadLayout('vehicle_type_master_list', ['data' => $data,'tab_name' => 'Vehicle Types','page_name' => 'Vehicle Types']);
} elseif ($method === 'delete') {
@ -2242,8 +2239,6 @@ class MasterController extends AdminController
{
$rtoModel = new RTOModel();
$method = $this->request->getMethod();
$data['tab_name'] = 'RTO';
$data['page_name'] = 'RTO';
if ($method === 'post') {
@ -2286,7 +2281,7 @@ class MasterController extends AdminController
}
$data = $rtoModel->where('is_active', 1)->orderBy('id', 'DESC')->findAll();
return $this->loadLayout('rto_master_list', ['data' => $data]);
return $this->loadLayout('rto_master_list', ['data' => $data,'tab_name' => 'RTO Masters','page_name' => 'RTO']);
} elseif ($method === 'delete') {

View File

@ -115,8 +115,8 @@
public function viewInception()
{
$bds_edit_pt_id = $this->request->getGet('pt_id') ?? null;
$data['tab_name'] = 'Policy';
$data['page_name'] = 'Policy';
$data['tab_name'] = 'Policies';
$data['page_name'] = 'Policies';
// Static arrays for dropdowns
$data['issuer'] = [1 => 'JIBS', 2 => 'Nhance'];
@ -2187,6 +2187,8 @@
->join('insurer_branch', 'insurer_statements.branch_id = insurer_branch.id')
->join('user_profiles', 'insurer_statements.created_by = user_profiles.id')
->where('insurer_statements.is_active', 1)
->where('insurers.is_active', 1)
->where('insurer_branch.is_active', 1)
// ->where('insurer_statements.file_status','success')
->where('date(insurer_statements.created_at) >= ', $from_date)
->where('date(insurer_statements.created_at) <= ', $today)
@ -2382,7 +2384,7 @@
$excel_data = $sheet->rangeToArray('A1:' . $highestRowAndColumn['column'] . $highestRowAndColumn['row']);
unset($excel_data[0]);
$excel_data = ExcelSanitizeHelper::sanitizeArrayData($excel_data);
// Kint::dump($excel_data);die();
// Kint::dump($excel_data); // die();
//get no of line items and update in DB
$line_items = 0;
// get uploaded month transactions data
@ -2508,89 +2510,105 @@
// check policy no,insurer and etc in DB for this month
// if all good return true, otherwise return false with messssage
$data_to_update = [];
foreach ($excel_data as $excel_key => $excel_row) {
$is_row_empty = check_row_is_empty_or_null($excel_row);
if (!$is_row_empty) {
try{
foreach ($excel_data as $excel_key => $excel_row) {
$is_row_empty = check_row_is_empty_or_null($excel_row);
if (!$is_row_empty) {
$is_source_found = 0;
// $policy_start_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[4]); //policy_start_date from excel
// $policy_end_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[5]); //policy_end_date from excel
$policy_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[1]); //policy_end_date from excel
$policy_no = preg_replace('/[\x{200C}\x{200B}]/u', '', $excel_row[1]); //
// $client_name = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[3]); //clientname from excel
$endorsement_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[2]); //policy_end_date from excel
$is_source_found = 0;
// $policy_start_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[4]); //policy_start_date from excel
// $policy_end_date = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[5]); //policy_end_date from excel
$policy_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[1]); //policy_end_date from excel
$policy_no = preg_replace('/[\x{200C}\x{200B}]/u', '', $excel_row[1]); //
// $client_name = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[3]); //clientname from excel
$endorsement_no = preg_replace('/^\p{Z}+|\p{Z}+$/u', '', $excel_row[2]); //policy_end_date from excel
foreach ($source_data as $source_key => $source_row) {
// Kint::dump(change_date_format($excel_row[3],'d-m-Y','Y-m-d'));
$source_endorsement_no = $source_row['endorsement_no'] !== null ? $source_row['endorsement_no'] : null;
// if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no && change_date_format($policy_start_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_start_date'] && change_date_format($policy_end_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_end_date'] && $client_name == $source_row['client_name']) {
if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no) {
$is_source_found = 1;
foreach ($source_data as $source_key => $source_row) {
// Kint::dump(change_date_format($excel_row[3],'d-m-Y','Y-m-d'));
$source_endorsement_no = $source_row['endorsement_no'] !== null ? $source_row['endorsement_no'] : null;
// if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no && change_date_format($policy_start_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_start_date'] && change_date_format($policy_end_date, 'd-m-Y', 'Y-m-d') == $source_row['policy_end_date'] && $client_name == $source_row['client_name']) {
if (($policy_no == $source_row['policy_no']) && $endorsement_no == $source_endorsement_no) {
$is_source_found = 1;
//calculate percentage first
$total_amt = 0;
//calculate percentage first
$total_amt = 0;
// $actual_bp_per = trim($excel_row[9]); //commented becoz this filed removed tfrom excel file
$actual_bp_per = 0; //set default value 0 for maintaining existing code flow
$actual_bp_brokerage = trim($excel_row[5]);
$actual_bp_amt = trim($excel_row[3]);
// $actual_bp_per = trim($excel_row[9]); //commented becoz this filed removed tfrom excel file
$actual_bp_per = 0; //set default value 0 for maintaining existing code flow
$actual_bp_brokerage = (int) trim($excel_row[5]);
$actual_bp_amt = (int) trim($excel_row[3]);
if (($actual_bp_brokerage && $actual_bp_brokerage != 0 && $actual_bp_brokerage != "")) {
$total_amt += $actual_bp_brokerage;
//percentage reverse calculation
if (($actual_bp_per == 0 || $actual_bp_per == 0) && !empty($actual_bp_amt)) {
$actual_bp_per = round(($actual_bp_brokerage / $actual_bp_amt) * 100, 2);
if (($actual_bp_brokerage && $actual_bp_brokerage != 0 && $actual_bp_brokerage != "")) {
$total_amt += $actual_bp_brokerage;
//percentage reverse calculation
if (($actual_bp_per == 0 || $actual_bp_per == 0) && !empty($actual_bp_amt)) {
$actual_bp_per = (int) round(($actual_bp_brokerage / $actual_bp_amt) * 100, 2);
}
} else {
$actual_bp_brokerage = $actual_bp_amt * ($actual_bp_per / 100);
$total_amt += $actual_bp_brokerage;
}
} else {
$actual_bp_brokerage = $actual_bp_amt * ($actual_bp_per / 100);
$total_amt += $actual_bp_brokerage;
}
// $actual_tp_per = trim($excel_row[10]);//commented becoz this filed removed tfrom excel file
$actual_tp_per = 0;//set default value 0 for maintaining existing code flow
$actual_tp_brokerage = trim($excel_row[6]);
$actual_tp_amt = trim($excel_row[4]);
// $actual_tp_per = trim($excel_row[10]);//commented becoz this filed removed tfrom excel file
$actual_tp_per = 0;//set default value 0 for maintaining existing code flow
$actual_tp_brokerage = (int) trim($excel_row[6]);
$actual_tp_amt = (int) trim($excel_row[4]);
if ($actual_tp_brokerage && $actual_tp_brokerage != 0 && $actual_tp_brokerage != "") {
$total_amt += $actual_tp_brokerage;
//percentage reverse calculation
if (($actual_tp_per == 0 || $actual_tp_per == "") && !empty($actual_tp_amt)) {
$actual_tp_per = ($actual_tp_brokerage / $actual_tp_amt) * 100;
if ($actual_tp_brokerage && $actual_tp_brokerage != 0 && $actual_tp_brokerage != "") {
$total_amt += $actual_tp_brokerage;
//percentage reverse calculation
if (($actual_tp_per == 0 || $actual_tp_per == "") && !empty($actual_tp_amt)) {
$actual_tp_per = (int) round(($actual_tp_brokerage / $actual_tp_amt) * 100, 2);
}
} else {
$actual_tp_brokerage = $actual_tp_amt * ($actual_tp_per / 100);
$total_amt += $actual_tp_brokerage;
}
} else {
$actual_tp_brokerage = $actual_tp_amt * ($actual_tp_per / 100);
$total_amt += $actual_tp_brokerage;
}
// $actual_tep_per = trim($excel_row[11]);
// $actual_tep_brokerage = trim($excel_row[14]);
// $actual_tep_amt = trim($excel_row[8]);
// $actual_tep_per = trim($excel_row[11]);
// $actual_tep_brokerage = trim($excel_row[14]);
// $actual_tep_amt = trim($excel_row[8]);
$actual_tep_per = 0;
$actual_tep_brokerage = 0;
$actual_tep_amt = 0;
$actual_tep_per = 0;
$actual_tep_brokerage = 0;
$actual_tep_amt = 0;
if ($actual_tep_brokerage && $actual_tep_brokerage != 0 && $actual_tep_brokerage != "") {
$total_amt += $actual_tep_brokerage;
//percentage reverse calculation
if (($actual_tep_per == 0 || $actual_tep_per == "") && !empty($actual_tep_amt)) {
$actual_tep_per = ($actual_tep_brokerage / $actual_tep_amt) * 100;
if ($actual_tep_brokerage && $actual_tep_brokerage != 0 && $actual_tep_brokerage != "") {
$total_amt += $actual_tep_brokerage;
//percentage reverse calculation
if (($actual_tep_per == 0 || $actual_tep_per == "") && !empty($actual_tep_amt)) {
$actual_tep_per = ($actual_tep_brokerage / $actual_tep_amt) * 100;
}
} else {
$actual_tep_brokerage = $actual_tep_amt * ($actual_tep_per / 100);
$total_amt += $actual_tep_brokerage;
}
} else {
$actual_tep_brokerage = $actual_tep_amt * ($actual_tep_per / 100);
$total_amt += $actual_tep_brokerage;
//find variance
$variance_amt = $source_row['exp_amt'] - $total_amt;
$data_to_update[] = ['co_share_id' => $source_row['id'], 'actual_bp_amt' => $actual_bp_amt, 'actual_tp_amt' => $actual_tp_amt, 'actual_tep_amt' => $actual_tep_amt, 'actual_bp_per' => $actual_bp_per, 'actual_tp_per' => $actual_tp_per, 'actual_tep_per' => $actual_tep_per, 'variance' => $variance_amt, 'actual_tep_brokerage_amt' => $actual_tep_brokerage, 'actual_tp_brokerage_amt' => $actual_tp_brokerage, 'actual_bp_brokerage_amt' => $actual_bp_brokerage, 'reward' => trim($excel_row[7]), 'statement_id' => $file_id];
unset($source_data[$source_key]);
continue 2;
}
//find variance
$variance_amt = $source_row['exp_amt'] - $total_amt;
$data_to_update[] = ['co_share_id' => $source_row['id'], 'actual_bp_amt' => $actual_bp_amt, 'actual_tp_amt' => $actual_tp_amt, 'actual_tep_amt' => $actual_tep_amt, 'actual_bp_per' => $actual_bp_per, 'actual_tp_per' => $actual_tp_per, 'actual_tep_per' => $actual_tep_per, 'variance' => $variance_amt, 'actual_tep_brokerage_amt' => $actual_tep_brokerage, 'actual_tp_brokerage_amt' => $actual_tp_brokerage, 'actual_bp_brokerage_amt' => $actual_bp_brokerage, 'reward' => trim($excel_row[7]), 'statement_id' => $file_id];
unset($source_data[$source_key]);
continue 2;
}
}
}
}catch (\Throwable $th) {
$this->myLogger->logme("error", "REST-AUTH-CONTROLLER - updateInsurerStatement: Exception: " . $th->getMessage() . " --- Line: " . $th->getLine() . " --- Trace: " . $th->getTraceAsString());
$errorData = [
'message' => $th->getMessage(),
'file' => $th->getFile(),
'line' => $th->getLine(),
'code' => $th->getCode(),
'trace' => $th->getTraceAsString(),
'trace_array' => $th->getTrace(), // full array version (optional)
'function' => $th->getTrace()[0]['function'] ?? null,
'class' => $th->getTrace()[0]['class'] ?? null,
];
return ['status' => 'failed', 'code' => 500, 'message' => $th->getMessage(), 'error_data' => $errorData];
}
// dd($data_to_update);
$this->coShareStmtDetailsModel->insertBatch($data_to_update, 'id');

View File

@ -1518,12 +1518,7 @@ class RestAuthenticationController extends AdminController
public function savePassword()
{
log_message('error', ' ');
log_message('error', ' ************************************* POST START **************************************** ');
log_message('error', ' ');
$this->myLogger->logme("error", "REST-AUTH-CONTROLLER - savePassword: Function called");
$this->myLogger->logme("error", "REST-AUTH-CONTROLLER - savePassword: Received payload = " . json_encode($this->request->getJSON() ?? []));
try {
$payload = $this->request->getJSON();
@ -1681,8 +1676,7 @@ class RestAuthenticationController extends AdminController
if ($employeeData && password_verify($old_password, $employeeData['password'])) {
// Hash new password
// $newHashedPassword = password_hash($new_password, PASSWORD_DEFAULT);
$newHashedPassword = $new_password;
$newHashedPassword = password_hash($new_password, PASSWORD_DEFAULT);
// Update password and clear OTP
$updated = $this->employeeModel->update($employeeData['id'], [
@ -1697,7 +1691,7 @@ class RestAuthenticationController extends AdminController
}
}else{
return $this->respond(['status' => 'failed', 'code' => 404, 'message' => 'User not found'], 404);
return $this->respond(['status' => 'failed', 'code' => 404, 'message' => 'Old password is incorrect'], 404);
}
} catch (\Throwable $th) {

View File

@ -102,8 +102,6 @@ class ThzController extends BaseController
public function ticketList()
{
$data['tab_name'] = "Tickets";
$data['page_name'] = "Tickets";
try {
$returnType = strtolower($this->request->getGet('return_type') ?? 'api');
@ -130,7 +128,8 @@ class ThzController extends BaseController
// 3,4 remain person varannum.
$data['client_list'] = $this->clientModel->getCreatedByUserName();
$data['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll();
$data['tab_name'] = "Tickets";
$data['page_name'] = "Tickets";
return $this->loadLayout('thz_list', $data);
}
@ -267,6 +266,8 @@ class ThzController extends BaseController
$result['policy_terms'] = $toGetPolicyId ? $this->getPolicyTerms($toGetPolicyId) : '';
$result['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll();
$result['tab_name'] = "Tickets";
$result['page_name'] = "Ticket Details";
return $this->loadLayout('thz_notes', $result);
}

View File

@ -56,18 +56,18 @@
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet" type="text/css">
<link rel="manifest" href="../manifest.json">
<!-- <link rel="manifest" href="../manifest.json"> -->
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('../service-worker.js').then(function(registration) {
// console.log('Service Worker registration successful with scope:', registration.scope);
}, function(err) {
// console.log('Service Worker registration failed:', err);
});
});
}
// if ('serviceWorker' in navigator) {
// window.addEventListener('load', function() {
// navigator.serviceWorker.register('../service-worker.js').then(function(registration) {
// // console.log('Service Worker registration successful with scope:', registration.scope);
// }, function(err) {
// // console.log('Service Worker registration failed:', err);
// });
// });
// }
</script>
<style>

View File

@ -29,6 +29,8 @@ class InsurerBranchModel extends Model
{
$query = $this->select('insurer_branch.*, I.short_name as insurer_name, I.category')
->join('insurers I', 'insurer_branch.insurer_id = I.id', 'left')
->where('I.is_active', 1)
->where('insurer_branch.is_active', 1)
->find();
return $query;
}

View File

@ -935,6 +935,7 @@ table.dataTable tbody td {
},
{
extend: 'excel',
sheetName: 'Users',
text: '<i class="mdi mdi-file-excel"></i><span class="btn-custom"> EXCEL </span>',
exportOptions: { orthogonal: 'sort' },
className: 'app-btn-primary',
@ -948,12 +949,16 @@ table.dataTable tbody td {
paging: true,
pageLength: 10,
language: {
search: `
<div class="datatable-search-wrapper">
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search"
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
initComplete: function () {
$(".dt-buttons").prepend(`

View File

@ -22,16 +22,18 @@ table.dataTable thead th {
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row" style="margin-bottom:1rem;">
<!-- <div class="row" style="margin-bottom:1rem;">
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">Advertisement Images</h4>
</div>
<div class="col-6" style="text-align: right; position: relative;top: 5px;">
<a data-toggle="modal" data-target="#bike_make_login-modal" href="#" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a>
</div>
</div>
<table data-custom-table-css="table" class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0"
id="tickets-table">
</div> -->
<!-- <table data-custom-table-css="table" class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0"
id="tickets-table"> -->
<div class="table-responsive">
<table data-custom-table-css="table" class="table mb-0 nowrap w-100 table-centered" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
<th class="font-weight-medium">Advertisement Image Name</th>
@ -51,7 +53,7 @@ table.dataTable thead th {
<div class="btn-group dropdown">
<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 advertise_image_edit" href="#" data-toggle="modal" data-id="<?php echo $row['id']; ?>" data-target="#bike_make_login-modal"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
<a class="dropdown-item advertise_image_edit" href="#" data-toggle="modal" data-id="<?php echo $row['id']; ?>" data-name="<?php echo $row['name']; ?>" data-target="#bike_make_login-modal"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
<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>
</div>
</div>
@ -62,6 +64,7 @@ table.dataTable thead th {
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div><!-- end col -->
@ -79,17 +82,15 @@ table.dataTable thead th {
<h4 id="advertise_add_edit">Add Advertise Image </h4>
</div>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<form id="model_form_data" class="px-4">
<input type="text" name="add_image_id" id="add_image_id" value="0" hidden>
<form id="model_form_data" class="px-4" enctype="multipart/form-data">
<input type="hidden" name="add_image_id" id="add_image_id" value="0">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label for="branchname">Upload Image</label>
<div class="input-icon">
<input type="file" class="form-control" name="advertise_image" id="advertise_image"
accept="image/*" onchange="PreviewImage();" required="">
<input type="file" class="form-control" name="advertise_image" id="advertise_image" accept="image/*" onchange="PreviewImage();" required>
<i class="mdi mdi-upload additional-icon"></i>
</div>
</div>
@ -98,8 +99,9 @@ table.dataTable thead th {
</div>
</div>
</div>
<div class="form-group text-center">
<button class="btn btn-rounded btn-primary" type="submit" onclick="submitBranch(this)">Submit</button>
<button type="button" class="btn btn-primary" onclick="submitBranch()">Submit</button>
</div>
</form>
</div>
@ -110,34 +112,69 @@ table.dataTable thead th {
<script>
function submitBranch(params) {
// if ($('#add_image_id').val()) {
// var url = '<?= base_url("edit_advertise_image/"); ?>'+$('#add_image_id').val();
// }else{
var url = '<?= base_url("add_advertise_image"); ?>';
// }
function submitBranch() {
const fileInput = $('#advertise_image')[0].files[0]; // get actual file object
const imageId = $('#add_image_id').val();
var formData = new FormData($('#model_form_data')[0]);
if (!fileInput) {
toastr.warning('Please upload an image before submitting', 'Warning');
$('#advertise_image').focus();
return;
}
var url = '<?= base_url("add_advertise_image") ?>';
var formData = new FormData();
formData.append('advertise_image', fileInput);
formData.append('add_image_id', imageId);
$.ajax({
type: 'POST',
url: url,
url: url,
data: formData,
dataType: 'json',
processData: false,
contentType: false,
contentType: false,
dataType: 'json',
success: function(response) {
console.log(response);
$('#bike_model_login-modal').modal('hide');
$('#bike_make_name').val('');
window.location.reload();
if (response.status) {
$('#bike_make_login-modal').modal('hide');
$('#advertise_image').val('');
$('#uploadPreview').attr('src', '<?= base_url('public/assets/images/avatar_2x.png') ?>');
toastr.success('Image uploaded successfully!');
window.location.reload();
} else {
toastr.error(response.message || 'Something went wrong.');
}
},
error: function(xhr, status, error) {
// Handle error response here
console.error(xhr.responseText);
console.error('Status:', status);
console.error('Error:', error);
let msg = 'Something went wrong. Please try again later.';
switch (xhr.status) {
case 400:
msg = xhr.responseJSON?.message || 'Bad Request — Invalid input.';
break;
case 401:
msg = 'Unauthorized — Please log in again.';
break;
case 403:
msg = 'Forbidden — You do not have permission.';
break;
case 404:
msg = 'Not Found — Requested URL or resource not found.';
break;
case 500:
console.log('Internal Server Error — Please contact support.');
msg = xhr.responseJSON?.message || xhr.responseText || msg;
break;
default:
msg = xhr.responseJSON?.message || xhr.responseText || msg;
}
}
});
}
@ -181,35 +218,102 @@ table.dataTable thead th {
}
$('#btnAdd').click(function () {
$('#add_image_id').val(0);
$('#advertise_add_edit').html('Add Advertise Image');
$('#uploadPreview').attr('src', '<?= base_url()."public/assets/images/avatar_2x.png" ?>');
var table;
})
$(document).ready(function() {
table = $('#tickets-table').DataTable({
dom: "<'row'<'col-sm-1'f><'col-sm-11 text-right'B>>" + // Filter left, button right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [
{
text: '<i class="mdi mdi-plus"></i> <span class="btn-custom">Add</span>',
className: 'btn app-btn-primary',
action: function (e, dt, node, config) {
// ✅ Call your modal logic
callmodal();
}
}
],
language: {
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true
});
});
$('.advertise_image_edit').click(function (params) {
// console.log($(this).data('id'));
$('#add_image_id').val($(this).data('id'));
var url = '<?= base_url("getAdvertiseImage/"); ?>'+$(this).data('id') ;
$.ajax({
type: 'GET',
url: url,
success: function (response) {
console.log(response);
$('#advertise_add_edit').html('Edit Advertise Image');
$('#uploadPreview').attr('src', '<?= base_url() . "public/uploads/advertiseImage/"?>' + response)
.on('error', function() {
$(this).attr('src', '<?= base_url()."public/assets/images/avatar_2x.png" ?>');
});
// ✅ Define your modal function separately
function callmodal() {
$('#add_image_id').val(0);
$('#advertise_add_edit').html('Add Advertise Image');
$('#uploadPreview').attr('src', '<?= base_url()."public/assets/images/avatar_2x.png" ?>');
$('#bike_model_login-modal').modal('show'); // ✅ this shows the modal
var myModal = new bootstrap.Modal(document.getElementById('bike_make_login-modal'));
myModal.show();
}
// $('#btnAdd').click(function () {
// $('#add_image_id').val(0);
// $('#advertise_add_edit').html('Add Advertise Image');
// $('#uploadPreview').attr('src', '<?= base_url()."public/assets/images/avatar_2x.png" ?>');
// })
// $('.advertise_image_edit').click(function (params) {
// // console.log($(this).data('id'));
// $('#add_image_id').val($(this).data('id'));
// var url = '<?= base_url("getAdvertiseImage/"); ?>'+$(this).data('id') ;
// $.ajax({
// type: 'GET',
// url: url,
// success: function (response) {
// console.log(response);
// $('#advertise_add_edit').html('Edit Advertise Image');
// $('#uploadPreview').attr('src', '<?= base_url() . "public/uploads/advertiseImage/"?>' + response)
// .on('error', function() {
// $(this).attr('src', '<?= base_url()."public/assets/images/avatar_2x.png" ?>');
// });
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
}
// },
// error: function (xhr, status, error) {
// console.error(xhr.responseText);
// }
// })
// })
$(document).on('click', '.advertise_image_edit', function (e) {
e.preventDefault();
const id = $(this).data('id');
const name = $(this).data('name');
console.log('Clicked ID:', id);
console.log('<?= base_url(); ?>');
$('#add_image_id').val(id);
$('#advertise_image').val(name);
$('#advertise_add_edit').html('Edit Advertise Image');
const imgUrl = '<?= base_url("showAdvertiseImage/"); ?>' + name;
$('#uploadPreview').attr('src', imgUrl)
.on('error', function() {
$(this).attr('src', '<?= base_url()."public/assets/images/avatar_2x.png" ?>');
});
});
})
})
</script>

View File

@ -254,12 +254,16 @@
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true
});

View File

@ -107,17 +107,22 @@
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'BDS TAT BAND WISE DATA',
sheetName: 'BDS TAT BAND WISE DATA',
},
]
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true,
pageLength: 10,

View File

@ -134,6 +134,7 @@ $(document).ready(function() {
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'Renewal-List',
sheetName: 'Renewal-List',
exportOptions: {
orthogonal: 'sort'
},
@ -142,12 +143,16 @@ $(document).ready(function() {
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 20, // Set default number of rows per page (optional)
@ -161,14 +166,17 @@ $(document).ready(function() {
// Global DataTables defaults
$.extend(true, $.fn.dataTable.defaults, {
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true,
pageLength: 10,
ordering: false

View File

@ -94,6 +94,7 @@ table.dataTable tbody td {
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'Insurer-Wise-Report-List',
sheetName: 'Insurer-Wise-Report-List',
exportOptions: {
orthogonal: 'sort'
},
@ -104,12 +105,16 @@ table.dataTable tbody td {
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -100,18 +100,23 @@ table.dataTable tbody td {
},
className: 'app-btn-primary ',
title: 'Bap-Wise-Report-List',
sheetName: 'Bap-Wise-Report-List',
footer: true
}
]
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -123,18 +123,23 @@
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'BDS TAT BAND WISE DATA',
sheetName: 'BDS TAT BAND WISE DATA',
className: 'app-btn-primary ',
}
]
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true,
pageLength: 10,

View File

@ -385,13 +385,16 @@
}
],
language: {
search: `
<div class="datatable-search-wrapper">
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true,
pageLength: 10,

View File

@ -243,6 +243,7 @@ table.dataTable thead th {
{
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
sheetName: 'CD-Master-List',
exportOptions: {
orthogonal: 'sort'
},
@ -252,12 +253,16 @@ table.dataTable thead th {
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true,
pageLength: 10,

View File

@ -297,12 +297,16 @@
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 15, // Set default number of rows per page (optional)

View File

@ -94,17 +94,21 @@
className: 'btn app-btn-secondary ',
buttons: [
{ extend: 'csv', text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>', title: 'Insurer-Wise-Report-List', className: 'app-btn-primary ' },
{ extend: 'excel', text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>', title: 'Insurer-Wise-Report-List', className: 'app-btn-primary ', exportOptions: { orthogonal: 'sort' } }
{ extend: 'excel', text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>', title: 'Insurer-Wise-Report-List', className: 'app-btn-primary ', sheetName: 'Insurer-Wise-Report-List', exportOptions: { orthogonal: 'sort' } }
],
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true,
pageLength: 10,

View File

@ -92,17 +92,21 @@
className: 'btn app-btn-secondary ',
buttons: [
{ extend: 'csv', text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>', title: 'Insurer-Wise-Report-List',className: 'app-btn-primary ' },
{ extend: 'excel', text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>', title: 'Insurer-Wise-Report-List',className: 'app-btn-primary ', exportOptions: { orthogonal: 'sort' } }
{ extend: 'excel', text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>', title: 'Insurer-Wise-Report-List',className: 'app-btn-primary ', sheetName: 'Insurer-Wise-Report-List', exportOptions: { orthogonal: 'sort' } }
]
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true,
pageLength: 10,

View File

@ -436,6 +436,7 @@ $("#branch_form").submit(function(event) {
toastr.error(res.message, 'Error');
}else{
toastr.success(res.message, 'Success');
newBranchSavedPeaseCallTheHrAccessFormApi = true;
}
// var message = (branch_PrimaryKey === '') ?
// 'Client Branch Created successfully' :

View File

@ -99,13 +99,17 @@ $(document).ready(function() {
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
});

View File

@ -340,13 +340,16 @@ $(document).ready(function()
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true ,
// pagingType: 'full_numbers'

View File

@ -456,6 +456,7 @@
<script>
let hrAccessControlHtmlAppended = false;
let hrActivityHistoryHtmlAppended = false;
let newBranchSavedPeaseCallTheHrAccessFormApi = false;
function client_kyc_docs() {
var check_client_id = $('#general_PrimaryKey');
@ -566,6 +567,7 @@
//HR Access Controll also know as "Client Access Control"
function appendHrAccessControllHtml(input) {
console.log(input.id);
let client_id = $('#general_PrimaryKey').val();
console.log('client_id ', client_id);
@ -575,7 +577,8 @@
client_id: client_id
};
if (hrAccessControlHtmlAppended == false) {
console.log({hrActivityHistoryHtmlAppended, newBranchSavedPeaseCallTheHrAccessFormApi});
if (hrAccessControlHtmlAppended == false || newBranchSavedPeaseCallTheHrAccessFormApi == true) {
sendAjaxRequestForGlobal(url, 'GET', requestData, function(response) {
console.log('Data fetched successfully:', response);

View File

@ -51,23 +51,24 @@
position: relative;
width: 50px;
height: 25px;
background-color: #fff;
background-color: #cccccc;
border-radius: 25px;
box-shadow: 0 0 5px rgba(0,0,0,0.2);
transition: 0.3s;
}
.slider::before ,
/* Round knob (always white) */
.slider::before,
.slider_blue::before {
content: "";
position: absolute;
height: 19px;
width: 19px;
left: 3px;
top: 3px;
background-color: #ccc;
border-radius: 50%;
transition: 0.3s;
content: "";
position: absolute;
height: 19px;
width: 19px;
left: 3px;
top: 3px;
background-color: #fff; /* always white */
border-radius: 50%;
transition: 0.3s;
}
input:checked + .slider {

View File

@ -354,24 +354,29 @@
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'Member-List',
title: 'Members',
},
{
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
className: 'app-btn-primary ',
title: 'Member-List',
title: 'Members',
sheetName: 'Members'
}
]
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 25 // Set default number of rows per page (optional)

View File

@ -87,7 +87,7 @@
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">Endorsement List</h4>
<h4 style="position: relative;">Endorsements</h4>
</div>
</div>
@ -620,6 +620,7 @@
orthogonal: 'sort'
},
className: 'app-btn-primary ',
sheetName: 'Endorsements'
}
]
}
@ -649,12 +650,16 @@
});
},
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true,
// pagingType: 'full_numbers'

View File

@ -485,12 +485,16 @@ $(document).ready(function() {
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
// "buttons": [{
// "extend": 'csv',

View File

@ -385,12 +385,16 @@ $(document).ready(function () {
}
],
language: {
search: `
<div class="datatable-search-wrapper">
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search"
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true,
pageLength: 10,

View File

@ -60,7 +60,6 @@
<?php } ?>
</style>
<div class="container-fluid-min">
<div class="row">
<div class="col-12">
@ -135,14 +134,18 @@
<?php foreach ($pre_policy_data as $key1 => $policies) {
$statusText = $policies['policy_status'] == 1 ? 'Active' : 'In-Active';
$statusClass = $policies['policy_status'] == 1 ? 'active' : 'inactive';
if (
in_array($policies['branch_id'].'-'.$policies['policy_no'], $listed_pre)
&&
$value['pre_branch_id'] != $policies['branch_id']
) {
// if (
// in_array($policies['branch_id'].'-'.$policies['policy_no'], $listed_pre)
// &&
// $value['pre_branch_id'] != $policies['branch_id']
// ) {
// continue;
// } else {
// $listed_pre[] = $policies['branch_id'].'-'.$policies['policy_no'];
// }
if($value['pre_branch_id'] !== $policies['branch_id']){
continue;
} else {
$listed_pre[] = $policies['branch_id'].'-'.$policies['policy_no'];
}
?>
<div class="checkbox-item">
@ -196,17 +199,21 @@
<?php foreach ($post_policy_data as $key2 => $policies) {
$statusText = $policies['policy_status'] == 1 ? 'Active' : 'In-Active';
$statusClass = $policies['policy_status'] == 1 ? 'active' : 'inactive';
if(
in_array($policies['branch_id'].'-'.$policies['policy_no'] , $listed_post)
&&
$value['post_branch_id'] != $policies['branch_id']
)
{
// if(
// in_array($policies['branch_id'].'-'.$policies['policy_no'] , $listed_post)
// &&
// $value['post_branch_id'] != $policies['branch_id']
// )
// {
// continue;
// }
// else
// {
// $listed_post[] = $policies['branch_id'].'-'.$policies['policy_no'];
// }
if($value['post_branch_id'] !== $policies['branch_id']){
continue;
}
else
{
$listed_post[] = $policies['branch_id'].'-'.$policies['policy_no'];
}
?>

View File

@ -377,12 +377,16 @@
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true,
});

View File

@ -211,12 +211,16 @@
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true,
});

View File

@ -226,6 +226,7 @@ $(document).ready(function() {
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'IRDA-BAP-CLIENT-List',
sheetName: 'IRDA-BAP-CLIENT-List',
exportOptions: {
orthogonal: 'sort'
},
@ -236,12 +237,16 @@ $(document).ready(function() {
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 20, // Set default number of rows per page (optional)

View File

@ -314,6 +314,7 @@ $(document).ready(function() {
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
className: 'app-btn-primary ',
title: 'IRDA-BAP-INSURER-List',
sheetName: 'IRDA-BAP-INSURER-List',
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
var total = 0;
@ -360,12 +361,16 @@ $(document).ready(function() {
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 20, // Set default number of rows per page (optional)

View File

@ -147,6 +147,7 @@ $(document).ready(function() {
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'IRDA-BAP-CLIENT-List',
sheetName: 'IRDA-BAP-CLIENT-List',
className: 'app-btn-primary ',
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
@ -194,12 +195,16 @@ $(document).ready(function() {
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -207,12 +207,16 @@
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true ,
});

View File

@ -89,8 +89,8 @@
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-buttons/js/buttons.print.min.js"></script>
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-select/js/dataTables.select.min.js"></script>
<script src="<?= base_url() . "public"; ?>/assets/libs/pdfmake/build/pdfmake.min.js"></script>
<script src="<?= base_url() . "public"; ?>/assets/libs/pdfmake/build/vfs_fonts.js"></script>
<!-- <script src="<?= base_url() . "public"; ?>/assets/libs/pdfmake/build/pdfmake.min.js"></script>
<script src="<?= base_url() . "public"; ?>/assets/libs/pdfmake/build/vfs_fonts.js"></script> -->
<!-- third party js ends -->
<script src="<?= base_url() . "public"; ?>/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
@ -1210,6 +1210,30 @@ $(function(){
$(object).select2();
}
// SVR asked - Add padding to input so text doesnt merge with icon
$(document).on('init.dt', function () {
$('.dataTables_filter input[type="search"]').css('padding-right', '30px');
});
// SVR asked - Toggle icons
$(document).on('input', '.dataTables_filter input', function() {
const wrapper = $(this).closest('.datatable-search-wrapper');
if ($(this).val()) {
wrapper.find('.datatable-search-icon').hide();
wrapper.find('.datatable-clear-icon').show();
} else {
wrapper.find('.datatable-search-icon').show();
wrapper.find('.datatable-clear-icon').hide();
}
});
// SVR asked - Clear search
$(document).on('click', '.datatable-clear-icon', function() {
const input = $(this).closest('.datatable-search-wrapper').find('input');
input.val('').trigger('input');
table.search('').draw();
});
</script>

View File

@ -88,8 +88,8 @@
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-buttons/js/buttons.print.min.js"></script>
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-select/js/dataTables.select.min.js"></script>
<script src="<?= base_url() . "public"; ?>/assets/libs/pdfmake/build/pdfmake.min.js"></script>
<script src="<?= base_url() . "public"; ?>/assets/libs/pdfmake/build/vfs_fonts.js"></script>
<!-- script src="<?= base_url() . "public"; ?>/assets/libs/pdfmake/build/pdfmake.min.js"></script>
<script src="<?= base_url() . "public"; ?>/assets/libs/pdfmake/build/vfs_fonts.js"></script> -->
<!-- third party js ends -->
<script src="<?= base_url() . "public"; ?>/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>

View File

@ -62,7 +62,7 @@
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js"></script>
<link rel="manifest" href="../manifest.json">
<!-- <link rel="manifest" href="../manifest.json"> -->
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap" rel="stylesheet">
@ -71,15 +71,15 @@
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('../service-worker.js').then(function(registration) {
// console.log('Service Worker registration successful with scope:', registration.scope);
}, function(err) {
// console.log('Service Worker registration failed:', err);
});
});
}
// if ('serviceWorker' in navigator) {
// window.addEventListener('load', function() {
// navigator.serviceWorker.register('../service-worker.js').then(function(registration) {
// // console.log('Service Worker registration successful with scope:', registration.scope);
// }, function(err) {
// // console.log('Service Worker registration failed:', err);
// });
// });
// }
</script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css" />
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css" />
@ -1660,6 +1660,12 @@
.right-btn {
right: 0;
}
input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: none;
appearance: none;
}
</style>

View File

@ -62,18 +62,18 @@
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js"></script>
<link rel="manifest" href="../manifest.json">
<!-- <link rel="manifest" href="../manifest.json"> -->
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('../service-worker.js').then(function(registration) {
// console.log('Service Worker registration successful with scope:', registration.scope);
}, function(err) {
// console.log('Service Worker registration failed:', err);
});
});
}
// if ('serviceWorker' in navigator) {
// window.addEventListener('load', function() {
// navigator.serviceWorker.register('../service-worker.js').then(function(registration) {
// // console.log('Service Worker registration successful with scope:', registration.scope);
// }, function(err) {
// // console.log('Service Worker registration failed:', err);
// });
// });
// }
</script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css" />
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css" />

View File

@ -487,12 +487,16 @@ table.dataTable tbody td {
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -124,11 +124,15 @@
],
language: {
search: `
<div class="datatable-search-wrapper">
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search"
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -62,21 +62,21 @@
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js"></script>
<link rel="manifest" href="../manifest.json">
<!-- <link rel="manifest" href="../manifest.json"> -->
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap" rel="stylesheet">
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('../service-worker.js').then(function(registration) {
// console.log('Service Worker registration successful with scope:', registration.scope);
}, function(err) {
// console.log('Service Worker registration failed:', err);
});
});
}
// if ('serviceWorker' in navigator) {
// window.addEventListener('load', function() {
// navigator.serviceWorker.register('../service-worker.js').then(function(registration) {
// // console.log('Service Worker registration successful with scope:', registration.scope);
// }, function(err) {
// // console.log('Service Worker registration failed:', err);
// });
// });
// }
</script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css" />
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css" />

View File

@ -215,6 +215,7 @@
}
});
window.scrollTo({ top: 0, behavior: 'smooth' });
setTimeout(function() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
@ -749,8 +750,8 @@
<input style="width: 128%;" value="${data ? data : ''}" type="text" name="multiple_sum_insured[]" class="form-control multiple_sum_insured" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this); numtowordinkeyup(this)">
</div>
<div class="col-md-2" style="position: relative;left: 88px;">
<button type="button" class="btn btn-danger si-remove-multi" onclick="removeGMCAdditionalSI(this)">x</button>
<button type="button" class="btn btn-primary si-add-more" onclick="appendOtherSIAddMore()">+</button>
<button type="button" class="btn btn-danger si-remove-multi" onclick="removeGMCAdditionalSI(this)">x</button>
</div>
<div class="col-md-6">
</div>

View File

@ -194,6 +194,7 @@
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'Outstanding Report',
sheetName: 'Outstanding Report',
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
var total = 0;
@ -225,12 +226,16 @@
]
}],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 25 // Set default number of rows per page (optional)

View File

@ -1052,6 +1052,7 @@
}
});
window.scrollTo({ top: 0, behavior: 'smooth' });
setTimeout(function() {
$('.loader').fadeOut();
@ -1761,15 +1762,14 @@
value="${data == null || data == undefined || data == "" ? '' : data}" type="text" name="multiple_sum_insured[]"
class="form-control multiple_sum_insured mr-2" onkeypress="return onlyNumbers(event)"
onkeyup="formatNumber(this); numtowordinkeyup(this)">
<button type="button" class="btn btn-primary si-add-more mr-2" onclick="appendGMCSIAddMore()"
style="background-color: #e26728; border:1px solid #e26728;">
<i class="mdi mdi-plus"></i>
</button>
<button type="button" class="btn btn-danger si-remove-multi mr-2" onclick="removeGMCAdditionalSI(this)"
style="background-color: #BD0707;border:1px solid #BD0707">
<i class="mdi mdi-delete"></i>
</button>
<button type="button" class="btn btn-primary si-add-more mr-2" onclick="appendGMCSIAddMore()"
style="background-color: #e26728; border:1px solid #e26728;"
>
<i class="mdi mdi-plus"></i>
</button>
<div id='numberToWordSumInsured' class="text-danger-2 mr-2"></div>
</div>

View File

@ -499,6 +499,7 @@
}
});
window.scrollTo({ top: 0, behavior: 'smooth' });
setTimeout(function() {
$('.loader').fadeOut();
@ -927,14 +928,14 @@
style="max-width:200px;"
value="${data == null || data == undefined || data == "" ? '' : data}" type="text" name="multiple_sum_insured[]"
class="form-control multiple_sum_insured mr-2" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this); numtowordinkeyup(this)">
<button type="button" class="btn btn-danger si-remove-multi mr-2" onclick="removeGMCAdditionalSI(this)"
style="background-color: #BD0707;border:1px solid #BD0707">
<i class="mdi mdi-delete"></i>
</button>
<button type="button" class="btn btn-primary si-add-more mr-2" onclick="appendGPASIAddMore()"
style="background-color: #e26728; border:1px solid #e26728;" >
<i class="mdi mdi-plus"></i>
</button>
<button type="button" class="btn btn-danger si-remove-multi mr-2" onclick="removeGMCAdditionalSI(this)"
style="background-color: #BD0707;border:1px solid #BD0707">
<i class="mdi mdi-delete"></i>
</button>
<div id='numberToWordSumInsured' class="text-danger-2 "></div>
</div>
</div>

View File

@ -458,7 +458,7 @@
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team())) { ?>
<tr id="table_tr_17" <?= in_array(FINANCE_TEAM_ID, user_team()) ? 'style="display:none"' : '' ?>>
<tr id="table_tr_17">
<td>Agreed Amount</td>
</tr>
@ -1346,6 +1346,41 @@
// $('#co_premium_' + input).val(cop.toFixed(2));
// $('#co_tp_premium_' + input).val(cotp.toFixed(2));
// $('#co_ter_premium_' + input).val(cotep.toFixed(2));
// }
// Apply Deletion (Negative) Values
// function applyDeletionSymbolsToFields(input, isDeletion) {
// console.log('========== APPLYING DELETION SYMBOLS ==========');
// if (!isDeletion) return;
// const fieldIds = [
// 'base_premium',
// 'tp_premium',
// 'ter_premium',
// 'co_premium',
// 'co_tp_premium',
// 'co_ter_premium',
// 'gst_amount',
// 'agreed_amount',
// 'non_comm_per_amt',
// 'total_amt',
// 'exp_amt'
// ];
// fieldIds.forEach(field => {
// const $el = $('#' + field + '_' + input);
// console.log('$el', '#' + field + '_' + input);
// console.log('$el', $el);
// let val = $el.val()?.trim();
// console.log('$val', val);
// if (!val || val.startsWith('-')) return;
// let num = parseFloat(val);
// if (!isNaN(num) && num > 0) $el.val(-num);
// });
// console.log('========== COMPLETED DELETION SYMBOL APPLICATION ==========');
// }
function checkAndDistributeTax(input){
@ -1432,9 +1467,9 @@
let bap = selectedOption.data('bap') || '';
let allocg = selectedOption.data('allocg') || '';
let endorsement_type = $('#action_type').val();
let isDeletion = endorsement_type === "deletion";
console.log("bap:", bap, "allocg:", allocg, "isDeletion:", isDeletion);
let isDeletion = false;
// let isDeletion = endorsement_type === "deletion" || endorsement_type === "policy_cancellation";
console.log({bap, allocg, isDeletion});
const event = window.event || {};
@ -1458,7 +1493,20 @@
let cotp = (allocg !== 'EB') ? absNum('co_tp_premium') : 0;
let cotep = (['Fire', 'Marine Cargo', 'Marine Hull'].includes(bap)) ? absNum('co_ter_premium') : 0;
console.log({ bp, tp, tep, cop, cotp, cotep, ncpa });
console.log('premiums :', { bp, tp, tep, cop, cotp, cotep, ncpa });
let bp_raw_val = parseFloat($('#base_premium_' + input).val());
console.log('bp_raw_val', bp_raw_val);
// handel the positive(+), negative(-) symbole add the value
if(endorsement_type === "addition" || endorsement_type === "baby_addition" || endorsement_type === "addition_inception"){
isDeletion = false
}else if(endorsement_type === "deletion" || endorsement_type === "policy_cancellation"){
isDeletion = true
}else if(bp_raw_val < 0){
isDeletion = true;
console.log('Value is negative:', bp_raw_val);
}
let co_share_type_val = numVal('co_share_type');
console.log('co_share_type_val :', co_share_type_val);
@ -1532,18 +1580,17 @@
setCoPremiums(input);
// ✅ Apply deletion symbols last (safely);
if (isDeletion) {
applyDeletionSymbolsToFields(input, true);
}
// if (isDeletion) {
applyDeletionSymbolsToFields(input, isDeletion);
// }
console.log('############################## END AMOUNT CALCULATION ############################################');
}
// Apply Deletion (Negative) Values
function applyDeletionSymbolsToFields(input, isDeletion) {
console.log('========== APPLYING DELETION SYMBOLS ==========');
if (!isDeletion) return;
console.log('========== APPLYING DELETION SYMBOLS ==========');
const fieldIds = [
'base_premium',
@ -1561,14 +1608,20 @@
fieldIds.forEach(field => {
const $el = $('#' + field + '_' + input);
console.log('$el', '#' + field + '_' + input);
console.log('$el', $el);
let val = $el.val()?.trim();
console.log('$val', val);
if (!val || val.startsWith('-')) return;
if (!val) return;
let num = parseFloat(val);
if (!isNaN(num) && num > 0) $el.val(-num);
let num = parseFloat(val.replace(/^-/, '')); // remove any existing minus first
console.log('num', num);
if (isNaN(num)) return;
if (isDeletion) {
// Apply minus sign
if (num > 0) $el.val(-num);
} else {
// Remove minus sign
$el.val(num);
}
});
console.log('========== COMPLETED DELETION SYMBOL APPLICATION ==========');

View File

@ -519,12 +519,16 @@ table.dataTable thead th {
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -813,7 +813,7 @@
</thead>
<tbody>
<tr id="table_tr_1">
<td>Insurer</td>
<td>Insurer<span id="premium_details_insurer" class="text-danger">*</span></td>
</tr>
<tr id="table_tr_2" style="display: none;">
<td>Is Leader?</td>
@ -883,7 +883,7 @@
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team())) { ?>
<tr id="table_tr_17" <?= in_array(FINANCE_TEAM_ID, user_team()) ? 'style="display:none"' : '' ?>>
<tr id="table_tr_17">
<td>Agreed Amount</td>
</tr>
@ -3588,7 +3588,7 @@
$("#inception_form_id").submit(function(event) {
if (!this.checkValidity()) { return; }
event.preventDefault();
let policy_type_id = $('#policy_type_id').val();
@ -3607,6 +3607,53 @@
return;
}
let hasEmptyInsurer = false;
let firstEmptyField = null;
// $('select[name="follow_insurer_id[]"]').each(function() {
// const $field = $(this);
// const errorId = 'error-' + $field.attr('id');
// // Remove any old message
// $('#' + errorId).remove();
// if ($field.val().trim() === "") {
// hasEmptyInsurer = true;
// $field.addClass('is-invalid');
// // Add error message only once
// if (!$field.next('.text-danger').length) {
// $field.after(`<small id="${errorId}" class="text-danger">This value is required.</small>`);
// }
// if (!firstEmptyField) {
// firstEmptyField = this; // store first empty field
// }
// } else {
// $field.removeClass('is-invalid');
// $('#' + errorId).remove(); // remove if filled
// }
// });
$('select[name="follow_insurer_id[]"]').each(function() {
if ($(this).val().trim() === "") {
hasEmptyInsurer = true;
$(this).addClass('is-invalid');
if (!firstEmptyField) {
firstEmptyField = this; // store the first invalid field
}
} else {
$(this).removeClass('is-invalid');
}
});
if (hasEmptyInsurer) {
if (firstEmptyField) {
$(firstEmptyField).focus();
}
toastr.warning('Please select all Insurers before submitting', 'Warning');
return;
}
if(pt_form_sumbit_handler == 0){
toastr.warning('Base premium greater than CD Amount', 'WARNING');
return;
@ -4392,7 +4439,7 @@
case 0: // Insurer selection
newCell = `<td>
<select class="form-control follow_insurer" data-count="${insurerCount}" id="follow_insurer_id_${insurerCount}" name="follow_insurer_id[]" onchange="getCDAccountNumber(this)">
<select class="form-control follow_insurer" data-count="${insurerCount}" id="follow_insurer_id_${insurerCount}" name="follow_insurer_id[]" onchange="getCDAccountNumber(this)" required>
<option value="" selected>Select Insurer</option>
<?php foreach ($insurer_branch as $value) { ?>
<option value="<?= $value['id'] . '-' . $value['insurer_id'] ?>" data-id="<?= $value['insurer_id'] ?>" data-bid="<?= $value['id'] ?>" data-ic="<?= $value['category'] ?>">
@ -4534,7 +4581,7 @@
switch(index) {
case 0: // Insurer selection
newCell = `<td>
<select class="form-control follow_insurer" data-count="${insurerCount}" id="follow_insurer_id_${insurerCount}" name="follow_insurer_id[]" onchange="getCDAccountNumber(this)">
<select class="form-control follow_insurer" data-language="1" data-count="${insurerCount}" id="follow_insurer_id_${insurerCount}" name="follow_insurer_id[]" onchange="getCDAccountNumber(this)" required>
<option value="" selected>Select Insurer</option>
<?php foreach ($insurer_branch as $value) { ?>
<option value="<?= $value['id'] . '-' . $value['insurer_id'] ?>" data-id="<?= $value['insurer_id'] ?>" data-bid="<?= $value['id'] ?>" data-ic="<?= $value['category'] ?>">
@ -4555,7 +4602,7 @@
break;
case 2: // CD Account Number selectionclass="std_tp_td"
newCell = `<td>
<select class="form-control follow_insurer_cd" data-count="${insurerCount}" id="cd_ac_no_${insurerCount}" name="cd_ac_no_for_child[]" onchange="addCDAccountNumber(this); restrictCDACNO(this)">
<select class="form-control follow_insurer_cd" data-language="2" data-count="${insurerCount}" id="cd_ac_no_${insurerCount}" name="cd_ac_no_for_child[]" onchange="addCDAccountNumber(this); restrictCDACNO(this)">
<option value="" selected>Select CD No</option>
<option value="add_cd"> + Add CD No</option>
</select>
@ -4747,11 +4794,11 @@
$('[name="standard_tp[]"]').val(std_tp);
$('[name="standard_ter[]"]').val(std_tep);
if(insurerCount > 1){
$('.follow_insurer').prop('required', true);
}else{
$('.follow_insurer').prop('required', false);
}
// if(insurerCount > 1){
// $('.follow_insurer').prop('required', true);
// }else{
// $('.follow_insurer').prop('required', false);
// }
});
@ -4768,6 +4815,12 @@
// });
co_share_percentage_calculation(insurerCount, "add");
if (insurerCount === 0) {
$('.follow_insurer').prop('required', false);
} else {
$('.follow_insurer').prop('required', true);
}
}
function removeInsurerColumn(index, count_index) {
@ -4798,6 +4851,11 @@
insurer_count_array = insurer_count_array.filter(item => item !== count_index);
co_share_percentage_calculation(null, "remove");
insurerCount--;
if (insurerCount === 0) {
$('.follow_insurer').prop('required', false);
} else {
$('.follow_insurer').prop('required', true);
}
console.log('#################################### END Remove Insurer Column ####################################');

View File

@ -591,12 +591,16 @@ $(document).ready(function() {
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -250,12 +250,16 @@
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true ,

View File

@ -103,8 +103,8 @@ table.dataTable tbody td {
<th style="display: none;">Premium <br> (without GST)</th>
<!-- <th style="display: none;">GST @ 18%</th> -->
<th>Total Premium</th>
<th>BP %</th>
<th>TP/Ter %</th>
<th>BP%</th>
<th>TP/Ter%</th>
<th style="display: none;">Rewards</th>
<th>Agreed Amount</th>
<th>Invoiced Amount</th>
@ -147,8 +147,8 @@ table.dataTable tbody td {
<td class="right-align-input" style="display: none;"><?php echo $row['premium_wo_gst']; ?></td>
<!-- <td class="right-align-input" style="display: none;"><?php echo $row['gst_amount']; ?></td> -->
<td class="right-align-input"><?php echo $row['total_premium'] ?: '0.00'; ?></td>
<td class="right-align-input"><?php echo $row['agreed_bp_per'] ?: '0.00'; ?>&nbsp;%</td>
<td class="right-align-input"><?php echo $row['agreed_tp_or_ter_per'] ?: '0.00';?>&nbsp;%</td>
<td class="right-align-input"><?php echo $row['agreed_bp_per'] ?: '0.00'; ?>%</td>
<td class="right-align-input"><?php echo $row['agreed_tp_or_ter_per'] ?: '0.00';?>%</td>
<td class="right-align-input" style="display: none;"><?php echo isset($row['reward']) ? $row['reward'] : '0.00'; ?></td>
<?php
@ -161,8 +161,10 @@ table.dataTable tbody td {
// Date : 6/11/25 12:50
$irda_amt = isset($row['total_irda_amt']) && $row['total_irda_amt'] !== '' ? (float)$row['total_irda_amt'] : 0;
$exp_amt = isset($row['exp_amt']) && $row['exp_amt'] !== '' ? (float)$row['exp_amt'] : 0;
$max_amount = max($irda_amt, $exp_amt);
$total_irda_amt = number_format($max_amount, 2, '.', ''); ?>
// $max_amount = max($irda_amt, $exp_amt);
// $total_irda_amt = number_format($max_amount, 2, '.', '');
$total_irda_amt = empty($row['total_irda_amt']) ? $row['exp_amt'] : $row['total_irda_amt'];
?>
<td class="right-align-input" onclick="showCoShareStatementDetails(this)" data-id="<?= $row['pt_id'] ?>"><?php echo $total_irda_amt; ?></td>
<td class="right-align-input"><?php echo empty($row['billed_amt']) ? '0.00' : $row['billed_amt'] ?></td>
<!-- <td class="right-align-input"><?php echo empty($row['unbilled_amt']) ? '0.00' : $row['unbilled_amt']?></td> -->
@ -340,6 +342,7 @@ $(document).ready(function() {
{
extend: 'excel',
title: 'Policy-Tranction-BDS-List',
sheetName: 'Policy-Tranction-BDS-List',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
className: 'app-btn-primary ',
// customize: function (xlsx) {
@ -453,12 +456,16 @@ $(document).ready(function() {
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -385,6 +385,7 @@
{
extend: 'excel',
title: 'Policy-Tranction-BDS-List',
sheetName: 'Policy-Tranction-BDS-List',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
className: 'app-btn-primary ',
// customize: function (xlsx) {
@ -499,12 +500,16 @@
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -189,8 +189,16 @@ $(document).ready(function() {
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -391,12 +391,16 @@
});
},
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true,
// pagingType: 'full_numbers'

View File

@ -147,11 +147,15 @@
],
language: {
search: `
<div class="datatable-search-wrapper">
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search"
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -128,17 +128,22 @@
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
className: 'app-btn-primary ',
title: 'TAT BAND WISE DATA',
sheetName: 'TAT BAND WISE DATA',
}
]
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -130,11 +130,11 @@ th:first-child, td:first-child {
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
<!-- <div class="row" style="padding-bottom: 10px;">
<div class="col-6" style="align-self: center;">
<h3 style="position: relative;">Employees</h3>
</div>
</div>
</div> -->
<table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
@ -557,12 +557,16 @@ document.addEventListener("DOMContentLoaded", function () {
className:"unmapEmployees"
}],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 25 // Set default number of rows per page (optional)

View File

@ -350,17 +350,22 @@ table.dataTable tbody td {
},
className: 'app-btn-primary ',
title: 'Tickets'
sheetName: 'Tickets',
}
]
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true,
pageLength: 10,

View File

@ -131,19 +131,24 @@ $(document).ready(function() {
orthogonal: 'sort'
},
title: 'claim-List',
sheetName: 'claim-List',
className: 'app-btn-primary ',
}
]
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)
ordering: false,

View File

@ -60,13 +60,17 @@ if (ticketsTable.length) {
// ],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)
ordering: false,

View File

@ -315,6 +315,7 @@ $(document).ready(function() {
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'claim-List',
sheetName: 'claim-List',
exportOptions: {
orthogonal: 'sort'
},
@ -324,12 +325,16 @@ $(document).ready(function() {
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -265,12 +265,16 @@
}
}],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -208,13 +208,17 @@
}
],
language: {
search: `
<div class="datatable-search-wrapper">
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search"
},
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true,
});

View File

@ -236,7 +236,8 @@
{
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'Variance-Report-List',
title: 'Variance-Report-List',
sheetName: 'Variance-Report-List', // Sheet name
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
var total = 0;
@ -267,13 +268,17 @@
}
]
}],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
language: {
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 25 // Set default number of rows per page (optional)

View File

@ -499,6 +499,7 @@ $(document).ready(function() {
},
{
extend: 'excel',
sheetName: 'Vehicle-Master',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
exportOptions: {
orthogonal: 'sort'
@ -509,13 +510,17 @@ $(document).ready(function() {
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true,
pageLength: 10,
order: [[0, 'desc']]

View File

@ -845,6 +845,7 @@
text: '<i class="mdi mdi-file-excel"></i><span class="btn-custom"> EXCEL </span>',
exportOptions: { orthogonal: 'sort' },
className: 'app-btn-primary',
sheetName: 'Vehicle-Type',
exportOptions: {
columns: ':not(:last-child)'
}
@ -855,13 +856,17 @@
paging: true,
pageLength: 10,
language: {
search: `
<div class="datatable-search-wrapper">
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search"
},
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
initComplete: function () {
$(".dt-buttons").prepend(`
<div class="tab-button mr-2" id="toggleButton" style="float:left;">

View File

@ -124,12 +124,16 @@
],
language: {
search: `
<div class="datatable-search-wrapper">
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search"
},
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)
// ordering: false,

View File

@ -347,12 +347,16 @@
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
search: `
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
<i class="mdi mdi-close-circle datatable-clear-icon"
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none;"></i>
</div>`,
searchPlaceholder: "Search",
emptyTable: '<div class="text-center text-muted">No Data found</div>'
},
ordering: false,
paging: true