diff --git a/app/Controllers/StaffController.php b/app/Controllers/StaffController.php index cd18ec1..9c52973 100644 --- a/app/Controllers/StaffController.php +++ b/app/Controllers/StaffController.php @@ -184,7 +184,6 @@ class StaffController extends BaseController public function client_list() { if(!$this->session->has('is_staff_logged_in')){ return redirect()->to(base_url().'staff'); } - $business_id = $this->session->get('logged_in_staff_business_id'); $data['clientListForList'] = $this->ClientModel->findAll(); $data['clientList'] = $this->ClientModel->select('client.*, service_group.business_id') ->join('client_branch', 'client_branch.client_id = client.client_id') @@ -241,18 +240,7 @@ class StaffController extends BaseController if($this->request->getmethod() == 'POST') { $clientData = $this->request->getVar(); - // print_r($clientData);die; $clientData['created_by'] = $this->session->get('is_staff_logged_in'); - $clientData['business_id'] = $this->session->get('logged_in_staff_business_id'); - // $business= $this->BranchModel->select('*') - // ->join('business' , 'branches.business_id = business.business_id', 'left') - // ->where('branches.branch_id ',$clientData['branch_id']) - // ->first(); - // $business= $this->BusinessModel->select('*') - // ->where('business_id ',$clientData['business_id']) - // ->first(); - // $clientData['business_id'] = $business['business_id']; - // $insert = $this->ClientModel->save($clientData); $insert = $this->ClientModel->insert($clientData); if($insert) { diff --git a/app/Models/ClientModel.php b/app/Models/ClientModel.php index 0786407..8a9e53f 100644 --- a/app/Models/ClientModel.php +++ b/app/Models/ClientModel.php @@ -7,7 +7,7 @@ class ClientModel extends Model protected $table = 'client'; protected $primaryKey = 'client_id'; - protected $allowedFields = [ 'business_id','branch_id', 'name','pan_no', 'mobile_no' , 'individual', 'email' , 'is_active' ,'created_by','updated_by']; + protected $allowedFields = [ 'branch_id', 'name','pan_no', 'mobile_no' , 'individual', 'email' , 'is_active' ,'created_by','updated_by']; protected $beforeInsert = ['beforeInsert']; protected $beforeUpdate = ['beforeUpdate']; diff --git a/app/Views/client_list.php b/app/Views/client_list.php index c656a3a..26d1b8a 100644 --- a/app/Views/client_list.php +++ b/app/Views/client_list.php @@ -384,19 +384,6 @@ function submitClient(params, event) { event.preventDefault(); - - var business_session = get('logged_in_staff_business_id') ?>; - - if (business_session && business_session !== "") { - - } else { - - // toastr.waring('Select Business First'); - - return; - } - var formData = { pan_no: $('#pan_no').val(), diff --git a/app/Views/share_docs.php b/app/Views/share_docs.php index 52c0d64..7c886da 100644 --- a/app/Views/share_docs.php +++ b/app/Views/share_docs.php @@ -32,7 +32,7 @@