diff --git a/app/Controllers/MasterController.php b/app/Controllers/MasterController.php index d28ce36..9aaea5f 100644 --- a/app/Controllers/MasterController.php +++ b/app/Controllers/MasterController.php @@ -265,8 +265,14 @@ class MasterController extends BaseController - $data['doc_list'] = $this->ClientDocsModel->getDocs(); - + $data['doc_list'] = $this->ClientDocsModel->select('client_docs.* , services.service_name , service_group.group_name , client_branch.name as client_branch_name , client.name as client_name') + ->join('template', 'template.template_id = client_docs.template_id', 'left') + ->join('services', 'services.service_id = template.service_id', 'left') + ->join('service_group', 'service_group.service_group_id = template.service_group_id', 'left') + ->join('client_branch', 'client_branch.id = client_docs.client_branch_id', 'left') + ->join('client', 'client.client_id = client_branch.client_id', 'left') + ->findAll(); + $data['clientdata'] = $this->ClientBranchModel->select('client.name as client_name , client_branch.name as client_branch_name , client_branch.id as client_branch_id') ->join('client', 'client_branch.client_id = client.client_id', 'left') ->where('client.business_id',$this->session->get('logged_in_staff_business_id')) diff --git a/app/Views/share_docs.php b/app/Views/share_docs.php index a4a0eca..eb57c63 100644 --- a/app/Views/share_docs.php +++ b/app/Views/share_docs.php @@ -24,7 +24,6 @@
| Service | +Client Name | +Client Branch Name | +Service Group | +Service Name | Document Name | Doc Status | Action | @@ -58,8 +60,11 @@ $value) { ?>
|---|---|---|---|---|---|---|---|
| - | + | + | + | + | + |