diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php
index 9bf373ce..9d96e72b 100755
--- a/app/Controllers/ClientController.php
+++ b/app/Controllers/ClientController.php
@@ -3839,13 +3839,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);
@@ -3871,6 +3871,8 @@ class ClientController extends AdminController
'contact_type' => 'client',
'name' => $postData['name'],
'mobile' => $postData['mobile'],
+ 'email' => $postData['email'],
+
];
$this->levelContactModel->insert($contact_data);
}
@@ -4050,7 +4052,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/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..3621bd08 100644
--- a/app/Views/policy_transaction_inception_form.php
+++ b/app/Views/policy_transaction_inception_form.php
@@ -795,115 +795,7 @@
-
-
+
@@ -3155,108 +3047,108 @@ $("#inception_form_id").submit(function(event) {
});
});
-$("#client_form").submit(function(event) {
+// $("#client_form").submit(function(event) {
- let form_type = $(this).data('id') || 0;
+// let form_type = $(this).data('id') || 0;
- console.log('onsubmit event', this)
- console.log('onsubmit event get data value',form_type)
- console.log('client_type', $('#client_type').val());
+// console.log('onsubmit event', this)
+// console.log('onsubmit event get data value',form_type)
+// console.log('client_type', $('#client_type').val());
- event.preventDefault();
+// event.preventDefault();
- $('#aadhar').attr('data-parsley-required', 'false');
- $('#aadhar').removeAttr('required');
+// $('#aadhar').attr('data-parsley-required', 'false');
+// $('#aadhar').removeAttr('required');
- isClientFormSubmitting = true;
- var isValid = $('#client_form').parsley().validate();
- if (!isValid) {
- console.log('Form is Empty', 'Warning');
- return ;
- }
+// isClientFormSubmitting = true;
+// var isValid = $('#client_form').parsley().validate();
+// if (!isValid) {
+// console.log('Form is Empty', 'Warning');
+// return ;
+// }
- form_action = '= base_url("util/createClientWithMinimalData"); ?>';
+// form_action = '= base_url("util/createClientWithMinimalData"); ?>';
- $('.loader').fadeIn();
- $('.loader-mask').fadeIn();
+// $('.loader').fadeIn();
+// $('.loader-mask').fadeIn();
- var client_type = $('#client_type').val() || $('#Owner_type').val();
- console.log('client_type:', client_type);
+// var client_type = $('#client_type').val() || $('#Owner_type').val();
+// console.log('client_type:', client_type);
- //FORM Data
- var formData = new FormData($('#client_form')[0]);
- formData.append('client_type', client_type);
+// //FORM Data
+// var formData = new FormData($('#client_form')[0]);
+// formData.append('client_type', client_type);
- $.ajax({
- data:formData,
- url: form_action,
- type: "POST",
- dataType: 'json',
- processData: false,
- contentType: false,
- success: function(res) {
+// $.ajax({
+// data:formData,
+// url: form_action,
+// type: "POST",
+// dataType: 'json',
+// processData: false,
+// contentType: false,
+// success: function(res) {
- $('.loader').fadeOut();
- $('.loader-mask').delay(350).fadeOut('slow');
+// $('.loader').fadeOut();
+// $('.loader-mask').delay(350).fadeOut('slow');
- console.log('create_Client_With_Minimal_Data', res)
+// console.log('create_Client_With_Minimal_Data', res)
- if(res.status == true){
- getClientAndBranchAndPolicy(res.client_id, res.branch_id);
+// if(res.status == true){
+// getClientAndBranchAndPolicy(res.client_id, res.branch_id);
- if(form_type != 1){
+// if(form_type != 1){
- setTimeout(function(){
- $('#client_id').val(res.client_id).change();
- setTimeout(function(){
- $('#client_branch_id').val(res.branch_id).change();
- }, 1000)
- }, 2000)
+// setTimeout(function(){
+// $('#client_id').val(res.client_id).change();
+// setTimeout(function(){
+// $('#client_branch_id').val(res.branch_id).change();
+// }, 1000)
+// }, 2000)
- }else{
+// }else{
- setTimeout(function(){
- $('#owner').val(res.client_id).change();
- $('#owner_branch').val(res.branch_id).change();
+// setTimeout(function(){
+// $('#owner').val(res.client_id).change();
+// $('#owner_branch').val(res.branch_id).change();
- $('.loader').fadeOut();
- $('.loader-mask').delay(350).fadeOut('slow');
+// $('.loader').fadeOut();
+// $('.loader-mask').delay(350).fadeOut('slow');
- }, 2000)
- }
+// }, 2000)
+// }
- toastr.success(res.message, 'Success');
+// toastr.success(res.message, 'Success');
- }else{
- toastr.error(res.message, 'Error');
- }
+// }else{
+// toastr.error(res.message, 'Error');
+// }
- $('#client_form')[0].reset();
- $('.close').click();
+// $('#client_form')[0].reset();
+// $('.close').click();
- if(form_type == 1){
+// if(form_type == 1){
- var myModal = new bootstrap.Modal(document.getElementById('vehicle_modal'));
- myModal.show();
+// var myModal = new bootstrap.Modal(document.getElementById('vehicle_modal'));
+// myModal.show();
- $('#client_form').removeAttr('data-id');
+// $('#client_form').removeAttr('data-id');
- // Load form data into #vehicle_form from localStorage
- setFormDataFromLocalStorage("#vehicle_form", "vehicleFormData");
- }
+// // Load form data into #vehicle_form from localStorage
+// setFormDataFromLocalStorage("#vehicle_form", "vehicleFormData");
+// }
- isClientFormSubmitting = false;
- },
- error: function (xhr, status, error) {
- console.error(xhr.responseText);
- console.error(status, error);
- $('.loader').fadeOut();
- $('.loader-mask').delay(350).fadeOut('slow');
- }
- });
-});
+// isClientFormSubmitting = false;
+// },
+// error: function (xhr, status, error) {
+// console.error(xhr.responseText);
+// console.error(status, error);
+// $('.loader').fadeOut();
+// $('.loader-mask').delay(350).fadeOut('slow');
+// }
+// });
+// });
$("#vehicle_form").submit(function(event) {