budget amount issue fix
This commit is contained in:
parent
0293bf3e03
commit
ae1e294c7e
@ -122,7 +122,6 @@ class requisitionform extends BaseController
|
|||||||
$data['ServiceOption'] = $this->requistion_model->getConfigValue('C022');
|
$data['ServiceOption'] = $this->requistion_model->getConfigValue('C022');
|
||||||
$this->loadViews("editrequisitionform", $this->global, $data, NULL);
|
$this->loadViews("editrequisitionform", $this->global, $data, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function used to load the Delete the Requistion Items
|
* This function used to load the Delete the Requistion Items
|
||||||
*/
|
*/
|
||||||
@ -573,6 +572,7 @@ class requisitionform extends BaseController
|
|||||||
$ReqPOType = '';
|
$ReqPOType = '';
|
||||||
if(count($POType) > 0)
|
if(count($POType) > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
for($i=0;$i<count($POType);$i++)
|
for($i=0;$i<count($POType);$i++)
|
||||||
{
|
{
|
||||||
if($POType[$i]['POType'] == $ReqType)
|
if($POType[$i]['POType'] == $ReqType)
|
||||||
@ -586,24 +586,47 @@ class requisitionform extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$RequestType='';
|
$RequestType='';
|
||||||
$RequestType= $ReqPOType =='' ? $ReqType:$ReqPOType;
|
$RequestType= $ReqPOType =='' ? $ReqType:$ReqPOType;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$AvlBudget = array();
|
$AvlBudget = array();
|
||||||
|
|
||||||
if($ReqType== CAPITAL)
|
// if($ReqType== CAPITAL&&$RequestType!=IMPORT )
|
||||||
|
// {
|
||||||
|
// $AvlBudget = $this->purchaseorder_model->GetAvailableCapitalBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
if($ReqType== CAPITAL&&$RequestType!=IMPORT )
|
||||||
{
|
{
|
||||||
$AvlBudget = $this->purchaseorder_model->GetAvailableCapitalBudgetAmount($CostCode,$FYdt,$RequestType);
|
$AvlBudget = $this->purchaseorder_model->GetAvailableCapitalBudgetAmount($CostCode,$FYdt,$RequestType);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if($ReqType== IMPORT)
|
|
||||||
{
|
|
||||||
$AvlBudget = $this->purchaseorder_model->GetAvailableImportBudgetAmount($CostCode,$FYdt,$RequestType);
|
// else if($ReqType== CAPITAL&&$RequestType==IMPORT)
|
||||||
}
|
// {
|
||||||
|
|
||||||
|
// $AvlBudget = $this->purchaseorder_model->GetAvailableImportBudgetAmount($CostCode,$FYdt,$RequestType);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// else if($ReqType== IMPORT)
|
||||||
|
// {
|
||||||
|
// $AvlBudget = $this->purchaseorder_model->GetAvailableImportBudgetAmount($CostCode,$FYdt,$RequestType);
|
||||||
|
// }
|
||||||
else
|
else
|
||||||
|
|
||||||
{
|
{
|
||||||
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$RequestType);
|
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -248,7 +248,7 @@ function purchaseorderListing($forwhat='')
|
|||||||
|
|
||||||
$subQuery ='select BudgetAmount, (select ifnull(sum(IF(POMaster.ExchangeRate>0,Quantity*Rate*POMaster.ExchangeRate,Quantity*Rate-tax.Afterdiscountval)),0) as Totalvalue from
|
$subQuery ='select BudgetAmount, (select ifnull(sum(IF(POMaster.ExchangeRate>0,Quantity*Rate*POMaster.ExchangeRate,Quantity*Rate-tax.Afterdiscountval)),0) as Totalvalue from
|
||||||
T_PurchaseOrder_LineItem Item join T_Requestion_Master mast
|
T_PurchaseOrder_LineItem Item join T_Requestion_Master mast
|
||||||
on mast.ReqNo = Item.ReqNo join T_PurchaseOrder_Master POMaster on POMaster.PONO=Item.PONO left join T_Service_Tax tax on tax.LineItemNo=Item.LineItemNo where Item.CostCenterCode=? and mast.ReqType=? and POMaster.status not in (?))as Totalvalue
|
on mast.ReqNo = Item.ReqNo join T_PurchaseOrder_Master POMaster on POMaster.PONO=Item.PONO left join T_Service_Tax tax on tax.LineItemNo=Item.LineItemNo where Item.CostCenterCode=? and POMaster.POType=? and POMaster.status not in (?))as Totalvalue
|
||||||
from T_CostCenter_Budget Bud where Bud.CostCenterCode=? and
|
from T_CostCenter_Budget Bud where Bud.CostCenterCode=? and
|
||||||
BudgetYear = ? and BudgetType =?';
|
BudgetYear = ? and BudgetType =?';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user