From f1fc1926e91b9a83919df15fc50dece069544413 Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Thu, 20 Nov 2025 18:31:18 +0530 Subject: [PATCH] FIX_datatable show range and payouts fixes --- app/Config/Routes.php | 2 + app/Controllers/PayoutController.php | 112 ++++++++++++------ app/Models/InvoiceModel.php | 30 +++-- app/Views/UserList.php | 8 +- app/Views/add_image_list.php | 5 +- app/Views/batch_list.php | 10 +- app/Views/bds_multi_report.php | 8 +- app/Views/bds_renewal_report_list.php | 6 +- app/Views/bds_report_Insurer_wise_Data.php | 8 +- app/Views/bds_report_bap_wise_data.php | 8 +- app/Views/bds_tat_wise_report.php | 10 +- app/Views/business_team_list.php | 8 +- app/Views/cd_master_list.php | 10 +- app/Views/claim_dump_file_list.php | 8 +- app/Views/claim_files_upload.php | 4 +- app/Views/claims_report_acc_manager_wise.php | 8 +- app/Views/claims_report_tpa_wise.php | 8 +- app/Views/client_deposit_list.php | 3 + app/Views/client_list.php | 9 +- app/Views/commission_file_upload.php | 10 +- app/Views/dms_search.php | 8 +- app/Views/drive_file_upload.php | 2 +- app/Views/employee_data_list.php | 8 +- app/Views/endorsement_list.php | 6 +- app/Views/file_list.php | 10 +- app/Views/finance_team_list.php | 10 +- app/Views/hr_activity_history.php | 6 +- app/Views/hr_file_upload.php | 6 +- app/Views/insurer_list.php | 8 +- app/Views/invoice_policy_mapping.php | 60 +++++----- app/Views/invoice_policy_mapping_add.php | 92 +++++++++++--- app/Views/irda_bap_client_report_list.php | 6 +- app/Views/irda_bap_insurer_report_list.php | 10 +- app/Views/irda_client_report_list.php | 10 +- app/Views/kyc_list.php | 10 +- app/Views/leads_list.php | 8 +- app/Views/nhance_branch_list.php | 6 +- app/Views/notification.php | 14 ++- app/Views/outstanding_report_list.php | 8 +- app/Views/payout_list.php | 58 ++++++--- app/Views/payout_utr_details.php | 2 +- .../policy_transaction_endorsement_list.php | 8 +- .../policy_transaction_inception_list.php | 8 +- app/Views/policy_type_list.php | 10 +- app/Views/report_bds.php | 10 +- app/Views/report_bds_new.php | 10 +- app/Views/report_bds_old.php | 6 +- app/Views/retail_endorsement_list.php | 10 +- app/Views/rto_master_list.php | 6 +- app/Views/tat_report_band_wise_list.php | 10 +- app/Views/test_members_list.php | 8 +- app/Views/thz_list.php | 8 +- app/Views/ticket_feedback_list.php | 10 +- app/Views/ticket_history.php | 10 +- app/Views/ticket_list.php | 10 +- app/Views/ticket_mail_template.php | 8 +- app/Views/tpa_list.php | 8 +- app/Views/variance_report_list.php | 8 +- app/Views/vehicle_docs.php | 2 +- app/Views/vehicle_master_list.php | 10 +- app/Views/vehicle_type_list.php | 8 +- app/Views/vehicle_type_master_list.php | 5 +- app/Views/view_deposit.php | 10 +- 63 files changed, 573 insertions(+), 233 deletions(-) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index d2a077fd..fe088694 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -777,6 +777,8 @@ $routes->group('payout', function($routes) { $routes->get('invoices', 'PayoutController::invoices'); $routes->post('invoices/save', 'PayoutController::saveInvoice'); $routes->get('invoices/history', 'PayoutController::auditHistory'); + $routes->get('invoice/generate-number/(:num)', 'PayoutController::generateInvoiceNumberAjax/$1'); + }); //PARTNER COMMISSION diff --git a/app/Controllers/PayoutController.php b/app/Controllers/PayoutController.php index 5c86ff39..e2479e42 100644 --- a/app/Controllers/PayoutController.php +++ b/app/Controllers/PayoutController.php @@ -30,7 +30,7 @@ class PayoutController extends BaseController $this->payout_status = [ 1 => "Pending", - 2 => "Complete", + 2 => "Completed", ]; $this->invoiceItemModel = new InvoiceItemModel(); @@ -84,7 +84,7 @@ class PayoutController extends BaseController // for list $data['payout_status'] = $this->payout_status; $data['agent_list'] = $this->invoiceModel->agentList(); - $data['page_name'] = "Payout"; + $data['page_name'] = "Invoices"; $payout_data['payout_list_data'] = $this->invoiceModel->invoiceList(); $data['payout_list'] = view('payout_list', $payout_data); @@ -199,10 +199,10 @@ class PayoutController extends BaseController $type = $this->request->getGet('type'); - $title = $type === 'add' ? 'Add Invoices' - : ($type === 'edit' ? 'Edit Invoices' - : ($type === 'adjustment' ? 'Adjustment Invoices' - : 'Invoices')); + $title = $type === 'add' ? 'Add Payouts' + : ($type === 'edit' ? 'Edit Payouts' + : ($type === 'adjustment' ? 'Payouts Adjustment' + : 'Payouts')); $data['tab_name'] = $title; $data['page_name'] = $title; @@ -219,9 +219,9 @@ class PayoutController extends BaseController //... Now Seperated edit and adjustment => 'policy_transaction_payouts' old file //... Reason : Due Datatable issues Export button Searching like that so seperated if ($type === 'add') { - $invoiceNo = $this->generateInvoiceNumber(); + // $invoiceNo = $this->generateInvoiceNumber(); $data['payouts'] = $this->invoiceModel->payoutList(1); - $data['invoice_number'] = $invoiceNo; + // $data['invoice_number'] = $invoiceNo; return $this->loadLayout('invoice_policy_mapping_add', $data); } @@ -229,6 +229,7 @@ class PayoutController extends BaseController $invoice = $this->invoiceModel->where('id', $id)->first(); $data['freeze_edit'] = $this->auditHistory->where('table_name', 'partner_invoice')->where('pk', $id)->countAllResults(); + $agentId = $invoice['agent_id'] ?? null; @@ -246,6 +247,7 @@ class PayoutController extends BaseController $data['invoice_number']= $invoice['invoice_no']; $data['type'] = $type; + $data['payout_status'] = $invoice['payout_status'] ; return $this->loadLayout('invoice_policy_mapping', $data); @@ -268,9 +270,18 @@ class PayoutController extends BaseController //... ADD Part if (empty($id)) { + $exists = $this->invoiceModel + ->where('invoice_no', $json['invoice_no']) + ->first(); + + if ($exists) { + $InvNum = $this->generateInvoiceNumber($json['agent_id']); + } else { + $InvNum = $json['invoice_no']; + } $invoiceData = [ - 'invoice_no' => $json['invoice_no'], + 'invoice_no' => $InvNum, 'agent_id' => $json['agent_id'], 'invoice_date' => $json['invoice_date'], 'invoice_amount' => $json['invoice_amount'], @@ -387,34 +398,69 @@ class PayoutController extends BaseController } - - + //... Payout-invoice Mapping - Invoice number is auto-generated only for the Add mode. - // Note: It will change each time the page is reloaded.. (REF:MGW) - private function generateInvoiceNumber() + // Note New Pattern : INV/AG001/20251101/xx (REF:SVM) + public function generateInvoiceNumberAjax($agentId) { - $year = date('Y'); - $month = date('m'); + if (!$agentId) { + return $this->response->setJSON([ + 'status' => 'error', + 'message' => 'Agent ID missing' + ]); + } - do { - // random 3-digit number - $random = str_pad(rand(1, 999), 3, '0', STR_PAD_LEFT); - $invoiceNo = "INV{$year}{$month}{$random}"; + $invoiceNo = $this->generateInvoiceNumber($agentId); - // check main invoice table - $existsMain = $this->invoiceModel - ->where('invoice_no', $invoiceNo) - ->first(); - - // check partner invoice table - $existsPartner = $this->invoiceModel - ->where('invoice_no', $invoiceNo) - ->first(); - - } while ($existsMain || $existsPartner); // regenerate if duplicate found - - return $invoiceNo; + return $this->response->setJSON([ + 'status' => 'success', + 'invoice_no' => $invoiceNo + ]); } + + //... Payout-invoice Mapping - Invoice number is auto-generated only for the Add mode. + // Note New Pattern : INV/AG001/20251101/xx (REF:SVM) + private function generateInvoiceNumber($agentId) + { + $agent = $this->invoiceModel->agentListById($agentId); + $agentCode = $agent["agent_code"]; + + $today = date("Ymd"); + $likePattern = "INV/$agentCode/$today/%"; + + $count = $this->invoiceModel + ->like("invoice_no", $likePattern) + ->countAllResults(); + + $nextNumber = $count + 1; + + return "INV/$agentCode/$today/$nextNumber"; + } + + // private function generateInvoiceNumber() + // { + // $year = date('Y'); + // $month = date('m'); + + // do { + // // random 3-digit number + // $random = str_pad(rand(1, 999), 3, '0', STR_PAD_LEFT); + // $invoiceNo = "INV{$year}{$month}{$random}"; + + // // check main invoice table + // $existsMain = $this->invoiceModel + // ->where('invoice_no', $invoiceNo) + // ->first(); + + // // check partner invoice table + // $existsPartner = $this->invoiceModel + // ->where('invoice_no', $invoiceNo) + // ->first(); + + // } while ($existsMain || $existsPartner); // regenerate if duplicate found + + // return $invoiceNo; + // } //... Payout-invoice Mapping Audit History Based on "Adjustment" value (REF: KV,SVM) public function auditHistory() @@ -434,7 +480,7 @@ class PayoutController extends BaseController ->getResultArray(); $details['invoice_child'] = $this->auditHistory - ->select('auditing_history.*,partner_invoice.invoice_no, user_profiles.first_name as created_name') + ->select('auditing_history.*,partner_invoice.invoice_no, user_profiles.first_name as created_name,partner_invoice_items.policy_no') ->join('user_profiles', 'user_profiles.id = auditing_history.created_by', 'left') ->join('partner_invoice_items', 'partner_invoice_items.id = auditing_history.pk', 'left') ->join('partner_invoice', 'partner_invoice.id = partner_invoice_items.invoice_id', 'left') diff --git a/app/Models/InvoiceModel.php b/app/Models/InvoiceModel.php index ea5fc4d3..d1c312f4 100644 --- a/app/Models/InvoiceModel.php +++ b/app/Models/InvoiceModel.php @@ -101,7 +101,7 @@ class InvoiceModel extends Model -- Payout status CASE WHEN payout_status = 1 THEN 'Pending' - WHEN payout_status = 2 THEN 'Complete' + WHEN payout_status = 2 THEN 'Completed' END AS status_text, partner_agent.name as agent_name @@ -175,7 +175,7 @@ class InvoiceModel extends Model -- Payout status CASE WHEN payout_status = 1 THEN 'Pending' - WHEN payout_status = 2 THEN 'Complete' + WHEN payout_status = 2 THEN 'Completed' END AS status_text, partner_agent.name as agent_name @@ -198,26 +198,26 @@ class InvoiceModel extends Model pt.agent_id AS agentId, pp.insured_name AS customer, pp.premium_amount AS premium, - pp.commission_amount AS commission, + COALESCE(pii.commission_amount, pp.commission_amount) AS commission, pp.issued_date AS date_db, DATE_FORMAT(pp.issued_date, "%d/%m/%Y") AS date, - pii.id AS invoiceItemId + pii.id AS invoiceItemId, + pii.commission_amount as paid_amount, + pi.payout_status ') + ->join('partner_invoice_items pii','pii.policy_no = pt.policy_no','left') + ->join('partner_invoice pi','pi.id = pii.invoice_id','left') ->join('partner_policy pp','pt.policy_no = pp.policy_number AND pt.agent_id = pp.agent_id','left') ->where('pt.is_active',1) ->where('pt.agent_id IS NOT NULL', null, false); if ($flag == 1) { // Add mode - // EXCLUDE all policies that exist in partner_invoice_items - $builder->join('partner_invoice_items pii','pii.policy_no = pt.policy_no','left'); + // EXCLUDE all policies that exist in partner_invoice_items $builder->where("pt.policy_no NOT IN (SELECT policy_no FROM partner_invoice_items)", null, false); } if ($flag == 2) { // Edit mode // Policies belonging to a specific invoice - $builder->select('pii.commission_amount as paid_amount'); - $builder->join('partner_invoice_items pii','pii.policy_no = pt.policy_no','inner'); // must exist - $builder->join('partner_invoice pi','pi.id = pii.invoice_id','inner'); // must exist $builder->where('pii.is_active',1); if ($invoiceId) { $builder->where('pi.id', $invoiceId); // only policies of this invoice @@ -229,8 +229,6 @@ class InvoiceModel extends Model if ($flag == 3) { // Extra policies // Policies not assigned to any invoice - $builder->select('pii.commission_amount as paid_amount'); - $builder->join('partner_invoice_items pii','pii.policy_no = pt.policy_no','left'); $builder->where('pii.id IS NULL', null, false); if ($agentId) { $builder->where('pt.agent_id', $agentId); @@ -240,4 +238,14 @@ class InvoiceModel extends Model return $builder->get()->getResultArray(); } + public function agentListById($agentId) + { + return $this->db->table('partner_agent') + ->where('id', $agentId) + ->where('is_active', 1) + ->get() + ->getRowArray(); + } + + } diff --git a/app/Views/UserList.php b/app/Views/UserList.php index d0dca952..a991670d 100755 --- a/app/Views/UserList.php +++ b/app/Views/UserList.php @@ -858,9 +858,13 @@ table.dataTable tbody td { table = $('#user-table').DataTable({ scrollX: true, + // dom: "<'row'<'col-sm-3'f><'col-sm-9'B>>" + + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", dom: "<'row'<'col-sm-3'f><'col-sm-9'B>>" + - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ // { // extend: 'collection', diff --git a/app/Views/add_image_list.php b/app/Views/add_image_list.php index c47c5880..034923f6 100755 --- a/app/Views/add_image_list.php +++ b/app/Views/add_image_list.php @@ -223,9 +223,12 @@ 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>>", dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { text: ' Add', diff --git a/app/Views/batch_list.php b/app/Views/batch_list.php index 6600162f..7e66110d 100755 --- a/app/Views/batch_list.php +++ b/app/Views/batch_list.php @@ -224,9 +224,9 @@ $(document).ready(function() { $('#datatable-buttons').DataTable({ - dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", + // dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", // buttons: [{ // extend: 'csv', // text: 'CSV', @@ -239,6 +239,10 @@ // left: "50px" // }); // }, + dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [{ extend: 'collection', text: ' Export ', diff --git a/app/Views/bds_multi_report.php b/app/Views/bds_multi_report.php index 33fa456a..69d3b787 100644 --- a/app/Views/bds_multi_report.php +++ b/app/Views/bds_multi_report.php @@ -89,9 +89,13 @@ if (ticketsTable.length) { ticketsTable.DataTable({ scrollX: true, + // dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { extend: 'collection', diff --git a/app/Views/bds_renewal_report_list.php b/app/Views/bds_renewal_report_list.php index c11290a7..d1dd8c17 100644 --- a/app/Views/bds_renewal_report_list.php +++ b/app/Views/bds_renewal_report_list.php @@ -117,9 +117,13 @@ $(document).ready(function() { if (ticketsTable.length) { ticketsTable.DataTable({ scrollX: true, + // dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" + // Filter left, buttons right + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" + // Filter left, buttons right "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { extend: 'collection', diff --git a/app/Views/bds_report_Insurer_wise_Data.php b/app/Views/bds_report_Insurer_wise_Data.php index d020fb8c..a6e6e2a9 100644 --- a/app/Views/bds_report_Insurer_wise_Data.php +++ b/app/Views/bds_report_Insurer_wise_Data.php @@ -74,9 +74,13 @@ table.dataTable tbody td { if (ticketsTable.length) { ticketsTable.DataTable({ scrollX: true, + // dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { extend: 'collection', diff --git a/app/Views/bds_report_bap_wise_data.php b/app/Views/bds_report_bap_wise_data.php index 928ad3a4..8a5b467a 100644 --- a/app/Views/bds_report_bap_wise_data.php +++ b/app/Views/bds_report_bap_wise_data.php @@ -76,9 +76,13 @@ table.dataTable tbody td { if (ticketsTable.length) { ticketsTable.DataTable({ scrollX: true, + // dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { extend: 'collection', diff --git a/app/Views/bds_tat_wise_report.php b/app/Views/bds_tat_wise_report.php index c47cc259..41f85f71 100644 --- a/app/Views/bds_tat_wise_report.php +++ b/app/Views/bds_tat_wise_report.php @@ -91,9 +91,9 @@ if (ticketsTable.length) { ticketsTable.DataTable({ scrollX: true, - dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", + // dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", // buttons: [ // { // extend: 'csv', @@ -107,6 +107,10 @@ // }, // ], + dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { extend: 'collection', diff --git a/app/Views/business_team_list.php b/app/Views/business_team_list.php index 3aeb2ed0..c00fcd6e 100644 --- a/app/Views/business_team_list.php +++ b/app/Views/business_team_list.php @@ -338,9 +338,13 @@ if (ticketsTable.length) { ticketsTable.DataTable({ + // dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { extend: 'collection', diff --git a/app/Views/cd_master_list.php b/app/Views/cd_master_list.php index c530a6bb..30c20b60 100755 --- a/app/Views/cd_master_list.php +++ b/app/Views/cd_master_list.php @@ -217,9 +217,13 @@ table.dataTable thead th { $('#scroll-horizontal-datatable').DataTable({ scrollX: true, - dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", + // dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", + dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { text: ' Add ', diff --git a/app/Views/claim_dump_file_list.php b/app/Views/claim_dump_file_list.php index 70282d89..a2f27a80 100644 --- a/app/Views/claim_dump_file_list.php +++ b/app/Views/claim_dump_file_list.php @@ -284,9 +284,13 @@ if (ticketsTable.length) { ticketsTable.DataTable({ scrollX: true, + // dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { text: 'Add', diff --git a/app/Views/claim_files_upload.php b/app/Views/claim_files_upload.php index 31888578..80eccfa0 100644 --- a/app/Views/claim_files_upload.php +++ b/app/Views/claim_files_upload.php @@ -56,7 +56,7 @@ - + @@ -266,7 +266,7 @@ function create_url_list(data) { let base_url = ""; - if (data && data.length > 0) { + if (data && data.length > 0) { let html = ""; data.forEach((item, index) => { diff --git a/app/Views/claims_report_acc_manager_wise.php b/app/Views/claims_report_acc_manager_wise.php index 177fe93f..066514d9 100644 --- a/app/Views/claims_report_acc_manager_wise.php +++ b/app/Views/claims_report_acc_manager_wise.php @@ -84,9 +84,13 @@ if (ticketsTable.length) { ticketsTable.DataTable({ scrollX: true, + // dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { extend: 'collection', diff --git a/app/Views/claims_report_tpa_wise.php b/app/Views/claims_report_tpa_wise.php index fbf5daa5..55711b3e 100644 --- a/app/Views/claims_report_tpa_wise.php +++ b/app/Views/claims_report_tpa_wise.php @@ -82,9 +82,13 @@ if (ticketsTable.length) { ticketsTable.DataTable({ scrollX: true, + // dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { extend: 'collection', diff --git a/app/Views/client_deposit_list.php b/app/Views/client_deposit_list.php index a86ffa11..10aa6c74 100755 --- a/app/Views/client_deposit_list.php +++ b/app/Views/client_deposit_list.php @@ -71,6 +71,9 @@ $(document).ready(function() { $('#tickets-table').DataTable({ // dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>", dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>", + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { extend: 'collection', diff --git a/app/Views/client_list.php b/app/Views/client_list.php index 473d75fe..0df5b975 100755 --- a/app/Views/client_list.php +++ b/app/Views/client_list.php @@ -298,10 +298,13 @@ var table; $(document).ready(function() { table = $('#tickets-table').DataTable({ + // dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", - + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { text: 'Add From Lead', diff --git a/app/Views/commission_file_upload.php b/app/Views/commission_file_upload.php index 71ecd86f..4bec2202 100644 --- a/app/Views/commission_file_upload.php +++ b/app/Views/commission_file_upload.php @@ -372,12 +372,14 @@ $(document).ready(function() { table = $('#tickets-table').DataTable({ scrollX: true, + // dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", - - buttons: [ - { + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], + buttons: [{ text: 'Upload ', className: 'btn app-btn-primary mr-2', // custom class action: function(e, dt, node, config) { diff --git a/app/Views/dms_search.php b/app/Views/dms_search.php index 1808ab8b..d09d3062 100644 --- a/app/Views/dms_search.php +++ b/app/Views/dms_search.php @@ -173,9 +173,13 @@ if (ticketsTable.length) { ticketsTable.DataTable({ scrollX: true, + // dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [{ extend: 'collection', text: ' Export ', diff --git a/app/Views/drive_file_upload.php b/app/Views/drive_file_upload.php index db20f6d4..96a4fc79 100644 --- a/app/Views/drive_file_upload.php +++ b/app/Views/drive_file_upload.php @@ -49,7 +49,7 @@
S.No S.No  Docs Name  File Name  Action 
- + diff --git a/app/Views/employee_data_list.php b/app/Views/employee_data_list.php index 4b594084..f01ca1dc 100755 --- a/app/Views/employee_data_list.php +++ b/app/Views/employee_data_list.php @@ -341,9 +341,13 @@ if (ticketsTable.length) { ticketsTable.DataTable({ scrollX: true, + // dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { extend: 'collection', diff --git a/app/Views/endorsement_list.php b/app/Views/endorsement_list.php index 8512e000..8eb95ddd 100755 --- a/app/Views/endorsement_list.php +++ b/app/Views/endorsement_list.php @@ -594,9 +594,13 @@ $(document).ready(function() { $('#tickets-table').DataTable({ + // dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [{ text: ' Add ', className: 'btn app-btn-primary mr-2', diff --git a/app/Views/file_list.php b/app/Views/file_list.php index 52fb1940..aec37e3e 100755 --- a/app/Views/file_list.php +++ b/app/Views/file_list.php @@ -461,12 +461,16 @@ $(document).ready(function() { $('#tickets-table').DataTable({ - dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + + // dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", + dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [{ extend: 'collection', text: ' Export ', diff --git a/app/Views/finance_team_list.php b/app/Views/finance_team_list.php index 6e6d2016..70855a6e 100644 --- a/app/Views/finance_team_list.php +++ b/app/Views/finance_team_list.php @@ -336,10 +336,14 @@ $(document).ready(function () { if (ticketsTable.length) { ticketsTable.DataTable({ - dom: - "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right + // dom: + // "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector + dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { extend: 'collection', diff --git a/app/Views/hr_activity_history.php b/app/Views/hr_activity_history.php index f069c886..4ecfdd28 100644 --- a/app/Views/hr_activity_history.php +++ b/app/Views/hr_activity_history.php @@ -98,9 +98,13 @@ $(document).ready(function () { var table = ticketsTable.DataTable({ scrollX: true, + // dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], language: { search: `
diff --git a/app/Views/hr_file_upload.php b/app/Views/hr_file_upload.php index 9d5cf1e5..4fe317a2 100644 --- a/app/Views/hr_file_upload.php +++ b/app/Views/hr_file_upload.php @@ -356,9 +356,13 @@ // for datatable $(document).ready(function() { $('#hr_tickets_table').DataTable({ + // dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [{ extend: 'collection', text: ' Export ', diff --git a/app/Views/insurer_list.php b/app/Views/insurer_list.php index bf145a61..977455a5 100755 --- a/app/Views/insurer_list.php +++ b/app/Views/insurer_list.php @@ -182,9 +182,13 @@ $(document).ready(function() { $('#tickets-table').DataTable({ + // dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { text: ' Add ', diff --git a/app/Views/invoice_policy_mapping.php b/app/Views/invoice_policy_mapping.php index 12d18e6b..870bcd66 100644 --- a/app/Views/invoice_policy_mapping.php +++ b/app/Views/invoice_policy_mapping.php @@ -136,12 +136,12 @@ table.dataTable tbody td { padding: 4px 4px !important; }
- +
@@ -198,14 +198,19 @@ table.dataTable tbody td { padding: 4px 4px !important; } function getEl(id) { return document.getElementById(id); } $(document).ready(function(){ - $('#agentSelect').select2 && $('#agentSelect').select2(); - const today = new Date().toISOString().split("T")[0]; + + // Initialize Select2 + if ($('#agentSelect').select2) $('#agentSelect').select2(); - if (getEl('agentSelect')) getEl('agentSelect').value = ""; - if (getEl('invoiceNo')) getEl('invoiceNo').value = ""; + // Clear fields without triggering change + $("#invoiceNo").val(""); + $("#agentSelect").val(""); // do NOT trigger change + + // Set max dates for date fields + const today = new Date().toISOString().split("T")[0]; if (getEl('invoiceDate')) getEl('invoiceDate').max = today; - if (getEl('invoiceDate')) getEl('invoiceDate').valueAsDate = new Date(); if (getEl('policyTillDate')) getEl('policyTillDate').max = today; + if (getEl('invoiceDate')) getEl('invoiceDate').valueAsDate = new Date(); if (getEl('policyTillDate')) getEl('policyTillDate').valueAsDate = new Date(); // Initial empty DataTable so buttons/search are available even before loading policies @@ -214,14 +219,12 @@ table.dataTable tbody td { padding: 4px 4px !important; } } - - - $('#tickets-table').DataTable({ dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { extend: 'collection', @@ -339,7 +342,8 @@ table.dataTable tbody td { padding: 4px 4px !important; } dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { extend: 'collection', @@ -471,13 +475,13 @@ table.dataTable tbody td { padding: 4px 4px !important; } // Reset filters (keeps agent selection; clear others) function resetFilters() { - ['fromDate','toDate','from_date','to_date','policyTillDate'].forEach(id => { - const el = getEl(id); - if (el) el.value = ''; + // Keep agent selected + ['fromDate','toDate','from_date','to_date'].forEach(id => { + if (getEl(id)) getEl(id).value = ''; }); - loadPolicies(); } + // Save invoice (AJAX) function saveInvoice() { const agentId = getEl('agentSelect')?.value || ''; @@ -536,8 +540,58 @@ table.dataTable tbody td { padding: 4px 4px !important; } let day = String(d.getDate()).padStart(2, '0'); let month = String(d.getMonth() + 1).padStart(2, '0'); let year = d.getFullYear(); - return `Invoice Policies List ${day}-${month}-${year}`; + return `Payouts (${day}-${month}-${year})`; } + function generateInvoiceNumberAjaxCall() { + let agentId = $("#agentSelect").val(); + + if (!agentId) { + $("#invoiceNo").val(""); + toastr.error("Please Select The Agent"); + return; + } + + $.ajax({ + url: "/" + agentId, + method: "GET", + dataType: "json", + success: function (res) { + if (res.status === "success") { + $("#invoiceNo").val(res.invoice_no); + } else { + toastr.error(res.message); + } + }, + error: function () { + toastr.error("Error generating invoice number"); + } + }); + } + // function searchPolicies() { + // filterPolicies(); + // } + // function filterPolicies() { + // const fromDate = document.getElementById('fromDate').value; + // const toDate = document.getElementById('toDate').value; + + // const agentId = document.getElementById('agentSelect').value; + // const policyTillDate = document.getElementById('policyTillDate').value; + + // if (!agentId) { + // alert('Please select an agent first'); + // return; + // } + + // filteredPolicies = allPolicies.filter(p => { + // if (p.agentId != agentId) return false; + // if (policyTillDate && p.date_db > policyTillDate) return false; + // if (fromDate && p.date_db < fromDate) return false; + // if (toDate && p.date_db > toDate) return false; + // return true; + // }); + + // loadPolicies(); + // } \ No newline at end of file diff --git a/app/Views/irda_bap_client_report_list.php b/app/Views/irda_bap_client_report_list.php index 78f89695..213423bf 100644 --- a/app/Views/irda_bap_client_report_list.php +++ b/app/Views/irda_bap_client_report_list.php @@ -206,9 +206,13 @@ $(document).ready(function() { if (ticketsTable.length) { ticketsTable.DataTable({ scrollX: true, + // dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { extend: 'collection', diff --git a/app/Views/irda_bap_insurer_report_list.php b/app/Views/irda_bap_insurer_report_list.php index b57a2912..5b2f2ad9 100644 --- a/app/Views/irda_bap_insurer_report_list.php +++ b/app/Views/irda_bap_insurer_report_list.php @@ -239,9 +239,9 @@ $(document).ready(function() { if (ticketsTable.length) { ticketsTable.DataTable({ scrollX: true, - dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector + // dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector // buttons: [{ // extend: 'csv', // text: 'CSV', @@ -295,6 +295,10 @@ $(document).ready(function() { // } // ], + dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { extend: 'collection', diff --git a/app/Views/irda_client_report_list.php b/app/Views/irda_client_report_list.php index 09df1196..aca84738 100644 --- a/app/Views/irda_client_report_list.php +++ b/app/Views/irda_client_report_list.php @@ -75,9 +75,9 @@ $(document).ready(function() { if (ticketsTable.length) { ticketsTable.DataTable({ scrollX: true, - dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector + // dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector // buttons: [{ // extend: 'csv', // text: 'CSV', @@ -131,6 +131,10 @@ $(document).ready(function() { // } // ], + dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { extend: 'collection', diff --git a/app/Views/kyc_list.php b/app/Views/kyc_list.php index 2e346371..54ca556f 100755 --- a/app/Views/kyc_list.php +++ b/app/Views/kyc_list.php @@ -176,11 +176,13 @@ $('#tickets-table').DataTable({ + // dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>" , dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" + - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>" , - - + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { text: ' Add ', diff --git a/app/Views/leads_list.php b/app/Views/leads_list.php index 8075471d..0ab3ab13 100644 --- a/app/Views/leads_list.php +++ b/app/Views/leads_list.php @@ -458,9 +458,13 @@ table.dataTable tbody td { if (ticketsTable.length) { ticketsTable.DataTable({ scrollX: true, + // dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { text: 'Add', diff --git a/app/Views/nhance_branch_list.php b/app/Views/nhance_branch_list.php index 32c7c09c..3f8b2941 100644 --- a/app/Views/nhance_branch_list.php +++ b/app/Views/nhance_branch_list.php @@ -94,9 +94,13 @@ var ticketsTable = $('#user-table'); ticketsTable.DataTable({ scrollX: true, + // dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right + // "<'row'<'col-sm-12'tr>>" + + // "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector + "<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>", + lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]], buttons: [ { text: 'Add', diff --git a/app/Views/notification.php b/app/Views/notification.php index 553c8329..956e9dc0 100755 --- a/app/Views/notification.php +++ b/app/Views/notification.php @@ -342,7 +342,7 @@ - +
+
S.No S.No  Docs Name  File Name  Action 
@@ -446,8 +447,7 @@ - - + - + + +