Available budget amouunt issue fixed
This commit is contained in:
parent
5b08fefa6d
commit
efe5e4ded4
@ -235,7 +235,7 @@ function purchaseorderListing($forwhat='')
|
||||
{
|
||||
$subQuery='select BudgetAmount,(select ifnull(sum((Quantity*Rate*ExchangeRate)),0)as TValue from T_PurchaseOrder_LineItem LineItem
|
||||
join T_PurchaseOrder_Master Mast on Mast.PONO=LineItem.PONO where POType=?
|
||||
and CostCenterCode=? and Mast.status not in (?) )as TotalValue from T_CostCenter_Budget Bud where Bud.CostCenterCode=? and BudgetYear=? and BudgetType=?';
|
||||
and CostCenterCode=? and Mast.status not in (?) )as Totalvalue from T_CostCenter_Budget Bud where Bud.CostCenterCode=? and BudgetYear=? and BudgetType=?';
|
||||
$query = $this->db->query($subQuery,array($BudgetType,$CostCode,PO_AMENDED,$CostCode,$Year,$BudgetType));
|
||||
//print_r($this->db->last_query());
|
||||
return $query->result_array();
|
||||
|
||||
@ -328,21 +328,27 @@ ifnull(Po.Quantity,0) as POQTY,sta.StatusName
|
||||
function getRequistItemList($ReqID,$NoArray='')
|
||||
{
|
||||
|
||||
$subQuery = 'select distinct Req.ReqNo, Mat.MaterialCode,Mat.MaterialName,Mat.UOM, Req.Quantity,sum(Po.Quantity) as POQTY,sta.StatusName from T_MaterialMaster Mat
|
||||
/* $subQuery = 'select distinct Req.ReqNo, Mat.MaterialCode,Mat.MaterialName,Mat.UOM, Req.Quantity,sum(Po.Quantity) as POQTY,sta.StatusName from T_MaterialMaster Mat
|
||||
left join T_Requestion_Details Req on Req.MaterialCode = Mat.MaterialCode
|
||||
left join T_PurchaseOrder_LineItem Po on Po.ReqNo = Req.ReqNo and Po.MaterialCode = Req.MaterialCode
|
||||
left join T_Status sta on sta.StatusCode = Req.Status where Req.ReqNo=? group by Po.ReqNo,Req.MaterialCode';
|
||||
|
||||
|
||||
$query = $this->db->query($subQuery, array($ReqID));
|
||||
if($NoArray == '')
|
||||
{
|
||||
return $query->result_array();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $query->result();
|
||||
}
|
||||
$query = $this->db->query($subQuery, array($ReqID)); */
|
||||
|
||||
$result ->next_result();
|
||||
|
||||
if($result->num_rows > 0)
|
||||
{
|
||||
if($NoArray == '')
|
||||
{
|
||||
return $result->result_array();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $result->result();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user