From 89a04ed2ba18e1f748c135a38f02704362f7f61e Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 18 Sep 2017 14:25:05 +0530 Subject: [PATCH] done capital ,service screen changes --- application/models/purchaseorder_model.php | 2 +- .../views/EditservicePurchaseorder.php | 9 ++-- application/views/capitalpurchaseorder.php | 37 +++++++++++-- application/views/editCapitalAmendPO.php | 2 +- application/views/editCapitalPo.php | 52 ++++++++++++++----- application/views/editServiceAmendPO.php | 2 +- application/views/servicePurchaseorder.php | 7 ++- 7 files changed, 85 insertions(+), 26 deletions(-) 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 () {
- +
" id="" value="After_IGST ; ?>" /> - + @@ -3059,7 +3059,7 @@ $("#EDITSERVICE").on("shown.bs.modal", function(e) { $("#EditFrequencyNo").val(1); } else{ - $('#EditFrequency').val($('#Frequency'+userid).val()+'-'+$('#FrequencyNo'+userid).val()); + $('#EditFrequency').val($('#Frequency'+userid).val()); $("#EditFrequencyNo").val($('#FrequencyValue'+userid).val()); } @@ -3150,7 +3150,7 @@ $("#VIEWSERVICE").on("shown.bs.modal", function(e) { $("#ViewFrequencyNo").val(1); } else{ - $('#ViewFrequency').val($('#Frequency'+userid).val()+'-'+$('#FrequencyNo'+userid).val()); + $('#ViewFrequency').val($('#Frequency'+userid).val()); $("#ViewFrequencyNo").val($('#FrequencyValue'+userid).val()); } @@ -3223,3 +3223,4 @@ $('#insuranceNo').val(''); } }); + diff --git a/application/views/capitalpurchaseorder.php b/application/views/capitalpurchaseorder.php index 7d546216..46d06526 100755 --- a/application/views/capitalpurchaseorder.php +++ b/application/views/capitalpurchaseorder.php @@ -562,7 +562,7 @@ function vaildateBeforeOpenModal()
- +
- +
'Selected Requisition Numbers'); if(!empty($ReqList)) { - + foreach ($ReqList as $SID): - $options[$SID->ReqNo] = $SID->ReqNo ."-". $SID->ReqNo; + $options[$SID->ReqNo] = $SID->ReqNo; endforeach; } @@ -666,7 +666,7 @@ $("#PaymentMethod").select2();
- +
-
-
-
-
+
+
+
@@ -1342,8 +1341,8 @@ $("#PaymentMethod").select2();
-
-
+
+

@@ -1729,10 +1728,10 @@ $("#PaymentMethod").select2();
- +
-
+ @@ -3840,7 +3839,7 @@ EditRatechange(); $('#AvailableModvat').val(calculateAvailableModvatCharge($('#AfterExcisedutyTax').val(),$('#AfterExcisedutyEDcess').val(),$('#AfterExcisedutySHcess').val(),$('#AfterAdditionalExciseduty').val())); $('#Grossexpenses').val(calculateGrossexpensesCharge($('#Grossdutypayable').val(),$('#AvailableModvat').val())); - if($('#PurQuantity').val()!=''){ + if($('#PurQuantity').val()!='' && $('#PurQuantity').val()!='0'){ $('#purchaserate').val(calculatepurchaserate($('#AfterBasicPriceTax').val(),$('#PurQuantity').val())); $('#CustomDutyExpenses').val(calculateCustomDutyExpenses($('#Grossexpenses').val(),$('#PurQuantity').val())); $('#RMCIncludingCustomers').val(calculateRMCIncludingCustomers($('#purchaserate').val(),$('#CustomDutyExpenses').val())); @@ -3851,6 +3850,19 @@ EditRatechange(); $('#txtTotalOrderValue').val(perKg); + } + else { + $('#purchaserate').val('0.00'); + $('#CustomDutyExpenses').val('0.00'); + $('#RMCIncludingCustomers').val('0.00'); + var Rmc = $('#RMCIncludingCustomers').val(); + var Quanty =$('#CPQuantity').val(); + var BasicAmt = $('#CPTotalAmount').val(); + var perKg = parseFloat(BasicAmt).toFixed(2); + + + $('#txtTotalOrderValue').val(perKg); + } } @@ -5563,7 +5575,7 @@ function clearAfterAddLineItemAdd(){ $('#EditAvailableModvat').val(calculateAvailableModvatCharge($('#EditAfterExcisedutyTax').val(),$('#EditAfterExcisedutyEDcess').val(),$('#EditAfterExcisedutySHcess').val(),$('#EditAfterAdditionalExciseduty').val())); $('#EditGrossexpenses').val(calculateGrossexpensesCharge($('#EditGrossdutypayable').val(),$('#EditAvailableModvat').val())); - if($('#EditPurQuantity').val()!=''){ + if($('#EditPurQuantity').val()!='' && $('#EditPurQuantity').val()!='0'){ $('#Editpurchaserate').val(calculatepurchaserate($('#EditAfterBasicPriceTax').val(),$('#EditPurQuantity').val())); $('#EditCustomDutyExpenses').val(calculateCustomDutyExpenses($('#EditGrossexpenses').val(),$('#EditPurQuantity').val())); $('#EditRMCIncludingCustomers').val(calculateRMCIncludingCustomers($('#Editpurchaserate').val(),$('#EditCustomDutyExpenses').val())); @@ -5574,6 +5586,19 @@ function clearAfterAddLineItemAdd(){ $('#EdittxtTotalOrderValue').val(perKg); + } + else { + $('#Editpurchaserate').val('0.00'); + $('#EditCustomDutyExpenses').val('0.00'); + $('#EditRMCIncludingCustomers').val('0.00'); + var Rmc = $('#EditRMCIncludingCustomers').val(); + var Quanty =$('#EditCPQuantity').val(); + var BasicAmt = $('#EditCPQuantity').val(); + var perKg = parseFloat(BasicAmt).toFixed(2); + + + $('#EdittxtTotalOrderValue').val(perKg); + } } @@ -6887,3 +6912,4 @@ function updateDiscountValuesChange(totAmt,disType,disAmt){ + diff --git a/application/views/editServiceAmendPO.php b/application/views/editServiceAmendPO.php index 96a2f76f..a9acd979 100755 --- a/application/views/editServiceAmendPO.php +++ b/application/views/editServiceAmendPO.php @@ -898,7 +898,7 @@ $(document).ready(function () {
- +
- +
+