access control
This commit is contained in:
parent
2fdbcd6b36
commit
e8aadd1635
@ -45,9 +45,18 @@ class CostCenter extends BaseController
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Cost List';
|
||||
|
||||
if($this->DEPCode == FINANCE )
|
||||
{
|
||||
|
||||
$this->loadViews("costListing", $this->global, $data, NULL);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -176,9 +185,17 @@ class CostCenter extends BaseController
|
||||
//print_r(count($data['BudType']));
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Cost';
|
||||
|
||||
if($this->DEPCode == FINANCE )
|
||||
{
|
||||
|
||||
$this->loadViews("editOldcost", $this->global, $data,NULL);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data,NULL);
|
||||
}
|
||||
}
|
||||
|
||||
function GetBudgetForYear()
|
||||
@ -238,6 +255,9 @@ class CostCenter extends BaseController
|
||||
function editcost()
|
||||
{
|
||||
|
||||
|
||||
if($this->DEPCode == FINANCE )
|
||||
{
|
||||
$this->form_validation->set_rules('CostCode','CostCode','trim|required');
|
||||
$this->form_validation->set_rules('CostName','CostName','trim|required');
|
||||
|
||||
@ -322,6 +342,17 @@ class CostCenter extends BaseController
|
||||
echo('Successfully Updated Cost details');
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
//$this->loadViews("access");
|
||||
$this->load->view('access');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -92,8 +92,17 @@ class MRIRcontroller extends BaseController
|
||||
$this->global['pageTitle'] = 'Siddharth : Billing ';
|
||||
$data['Billing'] = $this->mrir_model->view_mrir_Billing();
|
||||
|
||||
if($this->DEPCode == FINANCE)
|
||||
{
|
||||
|
||||
$this->loadViews("viewmrirforbilling", $this->global,$data , NULL);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global,$data , NULL);
|
||||
}
|
||||
|
||||
}
|
||||
public function viewmMaterialDistributionList()
|
||||
{
|
||||
@ -101,8 +110,17 @@ public function viewmMaterialDistributionList()
|
||||
|
||||
$data['Distribution'] = $this->mrir_model->ViewDistributionList();
|
||||
$data['status'] = $this->mrir_model->getStatus();
|
||||
|
||||
if($this->DEPCode == STORE)
|
||||
{
|
||||
|
||||
$this->loadViews("MaterialIssueList", $this->global,$data , NULL);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global,$data , NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -125,9 +143,23 @@ public function viewmMaterialDistributionList()
|
||||
$this->global['pageTitle'] = 'Siddharth : View Inward Gate Register';
|
||||
|
||||
$data['IGR']= $this->mrir_model->ViewigrListing();
|
||||
|
||||
|
||||
|
||||
if($this->DEPCode == STORE || $this->DEPCode == QUALITY)
|
||||
{
|
||||
|
||||
$this->loadViews("viewinwardgateregister",$this->global,$data,NULL);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access",$this->global,$data,NULL);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* For View MRIR Screen (view folder - view page)*/
|
||||
function viewmaterialinspectionreport()
|
||||
@ -140,7 +172,17 @@ public function viewmMaterialDistributionList()
|
||||
//old name:mrirdatas2
|
||||
$this->global['pageTitle'] = 'Siddharth : View Material Inspection Report';
|
||||
//print_r( $data);
|
||||
|
||||
if($this->DEPCode == STORE || $this->DEPCode == QUALITY)
|
||||
{
|
||||
$this->loadViews("viewmaterialinspectionreport", $this->global,$data,NULL);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global,$data,NULL);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -70,8 +70,19 @@ class emergencypurchaseorder extends BaseController
|
||||
$data['WorkStatus']=$this->purchaseorder_model->getStatus(7);
|
||||
$data['ServiceOption'] = $this->requistion_model->getConfigValue('C022');
|
||||
$data['PoTypeOptions'] = $this->purchaseorder_model->getConfigValue('C026');
|
||||
|
||||
|
||||
if($this->DEPCode == PURCHASE )
|
||||
{
|
||||
$this->loadViews("alterpurchaseorder", $this->global, $data, Null);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, Null);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* this function used for get all material code using request type
|
||||
@ -859,8 +870,18 @@ $RequestedBy = $this->input->post('drpDepartment');
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Purchase Orders';
|
||||
|
||||
if($this->DEPCode == PURCHASE )
|
||||
{
|
||||
|
||||
$this->loadViews("POlist", $this->global, $data, NULL);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
|
||||
}
|
||||
}
|
||||
function Req_validate($selectValue)
|
||||
{
|
||||
|
||||
@ -43,8 +43,23 @@ class employeedetails extends BaseController
|
||||
$data['userRecords'] = $this->employeedetails_model->employeeListing();
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Employee Listing';
|
||||
|
||||
if($this->role == ROLE_ADMIN || $this->DEPCode == HR)
|
||||
{
|
||||
|
||||
if($this->DEPCode != HR)
|
||||
{
|
||||
|
||||
$this->loadViews("employeeListing", $this->global, $data, NULL);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
@ -385,7 +400,21 @@ echo "<script>alert('Record Not Saved!');</script>";redirect('employeeListing','
|
||||
|
||||
$data['Department'] = $this->employeedetails_model->getDepartment();
|
||||
$this->global['pageTitle'] = 'Siddharth : Add New Employee';
|
||||
|
||||
if($this->role == ROLE_ADMIN || $this->DEPCode == HR)
|
||||
{
|
||||
|
||||
if($this->DEPCode != HR)
|
||||
{
|
||||
$this->loadViews("addemployee", $this->global, $data, NULL);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
|
||||
@ -40,8 +40,19 @@ class inwardgateregister extends BaseController
|
||||
$this->load->model('inwardgateregister_model');
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Gate Register Details';
|
||||
$data['IGR']= $this->inwardgateregister_model->igrListing();
|
||||
|
||||
if($this->Designation == SECURITY)
|
||||
{
|
||||
|
||||
$this->loadViews("viewIGRDetails",$this->global,$data,NULL);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access",$this->global,$data,NULL);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function addinwardgateregister()
|
||||
@ -53,8 +64,17 @@ class inwardgateregister extends BaseController
|
||||
|
||||
$data['PO_NO'] = $this->inwardgateregister_model->getpurchaseorder();
|
||||
//print_r($data['PO_NO']);
|
||||
|
||||
if($this->Designation == SECURITY)
|
||||
{
|
||||
|
||||
$this->loadViews("inwardgateregister", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
function getDateformat($Val)
|
||||
|
||||
@ -50,7 +50,16 @@ class purchaseorder extends BaseController
|
||||
$data['PONO']=$this->purchaseorder_model->getadvancePONO('ST026');
|
||||
//print_r($data['PONO']);
|
||||
|
||||
|
||||
if($this->DEPCode == PURCHASE)
|
||||
{
|
||||
$this->loadViews("advancerequest", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
}
|
||||
function requisition()
|
||||
{
|
||||
@ -64,8 +73,18 @@ class purchaseorder extends BaseController
|
||||
$data['ReqList'] = $this->purchaseorder_model->getAllRequistionListToCreatePO();
|
||||
/* End Here */
|
||||
$this->global['pageTitle'] = 'Siddharth : Create PO from Requisition List';
|
||||
|
||||
if($this->DEPCode== PURCHASE)
|
||||
{
|
||||
|
||||
$this->loadViews("createPOfromRequistion", $this->global, $data,Null);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data,Null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -86,10 +105,21 @@ class purchaseorder extends BaseController
|
||||
$data['POData'] = $this->purchaseorder_model->purchaseorderListing();
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Purchase Orders';
|
||||
|
||||
if($this->DEPCode == PURCHASE )
|
||||
{
|
||||
|
||||
$this->loadViews("POlist", $this->global, $data, NULL);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Req_validate($selectValue)
|
||||
{
|
||||
//echo 'select_validate method called';
|
||||
@ -110,7 +140,11 @@ class purchaseorder extends BaseController
|
||||
*/
|
||||
function CreatePurchaseOrder()
|
||||
{
|
||||
|
||||
|
||||
// if( $DEPCode == PURCHASE)
|
||||
// {
|
||||
|
||||
|
||||
$this->form_validation->set_rules('txtReqNo', 'txtReqNo', 'callback_Req_validate');
|
||||
|
||||
if($this->form_validation->run() == FALSE)
|
||||
@ -260,7 +294,12 @@ class purchaseorder extends BaseController
|
||||
}
|
||||
$this->loadViews($ViewName, $this->global,$data, NULL);
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function CreatePOPrint()
|
||||
{
|
||||
$PONO = $_GET['PONO'];
|
||||
|
||||
@ -39,7 +39,19 @@ class requisitionform extends BaseController
|
||||
$data['TotNoOfLine'] =$this->requistion_model->getRequistionList($userID);
|
||||
|
||||
|
||||
if (($this->role == ROLE_MANAGER || $this->role == ROLE_EMPLOYEE || $this->role == ROLE_ADMIN ) && $this->Designation != SECURITY)
|
||||
{
|
||||
|
||||
$this->loadViews("requisitionlisting", $this->global, $data, NULL);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* This function used to load the first screen of the requisition Form
|
||||
@ -75,9 +87,17 @@ class requisitionform extends BaseController
|
||||
|
||||
$data['AppList'] = $this->requistion_model->getApproverRequistList($userID);
|
||||
|
||||
|
||||
if($this->role == ROLE_MANAGER )
|
||||
{
|
||||
|
||||
$this->loadViews("requisitionlistapproval", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -35,8 +35,19 @@ class servicepurchaseorder extends BaseController
|
||||
$data["Billing"] = $this->purchaseorder_model->GetServicePOListforBilling();
|
||||
|
||||
//print_r($data["Billing"]);
|
||||
|
||||
if($this->DEPCode == FINANCE)
|
||||
{
|
||||
|
||||
$this->loadViews("serviceporeport", $this->global,$data,null);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global,$data,null);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -51,9 +51,18 @@ class storerequisitionlist extends BaseController
|
||||
$this->global['pageTitle'] = 'Siddharth : StoreRequisition Listing';
|
||||
$userId= $this->session->userdata ('userId');
|
||||
$data['Store'] = $this->storerequistion_model->Storeall($userId);
|
||||
if ($this->Designation != SECURITY && $this->DEPCode != HR )
|
||||
{
|
||||
|
||||
$this->loadViews("storerequisition", $this->global,$data,null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global,$data,null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function used to load the Delete the StoreRequistion Items
|
||||
@ -75,6 +84,9 @@ class storerequisitionlist extends BaseController
|
||||
/* The Function Edit Store Requistion list */
|
||||
function EditStoreRequistion()
|
||||
{
|
||||
|
||||
if ($this->Designation != SECURITY && $this->DEPCode != HR )
|
||||
{
|
||||
$StoreReqNo = $_GET['StoreReqNo'];
|
||||
|
||||
//$StoreReqNo= $this->input->post('id');
|
||||
@ -90,7 +102,13 @@ class storerequisitionlist extends BaseController
|
||||
$data['LineItem']=$this ->storerequistion_model->editstorerequistions($StoreReqNo);
|
||||
|
||||
$this->loadViews("editstorerequisition", $this->global,$data,null);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->load->view('access');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -197,8 +215,15 @@ class storerequisitionlist extends BaseController
|
||||
$data['Status']= $this->storerequistion_model->getStatus();
|
||||
$data['TotNoOfLine']=$this->storerequistion_model->getRequistionList();
|
||||
//print_r($data['TotNoOfLine']);
|
||||
$this->loadViews("storerequisitionlisting", $this->global,$data,null);
|
||||
if ( $this->Designation != SECURITY && $this->DEPCode != HR )
|
||||
{
|
||||
$this->loadViews("storerequisitionlisting", $this->global,$data,null);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global,$data,null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -214,8 +239,16 @@ class storerequisitionlist extends BaseController
|
||||
$data['ReqItem'] = $this->storerequistion_model->getRequistItemList($StoreReqNo);
|
||||
$data['ReqListDetails'] = $this->storerequistion_model->getRequistDetails($StoreReqNo);
|
||||
//print_r($data['ReqItem']);
|
||||
|
||||
if($this->DEPCode == STORE)
|
||||
{
|
||||
$this->loadViews("issueStoreRequistion", $this->global,$data,null);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global,$data,null);
|
||||
}
|
||||
}
|
||||
|
||||
function UpdateIssueRequistion()
|
||||
@ -360,10 +393,19 @@ class storerequisitionlist extends BaseController
|
||||
$data['AppList'] = $this->storerequistion_model->getApproverRequistList($userID);
|
||||
//print_r($data['AppList']);
|
||||
$this->global['pageTitle'] = 'Siddharth : ApprovalStoreRequisitionSlip';
|
||||
$data['Status']= $this->storerequistion_model->getStatus();
|
||||
$data['Status']= $this->storerequistion_model->getStatus();
|
||||
|
||||
if ($this->Designation != SECURITY && $this->DEPCode != HR )
|
||||
{
|
||||
|
||||
$this->loadViews("approvalstorerequisitionslip", $this->global, $data, NULL);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/*Approve Completed*/
|
||||
|
||||
@ -51,8 +51,16 @@ class storestatus extends BaseController
|
||||
// print_r($data['Stock']);
|
||||
$data['MaterialList'] = $this->store_model->GetAllMaterialList();
|
||||
$data['StockStatus'] = $this->store_model->GetConfigValue('C021');
|
||||
|
||||
if($this->DEPCode == STORE)
|
||||
{
|
||||
$this->loadViews("storestatus", $this->global, $data,null);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data,null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -44,9 +44,22 @@ class supplier extends BaseController
|
||||
$data['userRecords'] = $this->supplier_model->supplierListing();
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth Industries : Supplier Listing';
|
||||
|
||||
if($this->role == ROLE_ADMIN || $this->DEPCode == SALES || $this->DEPCode == FINANCE ||$this->DEPCode == HR)
|
||||
{
|
||||
|
||||
if($this->DEPCode != FINANCE && $this->DEPCode != HR)
|
||||
{
|
||||
|
||||
$this->loadViews("supplierListing", $this->global, $data, NULL);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* This function is used to load the add new supplier */
|
||||
@ -59,8 +72,21 @@ class supplier extends BaseController
|
||||
|
||||
$this->global['pageTitle'] = 'siddharth : Add New Supplier';
|
||||
|
||||
|
||||
if($this->role == ROLE_ADMIN || $this->DEPCode == SALES || $this->DEPCode == FINANCE ||$this->DEPCode == HR)
|
||||
{
|
||||
|
||||
if($this->DEPCode != FINANCE && $this->DEPCode != HR)
|
||||
{
|
||||
$this->loadViews("addsupplier", $this->global,$data, NULL);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global,$data, NULL);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* This function is used to check whether PAN already exist or not
|
||||
|
||||
Loading…
Reference in New Issue
Block a user