diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index 4540181f..dda4256f 100755 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -2194,14 +2194,9 @@ function addNewImportPurchaseOrder() $userID = $this->session->userdata ( 'userId' ); //print_r($data['Status']);echo "CON"; $data['AppList'] = $this->purchaseorder_model->getPOList($q); - if($this->DEPCode == FINANCE) - { + $this->loadViews("poapproval_view", $this->global,$data, NULL); - } - else - { - $this->loadViews("access", $this->global, $data, NULL); - } + } @@ -2257,15 +2252,9 @@ function addNewImportPurchaseOrder() $userID = $this->session->userdata ( 'userId' ); //print_r($data['Status']);echo "CON"; $data['AppList'] = $this->purchaseorder_model->getPOList($q); - if($this->DEPCode == MANAGEMENT) - { + $this->loadViews("porelease_view", $this->global,$data, NULL); - } - - else - { - $this->loadViews("access", $this->global, $data, NULL); - } + } diff --git a/application/controllers/user.php b/application/controllers/user.php index 191c2abb..1b210c8d 100755 --- a/application/controllers/user.php +++ b/application/controllers/user.php @@ -1111,9 +1111,12 @@ function attendanceyear($empID ='') $email = $this->input->post('MailID'); $SelectedDepartment = $this->input->post('txtSelectedDepartment'); - - + $comma_separated = explode(':', $SelectedDepartment); + + + + $userInfo = array('email'=>$email,'EmpID'=>$EmpID,'password'=>getHashedPassword($password),'roleId'=>$roleId,'createdBy'=>$this->vendorId,'createdDtm'=>$Createddt); @@ -1122,21 +1125,28 @@ function attendanceyear($empID ='') //die(); - $result = $this->user_model->addNewUser($userInfo); + $result = $this->user_model->addNewUser($userInfo); - + if($SelectedDepartment != '') + { for ($j = 0; $j < count($comma_separated); $j++) { $DeptCode = $comma_separated[$j]; + //echo $DeptCode; + $userdept=array('EmpID'=>$EmpID,'Departmentcode'=>$DeptCode); - $access= $this->user_model->addAccess($userdept); + //print_r($userdept); + + $access= $this->user_model->addAccess($userdept); //echo $access; } - + } + + if($result > 0) { diff --git a/application/views/includes/header.php b/application/views/includes/header.php index 066956fe..6a279025 100755 --- a/application/views/includes/header.php +++ b/application/views/includes/header.php @@ -172,7 +172,11 @@ $(function() { --> - + + + @@ -608,17 +612,20 @@ $(function() { - - if($DEPCode == PURCHASE) - {?> - -
  • +
  • Advance Request
  • - + + AssDep; $check1=1;?> - +