diff --git a/app/Config/Routes.php b/app/Config/Routes.php index ef4c655c..f11f6451 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -332,7 +332,7 @@ $routes->group("/util", ["filter" => "authMVC"], function ($routes) { $routes->get("send_manual_ecard/(:any)", "DashboardController::sendManualEcard/$1"); $routes->get("get_client_policy_list_for_remainder/(:any)", "EmployeeController::get_client_policy_list_for_remainder/$1"); $routes->get("get_client_branch_data/(:any)", "ClientController::get_client_branch_data/$1"); - $routes->get("getLevelContects", "LeadsController::getLevelContects"); + $routes->get("getLevelContects", "LeadsControllerg::getLevelContects"); $routes->get("get_emp_master_data_for_update/(:any)", "EmployeeController::get_emp_master_data_for_update/$1"); $routes->get("send_mail_for_individual_employee_ecard/(:any)", "EmployeeController::send_mail_for_individual_employee_ecard/$1"); $routes->post("update_emp_data", "EmployeeController::update_emp_data"); @@ -365,6 +365,9 @@ $routes->cli("cli/sendInstallmentRemainderMail","PolicyTransactionController::se $routes->group("policy_tranction", ["filter" => "authMVC"], function ($routes) { + $routes->post("getMoreInfo","PolicyTransactionController::getMoreInfo"); + $routes->post("saveInstallment","PolicyTransactionController::saveInstallment"); + $routes->group("inception", ["filter" => "authMVC"], function ($routes) { $routes->match(['get', 'post'], 'list', 'PolicyTransactionController::viewInception'); $routes->post("create", "PolicyTransactionController::createInceptionPolicy"); diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index a5231c6b..968fc9f9 100755 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -3807,13 +3807,13 @@ class ClientController extends AdminController 'dob' => change_date_format($postData['dob'],'d/m/Y','Y-m-d'), 'aadhar' => $postData['aadhar'], 'phone' => $postData['phone'], - 'email' => $postData['email'], 'entity_type_id' => 7 ]); } else { $client_data['entity_type_id'] = $postData['entity_type_id']; } + // print_rr($client_data);die(); // Insert client data $client_insert = $this->clientModel->insert($client_data); @@ -3839,6 +3839,8 @@ class ClientController extends AdminController 'contact_type' => 'client', 'name' => $postData['name'], 'mobile' => $postData['mobile'], + 'email' => $postData['email'], + ]; $this->levelContactModel->insert($contact_data); } @@ -4018,7 +4020,8 @@ class ClientController extends AdminController ->join('clients', 'client_branch.client_id = clients.id') ->where(['client_branch.id' => $id, 'client_branch.is_active' => 1]) ->first(); - $branch_contact_data = $this->levelContactModel->where(['ref_id' => $id, 'contact_type' => 'client', 'is_active' => 1])->orderBy('id','asc')->first(); + $branch_contact_data = $this->levelContactModel->where(['ref_id' => $id, 'contact_type' => 'client', 'is_active' => 1])->findAll(); + // print_rr($branch_contact_data);die(); return $this->respond(['status' => true, 'code' => 200, 'data' => $branch_data, 'contact' => $branch_contact_data], 200); } else { return $this->respond(['status' => false, 'code' => 404, 'message' => 'no data found'], 200); diff --git a/app/Controllers/LoginController.php b/app/Controllers/LoginController.php index f5f31844..bf7f116c 100755 --- a/app/Controllers/LoginController.php +++ b/app/Controllers/LoginController.php @@ -94,7 +94,7 @@ class LoginController extends BaseController // setcookie('session_data', '', time() - 3600, $path); $path = getenv('cookie.Path'); $domain = getenv('cookie.Domain'); - $https = getenv('ccokie.secure'); + $https = getenv('cookie.secure'); setcookie('session_data',null, time() -3600, $path, $domain, $https, true); return redirect()->to(base_url('login')); } diff --git a/app/Controllers/PolicyTransactionController.php b/app/Controllers/PolicyTransactionController.php index ea4a45de..ee8dfe6c 100644 --- a/app/Controllers/PolicyTransactionController.php +++ b/app/Controllers/PolicyTransactionController.php @@ -235,8 +235,7 @@ class PolicyTransactionController extends BaseController ->where('role', 3) // Assuming `role` is in `user_profiles` ->where('is_active', 1) ->findAll(); - - // echo '
';
+ // echo '';
// print_r($data['ppTeamsData']); die;
// dd($data);
@@ -2905,4 +2904,52 @@ class PolicyTransactionController extends BaseController
$this->myLogger->logme('error', 'Exception: ' . $e->getMessage() . 'Page: ' . $e->getFile() . ' Line: ' . $e->getLine());
}
}
+
+ public function getMoreInfo() {
+
+ $pt_id = $this->request->getPost("pt_id");
+ $data_to_send['bds_data'] = $this->BdsPlacementModel->where("is_active",1)->where("pt_id",$pt_id)->findAll();
+
+ foreach ($data_to_send['bds_data'] as &$data) {
+
+ $data['payment_date'] = (new \DateTime($data['payment_date']))->format('d-m-Y');
+ }
+
+ if (!empty($data_to_send)) {
+
+ return $this->respond(['status' => true , "data" => $data_to_send],200);
+ }else {
+
+ return $this->respond(['status' => false,"No Data Found For the Policy Transaction"],404);
+ }
+
+ }
+
+ public function saveInstallment() {
+
+ $installments = $this->request->getPost('installments');
+
+ if (!$installments || !is_array($installments)) {
+ return $this->respond(['status' => false, 'message' => 'No data received'], 400);
+ }
+
+ $this->myLogger->logme("error",json_encode($installments));
+ // die();
+
+ foreach ($installments as &$row) {
+ // Convert date from d-m-Y to Y-m-d
+ if (!empty($row['payment_date'])) {
+ $date = \DateTime::createFromFormat('d-m-Y', $row['payment_date']);
+ if ($date) {
+ $row['payment_date'] = $date->format('Y-m-d');
+ }
+ }
+ $this->BdsPlacementModel->save($row);
+ }
+
+ return $this->respond(['status' => true, 'message' => 'Data saved successfully'], 200);
+ }
+
+
+
}
diff --git a/app/Views/leads_form.php b/app/Views/leads_form.php
index 25044797..23209757 100644
--- a/app/Views/leads_form.php
+++ b/app/Views/leads_form.php
@@ -149,7 +149,7 @@
@@ -207,6 +207,14 @@
placeholder="Enter Branch Code" required>
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/Views/policy_transaction_inception_form.php b/app/Views/policy_transaction_inception_form.php
index a8d31703..e7632e56 100644
--- a/app/Views/policy_transaction_inception_form.php
+++ b/app/Views/policy_transaction_inception_form.php
@@ -129,6 +129,18 @@
color: #666;
}
+.info-icon {
+ color: #007bff;
+ font-size: 15px;
+ transition: 0.3s ease;
+ cursor: pointer;
+ }
+
+ .info-icon:hover {
+ color: #0056b3;
+ font-size: 24px;
+ }
+
@@ -525,7 +537,9 @@
-
+
@@ -795,115 +809,7 @@
-
-
-
-
-
-
+
@@ -1041,8 +947,220 @@
+
+
+