fixed permission issue
This commit is contained in:
parent
25a8f54d5f
commit
257648616f
@ -82,7 +82,7 @@ $route['loanreports'] = 'payslip/loadLoanReport';
|
||||
|
||||
// permission slip//
|
||||
$route['permission'] = 'monthlypay/permissionslip';
|
||||
$route['permissionlist'] = 'monthlypay/addper';
|
||||
$route['permissionlist'] = 'monthlypay/permissionlist';
|
||||
|
||||
|
||||
|
||||
|
||||
@ -409,6 +409,8 @@ class monthlypay extends BaseController
|
||||
|
||||
$EmpID = $this->input->post('emp');
|
||||
$Date =$this->input->post('date');
|
||||
$CUR = date('Y-m-d',strtotime($Date));
|
||||
// print_r($CUR);die;
|
||||
$From = $this->input->post('timepicker1');
|
||||
$To = $this->input->post('timepicker2');
|
||||
$Shift = $this->input->post('shift');
|
||||
@ -419,14 +421,27 @@ class monthlypay extends BaseController
|
||||
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$Createdtime = $dt->format('Y-m-d H:i:s');
|
||||
|
||||
$Permissiondata = array('EmpID'=>$EmpID,'Date'=>$Date,'From'=>$From,'To'=>$To,'Shift'=>$Shift,'Permission'=>$Permission,'Reason'=>$Reason,'Createby'=>$Createdby,'Createdtime'=>$Createdtime);
|
||||
//print_r($Permissiondata);die;
|
||||
if(!empty($EmpID)){
|
||||
$Permissiondata = array('EmpID'=>$EmpID,'Date'=>$CUR,'From'=>$From,'To'=>$To,'Shift'=>$Shift,'Permission'=>$Permission,'Reason'=>$Reason,'Createby'=>$Createdby,'Createdtime'=>$Createdtime); }
|
||||
//print_r($Permissiondata);exit;
|
||||
|
||||
|
||||
$result = $this->monthlypay_model->addper($Permissiondata);
|
||||
// print_r($result);die;
|
||||
if(!empty($result)){
|
||||
echo "<script type='text/javascript'>alert('Successfully Created Permission Form');
|
||||
window.location = 'Permissionlist';
|
||||
</script>";
|
||||
|
||||
}else{
|
||||
echo "<script type='text/javascript'>alert('Not Created Permission Form');
|
||||
window.location = 'Permission';
|
||||
|
||||
</script>";
|
||||
//redirect('permission');
|
||||
}
|
||||
|
||||
|
||||
redirect('monthlypay/permissionlist');
|
||||
|
||||
|
||||
|
||||
@ -470,6 +485,7 @@ class monthlypay extends BaseController
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@ -272,10 +272,18 @@ join T_DepartmentDetails as Dep on Dep.DEPCode=Emp.Departmentcode where Emp.IsA
|
||||
function addper($Permissiondata)
|
||||
{
|
||||
|
||||
//print_r($Permissiondata);die;
|
||||
$this->db->insert('T_Permission',$Permissiondata);
|
||||
$reuslt = $this->db->insert_id();
|
||||
return $reuslt;
|
||||
|
||||
//if(!empty($Permissiondata){
|
||||
$this->db->trans_start();
|
||||
$this->db->insert('T_Permission', $Permissiondata);
|
||||
|
||||
//$Asset_Code = $this->db->insert_id();
|
||||
$Permission = $this->db->affected_rows();
|
||||
|
||||
$this->db->trans_complete();
|
||||
|
||||
return $Permission;
|
||||
|
||||
}
|
||||
|
||||
function perlist()
|
||||
@ -302,5 +310,6 @@ join T_DepartmentDetails as Dep on Dep.DEPCode=Emp.Departmentcode where Emp.IsA
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user