Requistion Form Issue Fixed

This commit is contained in:
gandhimathi Bharathirajan 2017-06-19 17:54:12 +05:30
parent 0655e453be
commit 709650a071

View File

@ -35,7 +35,7 @@ class requistion_model extends CI_Model
function getEditRequistItemList($ReqNo)
{
$result = $this->db-> query("CALL P_GET_REQUISTITEMLIST('".$ReqNo."')") or die(mysql_error());
/* $result = $this->db-> query("CALL P_GET_REQUISTITEMLIST('".$ReqNo."')") or die(mysql_error());
//echo 'REQUISTITEMLIST Line item view successfully';
@ -50,7 +50,16 @@ class requistion_model extends CI_Model
return $result->result();
}
*/
$subQuery ='select distinct Req.ReqNo, Mat.MaterialCode,Mat.MaterialName,Mat.UOM, Req.Quantity,if (Po.Quantity is null,0,Po.Quantity) as POQTY,sta.StatusName from T_MaterialMaster Mat join T_Requestion_Details Req on Req.MaterialCode = Mat.MaterialCode
left join T_PurchaseOrder_LineItem Po on Po.ReqNo = Req.ReqNo
left join T_Status sta on sta.StatusCode = Req.Status
where Req.ReqNo = ?';
$query = $this->db->query($subQuery, array($ReqNo));
// print_r($this->db->last_query());
return $query->result();
}