diff --git a/app/Config/Routes.php b/app/Config/Routes.php index a0c418f7..64a7242e 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -373,6 +373,7 @@ $routes->group("policy_tranction", ["filter" => "authMVC"], function ($routes) { $routes->get("getFileErr/(:any)", "PolicyTransactionController::getFileErr/$1"); $routes->get("getInsurerStatementMonth", "PolicyTransactionController::getInsurerStatementMonth"); $routes->get("deleteStatement/(:any)", "PolicyTransactionController::deleteStatement/$1"); + //$routes->post('failedStatement',"PolicyTransactionController::failedStatementList"); }); }); diff --git a/app/Controllers/PolicyTransactionController.php b/app/Controllers/PolicyTransactionController.php index 6784c0fd..40a44bd1 100644 --- a/app/Controllers/PolicyTransactionController.php +++ b/app/Controllers/PolicyTransactionController.php @@ -1660,7 +1660,7 @@ class PolicyTransactionController extends BaseController // dd($this->validateInsurerStatement(['file_id' => 30])); // $data['insurers'] = $this->insurerModel->where('is_active',1)->findAll(); $today = date('Y-m-d'); - $fromday = $from_date = date('Y-m-d', strtotime('-60 days', strtotime($today))); + $fromday = $from_date = date('Y-m-d', strtotime('-180 days', strtotime($today))); // echo $fromday;die(); $data['invoice_status_array'] = $this->invoiceStatus; $data['insurers'] = $this->insurerBranchModel ->getInsurerBranchesWithInsurerNames(); @@ -1687,6 +1687,7 @@ class PolicyTransactionController extends BaseController ->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('insurer_statements.file_status','success') ->where('date(insurer_statements.created_at) >= ', $from_date) ->where('date(insurer_statements.created_at) <= ', $today) ->orderBy('insurer_statements.id', 'DESC') @@ -1698,6 +1699,48 @@ class PolicyTransactionController extends BaseController $this->loadLayout('insurer_statement_list', $data); } + // public function failedStatementList(){ + // $today = date('Y-m-d'); + // $fromday = $from_date = date('Y-m-d', strtotime('-180 days', strtotime($today))); + // // echo $fromday;die(); + // $data['invoice_status_array'] = $this->invoiceStatus; + // $data['insurers'] = $this->insurerBranchModel ->getInsurerBranchesWithInsurerNames(); + + // // dd( $data['insurers']); + // $data['insurer_statement_list'] = $this->insurerStatements + // ->select('insurer_statements.*, + // insurers.name AS insurer_name, + // insurers.short_name, + // user_profiles.first_name, + // insurer_branch.branch_code, + // (SELECT SUM(pt_co_share_details.exp_amt) + // FROM pt_co_share_details + // WHERE pt_co_share_details.is_active = 1 + // AND pt_co_share_details.statement_id = insurer_statements.id + // ) AS exp_inv_amt, + // (SELECT SUM(inv_payment_details.inv_amt) + SUM(inv_payment_details.tds) + SUM(inv_payment_details.gst) + // FROM inv_payment_details + // WHERE inv_payment_details.is_active = 1 + // AND inv_payment_details.statement_id = insurer_statements.id + // ) AS received_inv_amt' + // ) + // ->join('insurers', 'insurer_statements.insurer_id = insurers.id') + // ->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('insurer_statements.file_status','failed') + // ->where('date(insurer_statements.created_at) >= ', $from_date) + // ->where('date(insurer_statements.created_at) <= ', $today) + // ->orderBy('insurer_statements.id', 'DESC') + // ->findAll(); + // if($data['insurer_statement_list']){ + // return $this->respond(['status' => true, 'code' => 200,'data'=>$data ], 200); + // }else{ + // return $this->respond(['status'=>false,'message'=>'Data Not Fount'],404); + // } + + // } + public function uploadInsurerStatement() { diff --git a/app/Models/PolicyTypeModel.php b/app/Models/PolicyTypeModel.php index 3edd01f1..29126484 100755 --- a/app/Models/PolicyTypeModel.php +++ b/app/Models/PolicyTypeModel.php @@ -22,6 +22,6 @@ class PolicyTypeModel extends Model "etp", "iep", "itp", - "question_json", + "question_json",'itep','etep' ]; } diff --git a/app/Views/insurer_statement_list.php b/app/Views/insurer_statement_list.php index 83dee914..b42fc37a 100644 --- a/app/Views/insurer_statement_list.php +++ b/app/Views/insurer_statement_list.php @@ -141,13 +141,38 @@ table.dataTable tbody td {
-
+

Insurer Statement List

+
+ -
- +
+
+
+
+
+ + +
+
+
+
+ +
+
+
@@ -667,7 +692,7 @@ document.addEventListener("DOMContentLoaded", function () { var jsonData = JSON.stringify(formDataJSON); console.log(jsonData); $('.loader').fadeIn(); - $('.loader-mask').fadeIn(); + $('.loader-mask').fadeIn(); // Send the JSON data to the backend using AJAX $.ajax({ url: 'saveInvoicePaymentDetails', // Replace with your backend URL @@ -1299,6 +1324,146 @@ function deleteStatement(id) }); } +// $(document).ready(function() { +// $('#failedSwitch').change(function() { +// if ($(this).prop('checked')) { +// getFailedStatementList(); +// } else { +// console.log("Inside Reload Function"); +// fetch(window.location.href) // Fetch the current page's content +// .then(response => response.text()) +// .then(html => { +// const parser = new DOMParser(); +// const doc = parser.parseFromString(html, 'text/html'); +// document.body.innerHTML = doc.body.innerHTML; // Replace the body content +// $('.loader').fadeOut(); +// $('.loader-mask').delay(100).fadeOut('slow'); +// }) +// .catch(error => console.error('Error reloading body:', error)); +// } +// }); +// }); + +// function checkSwitchStatus(){ +// $('#failedSwitch').change(function() { +// if ($(this).prop('checked')) { +// getFailedStatementList(); +// } else { +// console.log("Inside Reload Function"); +// fetch(window.location.href) // Fetch the current page's content +// .then(response => response.text()) +// .then(html => { +// const parser = new DOMParser(); +// const doc = parser.parseFromString(html, 'text/html'); +// document.body.innerHTML = doc.body.innerHTML; // Replace the body content +// $('.loader').fadeOut(); +// $('.loader-mask').delay(250).fadeOut('slow'); +// }) +// .catch(error => console.error('Error reloading body:', error)); +// } +// }); +// } +// function getFailedStatementList(){ +// $('.loader').fadeIn(); +// $('.loader-mask').fadeIn(); +// $.ajax({ +// url:'', +// type:'POST', +// success:function(response){ +// console.log(response); +// var table = $('#tickets-table').DataTable(); +// table.clear(); +// $('#tickets-table').addClass('table-fixed'); +// var failedList = response.data.insurer_statement_list; +// console.log('failed list'+failedList); +// failedList.forEach(function(row) { +// var newRow = [ +// '', +// row.short_name + '-' + row.branch_code, +// formatDate(row.month), +// row.stmt_sno, +// row.file_name, +// row.line_items, +// row.file_status + +// (row.file_status == 'failed' ? ' ' : ''), +// (row.invoice_status ? row.invoice_status : ' - ') + +// (row.file_status == 'success' ? ' ' : ''), +// formatDate(row.created_at) + ' by
' + row.first_name, +// (row.file_status != 'failed' ? +// '' : '...') +// ]; + +// // Append the new row to the table body +// table.row.add(newRow); +// }); +// table.draw(); +// table.columns.adjust().draw(); // Ensures correct alignment +// $('.loader').fadeOut(); +// $('.loader-mask').delay(250).fadeOut('slow'); +// }, +// error: function(xhr, status, error) { +// let message = 'Failed to load Data '; +// toastr.error(response.message, 'Failed'); +// $('.loader').fadeOut(); +// $('.loader-mask').delay(250).fadeOut('slow'); +// } + +// }) +// } +// $(document).ready(function() { +// var table = $('#tickets-table').DataTable({ +// // responsive: true, // Ensures table adjusts to smaller screens +// stateSave: true, // Saves the table's state +// }); +// }); + + + + + \ No newline at end of file diff --git a/app/Views/notification.php b/app/Views/notification.php index 11868e23..246ace3c 100755 --- a/app/Views/notification.php +++ b/app/Views/notification.php @@ -1813,7 +1813,7 @@ function getMailTemplateData(element) { bottom: '0', // Adjust based on branding position left: '0', width: iframe.width(), - height: '50px', // Adjust height to cover branding + height: '30px', // Adjust height to cover branding backgroundColor: 'white', zIndex: '9999', pointerEvents: 'none', @@ -1828,13 +1828,7 @@ function getMailTemplateData(element) { iframeParent.append(overlay); console.log('Overlay added to hide branding.'); }); - $(window).on('resize', function () { - overlay.css({ - width: iframe.width(), - height: '50px', // Adjust height dynamically if necessary - }); -}); - + @@ -1931,20 +1925,6 @@ $('#account_maneger_summary_mail_form').submit(function (event) { }); }); }); -document.addEventListener("DOMContentLoaded", function () { - const observer = new MutationObserver(() => { - const brandingElement = document.querySelector('#editor-container .blockbuilder-branding'); - if (brandingElement) { - brandingElement.remove(); // Remove the branding element - } - }); - - // Start observing the editor container for changes - const editorContainer = document.getElementById('editor-container'); - if (editorContainer) { - observer.observe(editorContainer, { childList: true, subtree: true }); - } -}); diff --git a/app/Views/policy_type_basic_info.php b/app/Views/policy_type_basic_info.php index b42ec439..6dd82480 100755 --- a/app/Views/policy_type_basic_info.php +++ b/app/Views/policy_type_basic_info.php @@ -15,10 +15,9 @@ placeholder="Enter Policy Type Name" value="" name="policy_type" required>
- + + placeholder="Enter Policy Type Long Name" value="" name="long_name">
+
+ + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
@@ -94,7 +124,7 @@ $(document).ready(function () { }, 1000); $('#policy_type_id').val(res.data.id); - $('#policytype_General_PrimaryKey').val(res.data.id); + $('#policytype_General_PrimaryKey').val(res.data.PrimaryKey); $('#policy_id_type').click(); $('#btnBranchAdd').show(); var message = "Policy Type General Info";