CHANGE_SHARE_DOCS_CREATE_FIRST_CHECK_BUSINESS : AADHAVAN
This commit is contained in:
parent
abfd39da1d
commit
ffaa98cb00
@ -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)
|
||||
{
|
||||
|
||||
@ -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'];
|
||||
|
||||
@ -384,19 +384,6 @@
|
||||
|
||||
function submitClient(params, event) {
|
||||
event.preventDefault();
|
||||
<?php
|
||||
$session = \Config\Services::session(); ?>
|
||||
var business_session = <?php echo $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(),
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
<h4 class="page-title">Share Documents</h4>
|
||||
|
||||
<div class="page-title-right">
|
||||
<a href="javascript:void(0);" id="share_docs_add" data-toggle="modal" data-target="#bs-example-modal-lg" class="btn btn-primary waves-effect waves-light">Share Docs </a>
|
||||
<a href="javascript:void(0);" id="share_docs_add" class="btn btn-primary waves-effect waves-light">Share Docs </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -332,7 +332,16 @@
|
||||
|
||||
<script>
|
||||
|
||||
$('#share_docs_add').click(function () {
|
||||
var business_id = <?php echo $_SESSION['logged_in_staff_business_id'] ?>;
|
||||
|
||||
if(business_id == 0){
|
||||
toastr.warning('Select a Business', 'Warning');
|
||||
}else{
|
||||
$('#bs-example-modal-lg').modal('show');
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
function fetchDataAndRedirect(selectedOption) {
|
||||
// var selectedOption = $('#add_30days_old_dispatched_data').val();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user