From 0126473c18761e4e91b841ac4ca1da7fa46ae460 Mon Sep 17 00:00:00 2001 From: velz Date: Fri, 20 Jun 2025 15:55:38 +0530 Subject: [PATCH 1/4] FIX_INCEPTION&EXPORT_FILELIST_ISSUE --- app/Controllers/EmployeeController.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php index 6541e011..28f3a010 100755 --- a/app/Controllers/EmployeeController.php +++ b/app/Controllers/EmployeeController.php @@ -344,9 +344,11 @@ class EmployeeController extends AdminController $query->where('cr.user_id', $user_id); } // ->where('files.created_by', get_session_userid()) - $data['fileList'] = $query->groupBy("c.id")->orderBy('files.created_at', 'desc') - ->limit(1500) + $data['fileList'] = $query->groupBy("files.id")->orderBy('files.created_at', 'desc') + // $data['fileList'] = $query + ->limit(2000) ->find(); + // dd($this->fileModel->getLastQuery()); // dd($data['fileList']); $query2 = $this->batchFileModel->select(" @@ -395,7 +397,7 @@ class EmployeeController extends AdminController $query2->where('cr.user_id', $user_id); } // ->where('files.created_by', get_session_userid()) - $data['batch_list'] = $query2->groupBy("clients.id")->orderBy('batch_files.id', 'desc') + $data['batch_list'] = $query2->groupBy("batch_files.id")->orderBy('batch_files.id', 'desc') ->limit(1500) ->find(); From ae18ed65c8b6c69bedaa879de29c4d578dfb7f05 Mon Sep 17 00:00:00 2001 From: velz Date: Mon, 23 Jun 2025 17:10:21 +0530 Subject: [PATCH 2/4] FIX_INSURER_STMT_UPLOAD&BDS_EXPORT --- app/Controllers/EmpDataServiceController.php | 2 +- .../PolicyTransactionController.php | 21 ++++++++++++------- app/Views/report_bds.php | 4 ++-- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/app/Controllers/EmpDataServiceController.php b/app/Controllers/EmpDataServiceController.php index 3dbf91d5..9d3eeecf 100755 --- a/app/Controllers/EmpDataServiceController.php +++ b/app/Controllers/EmpDataServiceController.php @@ -1918,7 +1918,7 @@ class EmpDataServiceController extends BaseController $result_for_employees_policy = $this->employeePolicyModel ->select('employee_polices.*') ->join('employees', 'employees.id = employee_polices.employee_id') - ->join('emp_endorsement', 'emp_endorsement.employee_id = employees.id') // assuming this is the correct join + ->join('emp_endorsement', 'emp_endorsement.pk = employees.id') // assuming this is the correct join ->where('employees.emp_code', $emp_code) ->where('employees.name', $name) ->where('employees.client_id', $client_id) diff --git a/app/Controllers/PolicyTransactionController.php b/app/Controllers/PolicyTransactionController.php index 6622d0fa..c00f2106 100644 --- a/app/Controllers/PolicyTransactionController.php +++ b/app/Controllers/PolicyTransactionController.php @@ -2037,8 +2037,8 @@ class PolicyTransactionController extends BaseController //insurer statement list page public function statementList() { - // dd($this->validateInsurerStatement(['file_id' => 30])); - // $data['insurers'] = $this->insurerModel->where('is_active',1)->findAll(); + // dd($this->validateInsurerStatement(['file_id' => 49])); + $data['insurers'] = $this->insurerModel->where('is_active',1)->findAll(); $today = date('Y-m-d'); $fromday = $from_date = date('Y-m-d', strtotime('-180 days', strtotime($today))); // echo $fromday;die(); @@ -2261,13 +2261,13 @@ class PolicyTransactionController extends BaseController // dd($highestRowAndColumn); $excel_data = $sheet->rangeToArray('A1:' . $highestRowAndColumn['column'] . $highestRowAndColumn['row']); unset($excel_data[0]); - // Kint::dump($excel_data); + // Kint::dump($excel_data);die(); //get no of line items and update in DB $line_items = 0; // get uploaded month transactions data $source_data = $this->PTCOShareDetailsModel->getNonReconcileredPolicyTransactions(insurer_id: $file['insurer_id'], insurer_branch_id: $file['branch_id']); // var_dump($source_data);die(); - // Kint::dump($source_data);//die(); + // Kint::dump($source_data);die(); // check policy no,insurer and etc in DB for this month @@ -2277,17 +2277,24 @@ class PolicyTransactionController extends BaseController if (!$is_row_empty) { // $excel_row = ExcelSanitizeHelper::sanitizeArrayData($excel_row); $is_source_found = 0; + // Kint::dump($excel_key,$excel_row[1],$excel_row[2]); $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]); //policy_end_date from excel + $policy_no = preg_replace( '/[\x{200B}\x{200C}\x{200D}\x{FEFF}\x{00A0}\x{200E}\x{200F}\x{202A}-\x{202E}]/u', '', $excel_row[1]); //policy_end_date from excel + $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 - // Kint::dump($policy_no); + $endorsement_no = preg_replace( '/[\x{200B}\x{200C}\x{200D}\x{FEFF}\x{00A0}\x{200E}\x{200F}\x{202A}-\x{202E}]/u', '', $excel_row[2]); //policy_end_date from excel + + // Kint::dump($excel_key,$policy_no,$endorsement_no,$policy_start_date,$policy_end_date);//die(); foreach ($source_data as $source_key => $source_row) { $source_endorsement_no = $source_row['endorsement_no'] !== null ? $source_row['endorsement_no'] : null; // Kint::dump($source_endorsement_no); - 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) // && 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']) + { $is_source_found = 1; $line_items = $line_items + 1; unset($source_data[$source_key]); diff --git a/app/Views/report_bds.php b/app/Views/report_bds.php index 815eecb5..d8c1145a 100644 --- a/app/Views/report_bds.php +++ b/app/Views/report_bds.php @@ -212,8 +212,8 @@ $(document).ready(function() { customizeData: function (data) { for (var i = 0; i < data.body.length; i++) { for (var j = 0; j < data.body[i].length; j++) { - // Check if the column is the 9th index (10th column) - if (j === 9) { + // Check if the column is the 9th index (10th column) and 10th index (11th column) + if (j === 9 || j === 10) { data.body[i][j] = '\u200C' + data.body[i][j]; } } From 37b310477257288608acf8de532c3989ed099c8c Mon Sep 17 00:00:00 2001 From: velz Date: Mon, 23 Jun 2025 17:13:37 +0530 Subject: [PATCH 3/4] FIX_INS_STMT_UPLOAD --- app/Controllers/PolicyTransactionController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Controllers/PolicyTransactionController.php b/app/Controllers/PolicyTransactionController.php index c00f2106..0cb10174 100644 --- a/app/Controllers/PolicyTransactionController.php +++ b/app/Controllers/PolicyTransactionController.php @@ -2293,7 +2293,7 @@ class PolicyTransactionController extends BaseController foreach ($source_data as $source_key => $source_row) { $source_endorsement_no = $source_row['endorsement_no'] !== null ? $source_row['endorsement_no'] : null; // Kint::dump($source_endorsement_no); - 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 && 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']) { $is_source_found = 1; $line_items = $line_items + 1; From 72af4263868150beb0d5402d79b9b1978fc6f358 Mon Sep 17 00:00:00 2001 From: velz Date: Mon, 23 Jun 2025 18:19:34 +0530 Subject: [PATCH 4/4] FIX_RR_DEFAULT_UNIT_NOT_SET --- app/Views/policy_grid.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Views/policy_grid.php b/app/Views/policy_grid.php index 06c945c6..d0e825f6 100755 --- a/app/Views/policy_grid.php +++ b/app/Views/policy_grid.php @@ -1391,6 +1391,8 @@ function appendGridtHtml(ui_type = false, secondary = false, data = false) console.log('appendGridtHtml function ui_type', ui_type); console.log('appendGridtHtml function secondary', secondary); console.log('appendGridtHtml function typeof secondary', typeof secondary); + var default_unit = $('#hidden_unit').val(); + // alert(default_unit); // console.log('appendGridtHtml function data.unit', data.unit); // console.log('appendGridtHtml function data.unit type',typeof data.unit);