diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php
index 680b8ccf..ee05efe9 100755
--- a/application/models/purchaseorder_model.php
+++ b/application/models/purchaseorder_model.php
@@ -246,7 +246,7 @@ function purchaseorderListing($forwhat='')
function GetAvailableCapitalBudgetAmount($CostCode,$Year,$BudgetType)
{
- $subQuery ='select BudgetAmount, (select ifnull(sum(IF(POMaster.ExchangeRate>0,Quantity*Rate*POMaster.ExchangeRate,Quantity*Rate)),0) as Totalvalue from
+ $subQuery ='select BudgetAmount, (select ifnull(sum(IF(POMaster.ExchangeRate>0,Quantity*Rate*POMaster.ExchangeRate,POMaster.TotalOrderValue)),0) as Totalvalue from
T_PurchaseOrder_LineItem Item join T_Requestion_Master mast
on mast.ReqNo = Item.ReqNo join T_PurchaseOrder_Master POMaster on POMaster.PONO=Item.PONO where Item.CostCenterCode=? and mast.ReqType=? and POMaster.status not in (?))as Totalvalue
from T_CostCenter_Budget Bud where Bud.CostCenterCode=? and
diff --git a/application/views/EditservicePurchaseorder.php b/application/views/EditservicePurchaseorder.php
index 348b6ace..d7fdbd18 100755
--- a/application/views/EditservicePurchaseorder.php
+++ b/application/views/EditservicePurchaseorder.php
@@ -886,7 +886,7 @@ $(document).ready(function () {