Requistion Flow
This commit is contained in:
parent
3f7df8d6ab
commit
0510719349
@ -29,9 +29,15 @@ class requisitionform extends BaseController
|
|||||||
*/
|
*/
|
||||||
function requisitionlisting()
|
function requisitionlisting()
|
||||||
{
|
{
|
||||||
$this->global['pageTitle'] = 'Siddharth : Requisition Listing';
|
$this->global['pageTitle'] = 'Siddharth : Requisition Listing';
|
||||||
|
|
||||||
|
$userID = $this->session->userdata ( 'userId' );
|
||||||
|
|
||||||
|
$data['ReqList'] = $this->requistion_model->getRequistListUserID($userID);
|
||||||
|
$data['Status'] = $this->requistion_model->CheckDraftStatus($userID);
|
||||||
|
|
||||||
|
|
||||||
$this->loadViews("requisitionlisting", $this->global, NULL);
|
$this->loadViews("requisitionlisting", $this->global, $data, NULL);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* This function used to load the first screen of the requisition Form
|
* This function used to load the first screen of the requisition Form
|
||||||
@ -45,8 +51,11 @@ class requisitionform extends BaseController
|
|||||||
|
|
||||||
$data['EmpList'] = $this->requistion_model->getAllEmployees();
|
$data['EmpList'] = $this->requistion_model->getAllEmployees();
|
||||||
|
|
||||||
// $data['MaterialList'] = $this->requistion_model->getRawMaterialList();
|
$userID = $this->session->userdata ( 'userId' );
|
||||||
|
|
||||||
|
$data['Emp'] = $this->requistion_model->getEmpIdByUserID($userID);
|
||||||
|
|
||||||
|
$data['CostCenter'] = $this->requistion_model->getCostCenterUserID($userID);
|
||||||
|
|
||||||
$this->loadViews("requisitionform", $this->global, $data,null);
|
$this->loadViews("requisitionform", $this->global, $data,null);
|
||||||
}
|
}
|
||||||
@ -173,16 +182,29 @@ class requisitionform extends BaseController
|
|||||||
//echo count($comma_separated);
|
//echo count($comma_separated);
|
||||||
|
|
||||||
//echo $RowCount. " Status:". $Status;
|
//echo $RowCount. " Status:". $Status;
|
||||||
$Request = array('ReqType'=>$RequestType, 'Requestedby'=>$Requestedby,'ReqDate'=>$createddt,'Status'=>$Status,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy);
|
|
||||||
|
$IsExists = $this->requistion_model->RequistionIsExists($Requestedby);
|
||||||
$Req = $this->requistion_model->addRequistion($Request);
|
if(count( $IsExists) == 0)
|
||||||
|
{
|
||||||
|
$Request = array('ReqType'=>$RequestType, 'Requestedby'=>$Requestedby,'ReqDate'=>$createddt,'Status'=>$Status,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy);
|
||||||
|
|
||||||
|
$Req = $this->requistion_model->addRequistion($Request);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$Request = array('ReqType'=>$RequestType, 'Requestedby'=>$Requestedby,'ReqDate'=>$createddt,'Status'=>$Status,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy);
|
||||||
|
$UpdateReq = $this->requistion_model->UpdateRequistion($Request,$IsExists[0]['ReqNo']);
|
||||||
|
}
|
||||||
$ReqNumber = '';
|
$ReqNumber = '';
|
||||||
if(count($Req)>0)
|
if(count($Req)>0)
|
||||||
{
|
{
|
||||||
$ReqNumber = $Req[0]['ReqNo'];
|
$ReqNumber = $Req[0]['ReqNo'];
|
||||||
}
|
}
|
||||||
//print_r($comma_separated);
|
else
|
||||||
// $ReqNumber = 'REQ0001';
|
{
|
||||||
|
$ReqNumber = $IsExists[0]['ReqNo'];
|
||||||
|
}
|
||||||
|
|
||||||
$SkipInsert = False;
|
$SkipInsert = False;
|
||||||
for ($i = 1; $i <= $RowCount; $i++)
|
for ($i = 1; $i <= $RowCount; $i++)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user