Requisition Form Fixes : ps
This commit is contained in:
parent
2c830802fc
commit
22f0df4cf1
@ -29,6 +29,7 @@ class requisitionform extends BaseController
|
||||
*/
|
||||
function requisitionlisting()
|
||||
{
|
||||
log_message('error'," Requisition Listing Fns Called");
|
||||
$this->global['pageTitle'] = 'Siddharth : Requisition Listing';
|
||||
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
@ -38,9 +39,9 @@ class requisitionform extends BaseController
|
||||
|
||||
$data['TotNoOfLine'] =$this->requistion_model->getRequistionList($userID);
|
||||
|
||||
|
||||
// print_r($data['TotNoOfLine']);
|
||||
|
||||
$this->loadViews("requisitionlisting", $this->global, $data, NULL);
|
||||
$this->loadViews("requisitionlisting", $this->global, $data, NULL);
|
||||
|
||||
|
||||
|
||||
@ -51,6 +52,7 @@ class requisitionform extends BaseController
|
||||
|
||||
function requisition()
|
||||
{
|
||||
log_message('error'," Raise Requisition Fns Called");
|
||||
$this->global['pageTitle'] = 'Siddharth : Raise Requisition';
|
||||
|
||||
$data['RequestType'] = $this->requistion_model->getConfigValue('C020');
|
||||
@ -58,6 +60,7 @@ class requisitionform extends BaseController
|
||||
$data['EmpList'] = $this->requistion_model->getAllEmployees();
|
||||
$data['ServiceOption'] = $this->requistion_model->getConfigValue('C022');
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
log_message('error'," Raise Requisition userId ".$userID);
|
||||
|
||||
$data['Emp'] = $this->requistion_model->getEmpIdByUserID($userID);
|
||||
|
||||
@ -352,6 +355,7 @@ class requisitionform extends BaseController
|
||||
function addNewRequistion()
|
||||
{
|
||||
|
||||
log_message('error'," add new Requisition Fns Called");
|
||||
$this->form_validation->set_rules('RequestType','RequestType','trim|required');
|
||||
$this->form_validation->set_rules('EmpID','EmpID','trim|required');
|
||||
|
||||
@ -361,9 +365,11 @@ class requisitionform extends BaseController
|
||||
}
|
||||
else
|
||||
{
|
||||
$Status= $_GET['ID'];
|
||||
log_message('error'," add new Requisition (Code of REQ_DRAFT) GET[ID] ".$_GET['ID']);REQ_DRAFT
|
||||
$Status= $_GET['ID'];
|
||||
$RequestType = strtoupper(trim($this->input->post('RequestType')));
|
||||
$Requestedby = strtoupper(trim($this->input->post('EmpID')));
|
||||
log_message('error'," add new Requisition empid ".$Requestedby);
|
||||
$RequestedbyDept = $this->session->userdata ( 'DEPCode' );
|
||||
$CostCenter = $this->input->post('CostCenter');
|
||||
$CreateBy = $this->session->userdata ( 'userId' );
|
||||
|
||||
@ -359,21 +359,18 @@ ifnull(Po.Quantity,0) as POQTY,sta.StatusName
|
||||
*/
|
||||
function addRequistion($Requistion)
|
||||
{
|
||||
// $this->db->trans_start();
|
||||
// $this->db->insert('T_Requestion_Master', $Requistion);
|
||||
// $insert_id = $this->db->affected_rows();
|
||||
// $this->db->trans_complete();
|
||||
$insert_id = 1;
|
||||
$this->db->trans_start();
|
||||
$this->db->insert('T_Requestion_Master', $Requistion);
|
||||
$insert_id = $this->db->affected_rows();
|
||||
$this->db->trans_complete();
|
||||
log_message('error','add new Requisition affected rows = '.$insert_id);
|
||||
if($insert_id>0)
|
||||
{
|
||||
// $subQuery = 'select max(ReqNo) as ReqNo from T_Requestion_Master';
|
||||
$subQuery = 'select ReqNo from T_Requestion_Master order by CreatedDate desc limit 1';
|
||||
|
||||
$query = $this->db->query($subQuery);
|
||||
|
||||
return $query->result_array();
|
||||
// $subQuery = 'select max(ReqNo) as ReqNo from T_Requestion_Master';
|
||||
$subQuery = 'select ReqNo from T_Requestion_Master order by CreatedDate desc limit 1';
|
||||
$query = $this->db->query($subQuery);
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* This function is used to check the Request is in Draft status
|
||||
|
||||
Loading…
Reference in New Issue
Block a user