emergency po changes done

This commit is contained in:
gandhimathi 2017-10-31 18:01:26 +05:30
parent dd541cb6a8
commit 9004629e13
2 changed files with 24 additions and 5 deletions

View File

@ -116,7 +116,7 @@ class emergencypurchaseorder extends BaseController
$POStatus = $this->input->post('TextStatus');
$CreateBy = $this->session->userdata ('userId');
$RequestedBy = $this->session->userdata ('EmpID');
$RequestedBy = $this->input->post('drpDepartment');
$ReqStatus = REQITEM_Emergency_PO_CREATED;
@ -148,8 +148,13 @@ class emergencypurchaseorder extends BaseController
$ServiceTypeOptions=$this->input->post('PoTypeOptions');
$DescriptionOfPo = $this->input->post('emergdescofpo');
$RequestedBy=$this->purchaseorder_model->getDepartmentEmpList($RequestedBy);
foreach($RequestedBy[0] as $key => $value){
$RequestedBy=$value;
}
//create T_Requestion_Master
$Request = array('ReqType'=>$POType, 'Requestedby'=>$RequestedBy,'CostCenterCode'=>$CostCenterName,'Status'=>$ReqStatus,'Comments'=>$RequistionComments,'ReqDate'=>$createddt,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy,'Schedule_Type'=>$ServiceScheduleType,'NumberOfService'=>$ServiceServiceNo,'Service_Period'=>$ServiceScheduleOptions);
$Request = array('ReqType'=>$POType, 'Requestedby'=>$RequestedBy,'CostCenterCode'=>$CostCenterName,'Status'=>$ReqStatus,'Comments'=>$RequistionComments,'ReqDate'=>$createddt,'CreatedDate'=>$createddt,'CreatedBy'=>$RequestedBy,'Schedule_Type'=>$ServiceScheduleType,'NumberOfService'=>$ServiceServiceNo,'Service_Period'=>$ServiceScheduleOptions);
$Req = $this->requistion_model->addRequistion($Request);
@ -308,12 +313,12 @@ class emergencypurchaseorder extends BaseController
$RequistionComments = "Created Emergency Revenue PO";
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
$POStatus = $this->input->post('TextStatus');
$RequestedBy = $this->input->post('drpDepartment');
$CreateBy = $this->session->userdata ( 'userId' );
$RowCount = $this->input->post('TextRowCount');
//echo $RowCount;
$DeletedRow = $this->input->post('TextDeletedRowCount');
$RequestedBy = $this->session->userdata ('EmpID');
$ReqStatus = REQITEM_Emergency_PO_CREATED;
$Local_Interstate=$this->input->post('Range');
@ -324,7 +329,10 @@ class emergencypurchaseorder extends BaseController
$PaymentTerms=$this->input->post('PaymentMethod');
$OtherPayment=$this->input->post('Otherpayment');
$RequestedBy=$this->purchaseorder_model->getDepartmentEmpList($RequestedBy);
foreach($RequestedBy[0] as $key => $value){
$RequestedBy=$value;
}
//add requistion
$Request = array('ReqType'=>$POType, 'Requestedby'=>$RequestedBy,'CostCenterCode'=>$CostCenterName,'Status'=>$ReqStatus,'Comments'=>$RequistionComments,'ReqDate'=>$createddt,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy);
@ -1139,3 +1147,4 @@ class emergencypurchaseorder extends BaseController
?>

View File

@ -1660,4 +1660,14 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
return $query->result();
}
//get Dept Emp Name
function getDepartmentEmpList($DepCode=''){
$this->db->select('EmpID');
$this->db->from('T_Employee_Details');
$this->db->where('Departmentcode', $DepCode);
$this->db->limit('1');
$query = $this->db->get();
return $query->result();
}
}