diff --git a/app/Controllers/MasterController.php b/app/Controllers/MasterController.php
index d647953..7eb2bd9 100644
--- a/app/Controllers/MasterController.php
+++ b/app/Controllers/MasterController.php
@@ -347,18 +347,18 @@ class MasterController extends BaseController
->findAll();
$data['serviceGroupData'] = $this->ServiceGroupModel->findAll();
- foreach ($data['serviceGroupData'] as $key => $value) {
- $check_its_okay = 0;
- foreach (json_decode($value['business_id']) as $values) {
- if($values == $business_id){
- $check_its_okay =1;
- }
- }
- if($check_its_okay == 0){
- unset($data['serviceGroupData'][$key]);
- }
- $check_its_okay = 0;
- }
+ // foreach ($data['serviceGroupData'] as $key => $value) {
+ // $check_its_okay = 0;
+ // foreach (json_decode($value['business_id']) as $values) {
+ // if($values == $business_id){
+ // $check_its_okay =1;
+ // }
+ // }
+ // if($check_its_okay == 0){
+ // unset($data['serviceGroupData'][$key]);
+ // }
+ // $check_its_okay = 0;
+ // }
}else{
$business_id = $this->session->get('logged_in_staff_business_id');
@@ -400,18 +400,18 @@ class MasterController extends BaseController
->findAll();
$data['serviceGroupData'] = $this->ServiceGroupModel->findAll();
- foreach ($data['serviceGroupData'] as $key => $value) {
- $check_its_okay = 0;
- foreach (json_decode($value['business_id']) as $values) {
- if($values == $business_id){
- $check_its_okay =1;
- }
- }
- if($check_its_okay == 0){
- unset($data['serviceGroupData'][$key]);
- }
- $check_its_okay = 0;
- }
+ // foreach ($data['serviceGroupData'] as $key => $value) {
+ // $check_its_okay = 0;
+ // foreach (json_decode($value['business_id']) as $values) {
+ // if($values == $business_id){
+ // $check_its_okay =1;
+ // }
+ // }
+ // if($check_its_okay == 0){
+ // unset($data['serviceGroupData'][$key]);
+ // }
+ // $check_its_okay = 0;
+ // }
}
foreach ($data['doc_list'] as $doc) {
@@ -722,12 +722,16 @@ class MasterController extends BaseController
$documentUrl = base_url();
helper('url');
$url ='Preview and Approve Document';
- $businessData = $this->BranchModel->select('branches.* , business.business_name ')
- ->join('business', 'branches.business_id = business.business_id', 'left')
- ->where('branches.branch_id',$this->session->get('logged_in_staff_branch_id'))
+ // $businessData = $this->BranchModel->select('branches.* , business.business_name ')
+ // ->join('business', 'branches.business_id = business.business_id', 'left')
+ // ->where('branches.branch_id',$this->session->get('logged_in_staff_branch_id'))
+ // ->get()->getRow();
+ $businessData = $this->BusinessModel->select('branches.* , business.business_name ')
+ ->join('branches', 'business.business_id = branches.business_id', 'left')
+ ->where('business.business_id',$this->session->get('logged_in_staff_business_id'))
->get()->getRow();
$subject = 'BB-Sign Verify Document';
-
+ // print_r($businessData);die;
$message = "Dear " . $clientData->client_name . ",
" . $businessData->business_name . " has requested your approval for a document. Please click the link below to preview and approve.
" . $url;
$mail_send = $MailHelper->send_url_email($clientData->email , $businessData->email, $subject, $message);
@@ -750,6 +754,7 @@ class MasterController extends BaseController
$statusData['status'] = 'Revert';
$this->DocsStatusModel->insert($statusData);
}
+
$updated = $this->ClientDocsModel->update($doc_id, $data);
if ($updated) {
return $this->response->setJSON(['status' => 'success','code' => 200,'data' => true],200);
diff --git a/app/Views/share_docs.php b/app/Views/share_docs.php
index aea7000..0048776 100644
--- a/app/Views/share_docs.php
+++ b/app/Views/share_docs.php
@@ -596,7 +596,7 @@
data: formData,
dataType: 'json',
success: function(response) {
- // console.log(response);
+ console.log(response.data);
if (response.data) {
window.location.reload();
}