Requistion Fixes by Raja"
This commit is contained in:
parent
a68e5c43b8
commit
943124e68f
@ -99,10 +99,27 @@ class purchaseorder_model extends CI_Model
|
||||
{
|
||||
return $result->result();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
This Function to get the List of Requistion which require to create PO
|
||||
*/
|
||||
function getAllRequistionListToCreatePO()
|
||||
{
|
||||
$result = $this->db-> query("CALL P_PURCHASEORDER_DETAILS()") or die(mysql_error());
|
||||
|
||||
$result ->next_result();
|
||||
|
||||
|
||||
if ($result->num_rows > 0)
|
||||
{
|
||||
|
||||
return $result->result();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to get the Raw Material information
|
||||
* @return array $result : This is result of the query
|
||||
@ -632,7 +649,7 @@ class purchaseorder_model extends CI_Model
|
||||
function getRequistionListbySearch($Depid='',$Status='',$FromDate='',$ToDate='')
|
||||
{
|
||||
$subQuery =' SELECT ReqNo,ReqType,Requestedby,EMP.FirstName,EMP.Designation,STAT.StatusCode ,STAT.StatusName,ReqDate,DEPT.DEPCode,DEPT.DepartmentName FROM T_Requestion_Master REQ
|
||||
JOI T_Employee_Details EMP ON REQ.Requestedby = EMP.EmpID
|
||||
JOIN T_Employee_Details EMP ON REQ.Requestedby = EMP.EmpID
|
||||
JOIN T_DepartmentDetails DEPT ON EMP.Departmentcode = DEPT.DEPCode
|
||||
JOIN T_Status STAT on REQ.Status = STAT.StatusCode
|
||||
where REQ.Status NOT IN (?,?,?,?,?)';
|
||||
@ -642,7 +659,7 @@ class purchaseorder_model extends CI_Model
|
||||
if($Depid != '' && $Status != '' && $FromDate != '' && $ToDate != '')
|
||||
{
|
||||
$appendQuery .= ' AND DEPT.DEPCode=? AND STAT.StatusCode=? AND ReqDate >= ? AND ReqDate <= ?';
|
||||
echo "$appendQuery";die();
|
||||
//echo "$appendQuery";die();
|
||||
$query = $this->db->query($appendQuery,array(REQ_DRAFT,REQ_PENDING_APPROVAL,REQ_DELETED,REQ_REJECTED,REQ_PO_CREATED,$Depid ,$Status,$FromDate,$ToDate));
|
||||
//print_r($this->db->last_query());
|
||||
return $query->result_array();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user