diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php
index 2417b7a4..66063b9f 100755
--- a/application/controllers/purchaseorder.php
+++ b/application/controllers/purchaseorder.php
@@ -1458,7 +1458,8 @@ $createddt='';
// }
$SpcialInstruction = $this->input->post('txtSpcialInstruction');
- $TotalOrder = $this->input->post('txtToatlOrder');
+ //$TotalOrder = $this->input->post('txtToatlOrder');
+ $TotalOrder = $this->input->post('txttot');
//echo $TotalOrder;
//die();
$POStatus = $this->input->post('txtStatus');
@@ -1953,8 +1954,7 @@ $createddt='';
function EditCapitalPurchaseOrder()
{
- echo "scsdc";
- die();
+
$PONO =$this->input->post('txtPONO');
$POdt =$this->input->post('PODate');
$PODate = $this->getDateformat($POdt);
@@ -2032,14 +2032,10 @@ $createddt='';
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s');
$updateddt = $dt->format('Y-m-d H:i:s');
-
+
+
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRate'=>$ExchangeRate,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'PaymentTerms'=>$PaymentMethod,'PaymentDays'=>$PaymentDate,'PayableAt'=>$PayableAT,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CurrencyType'=>$currencytypeID,'DeliverySchedule'=>$DeliverySchedule,'Import_PlaceofOrgin'=>$Palaceoforigin,'Import_DispatchDetails'=>$Dispatch);
- // $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'ExchangeRate'=>$ExchangeRate,'PaymentTerms'=>$PaymentMethod,'PaymentDays'=>$PaymentDate,'PayableAt'=>$PayableAT,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CapitalRange'=>$CapitalRange,'POType'=>$POType,'CurrencyType'=>$currencytypeID,'DeliverySchedule'=>$DeliverySchedule,'Import_PlaceofOrgin'=>$Palaceoforigin,'Import_DispatchDetails'=>$Dispatch);
- print_r($POList);
- die();
-
-
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php
index d105c43d..a09b4ded 100755
--- a/application/models/purchaseorder_model.php
+++ b/application/models/purchaseorder_model.php
@@ -251,7 +251,7 @@ function purchaseorderListing($forwhat='')
function GetAvailableImportBudgetAmount($CostCode,$Year,$BudgetType)
{
- $subQuery='select BudgetAmount,(select ifnull(sum((Quantity*Rate*ExchangeRate)),0)as TValue from T_PurchaseOrder_LineItem LineItem
+ $subQuery='select BudgetAmount,(select ifnull(sum((Quantity*Rate)),0)as TValue from T_PurchaseOrder_LineItem LineItem
join T_PurchaseOrder_Master Mast on Mast.PONO=LineItem.PONO where POType=?
and CostCenterCode=?)as TotalValue from T_CostCenter_Budget Bud where Bud.CostCenterCode=? and BudgetYear=? and BudgetType=?';
$query = $this->db->query($subQuery,array($BudgetType,$CostCode,$CostCode,$Year,$BudgetType));
diff --git a/application/views/editCapitalPo.php b/application/views/editCapitalPo.php
index c18a16d2..dba76666 100755
--- a/application/views/editCapitalPo.php
+++ b/application/views/editCapitalPo.php
@@ -4660,7 +4660,7 @@ $('#txtStatus').val(stat);
$('#txtDeliveryAddress').val('');
clearAfterAddLineItemAdd();
- //window.location ="purchaseorderListing";
+ window.location ="purchaseorderListing";
}
else
@@ -5009,7 +5009,7 @@ function clearAfterAddLineItemAdd(){
$('#CustomDutyExpenses'+userid).val(CustomDutyExpenses);
$('#RMCIncludingCustomers'+userid).val(RMCIncludingCustomers);
$('#basicvalInINR'+userid).val(basicvalInINR);
-
+ $('#itemRate'+userid).val(itemRate);
/* get % value */
diff --git a/application/views/editimportpo.php b/application/views/editimportpo.php
index 7381b40f..49536298 100644
--- a/application/views/editimportpo.php
+++ b/application/views/editimportpo.php
@@ -2635,6 +2635,8 @@ if($PONOStatus == PO_RELEASED)
echo form_input($data);
?>
+
+ >