From bf2ff732209a73db141cd647e8d430a3bb1caa04 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Wed, 26 Jul 2017 16:25:24 +0530 Subject: [PATCH] service and revenue po bug fixed --- application/views/EditservicePurchaseorder.php | 2 +- application/views/alterpurchaseorder.php | 1 + application/views/editRevenuepurchaseorder.php | 18 ++++++++++++++++-- application/views/purchaseorder.php | 12 ++++++++++++ 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/application/views/EditservicePurchaseorder.php b/application/views/EditservicePurchaseorder.php index 8a5448fa..be380164 100755 --- a/application/views/EditservicePurchaseorder.php +++ b/application/views/EditservicePurchaseorder.php @@ -1793,7 +1793,7 @@ $(document).ready(function () { $TotalSummary = $TotalSummary + $record->TotalValue; - $TotalBasicAmount = $TotalBasicAmount + $record->BasicValue; + $TotalBasicAmount = $TotalBasicAmount + $record->BasicValue * $FrequencyNo; } ?> diff --git a/application/views/alterpurchaseorder.php b/application/views/alterpurchaseorder.php index 6befbaf6..bee3fb87 100755 --- a/application/views/alterpurchaseorder.php +++ b/application/views/alterpurchaseorder.php @@ -1582,6 +1582,7 @@ function SetExciseCalculationCancel() if ($("#PackagingType").val()!=0) { calculatePackaging(isEdit); } + if($("#RevenueCgst").val()!=''){ $('#RevenueAfterCgst').val(calculateCgstTax($('#txtBasicValue').val(),$('#RevenueCgst').val())); diff --git a/application/views/editRevenuepurchaseorder.php b/application/views/editRevenuepurchaseorder.php index 29d7f10d..14c8de50 100755 --- a/application/views/editRevenuepurchaseorder.php +++ b/application/views/editRevenuepurchaseorder.php @@ -1480,7 +1480,10 @@ function calculatePackaging(isEdit) else if(FreightType == '') { AfterFreight = ; - } + } + else { + AfterFreight = $("#txtFreight").val(); + } var AfterFreightval = parseFloat(AfterFreight).toFixed(2); $('#txtAfterFreight').val(AfterFreightval); @@ -1543,7 +1546,10 @@ function calculatePackaging(isEdit) else if(FreightType == '') { AfterFreight = ; - } + } + else { + AfterFreight = $("#txtEditFreight").val(); + } var AfterFreightval = parseFloat(AfterFreight).toFixed(2); $('#txtEditAfterFreight').val(AfterFreightval); @@ -1725,6 +1731,9 @@ SetVatorCST(); $('#EditAfterIgst').val(calculateIgstTax($('#txtEditBasicValue').val(),$('#EditIgst').val())); } + calculateDiscount(1); + calculatePackaging(1); + calculateFreight(1); calculateEditTotalValue($('#isEdit').val()); } @@ -4315,6 +4324,11 @@ function change(){ $('#AfterIgst').val(calculateIgstTax($('#txtBasicValue').val(),$('#Igst').val())); } + + calculateDiscount(0); + calculatePackaging(0); + + calculateFreight(0); calculateTotalValue(); } diff --git a/application/views/purchaseorder.php b/application/views/purchaseorder.php index 7475e7a5..0534aaf2 100755 --- a/application/views/purchaseorder.php +++ b/application/views/purchaseorder.php @@ -1769,6 +1769,10 @@ return true; $('#EditAfterIgst').val(calculateIgstTax($('#txtEditBasicValue').val(),$('#EditIgst').val())); } + calculateDiscount(1); + calculatePackaging(1); + + calculateFreight(1); calculateEditTotalValue($('#isEdit').val()); } @@ -3694,6 +3698,7 @@ $('#Scheduleby').change(function(){ }); function change(){ + ExceedQuantityCheck(); if($('#Quantity').val() != '' && $('#Rate').val() != '') { @@ -3714,7 +3719,14 @@ function change(){ $('#AfterIgst').val(calculateIgstTax($('#txtBasicValue').val(),$('#Igst').val())); } + + + calculateDiscount(0); + calculatePackaging(0); + + calculateFreight(0); calculateTotalValue(); + }