diff --git a/app/Views/editRevenuepurchaseorder.php b/app/Views/editRevenuepurchaseorder.php index 89ab7f6d..38eae6db 100755 --- a/app/Views/editRevenuepurchaseorder.php +++ b/app/Views/editRevenuepurchaseorder.php @@ -642,7 +642,9 @@ if (!empty($getlogpodtl)) { }); var freight = ''; + $('#drpFreight').change(function () { + alert("started"); var FreightType = $("#drpFreight").val(); if (FreightType == "PER TRIP") { @@ -656,15 +658,17 @@ if (!empty($getlogpodtl)) { selValue = $("#drpFreight").val(); $('#txtFreight').val(''); $('#txtAfterFreight').val(''); + console.log("onchange initiated..!!"); + if (selValue == PercentageType) { - // $('#REVENUE').modal('hide'); + console.log("inside opening freight model "); freight = 'FreightCalculationOn'; var FreightCalculation = ''; $('#freightcalmodel').modal('show'); $('#txtFreight').removeAttr('readonly', 'true'); } else if (selValue == NilType) { - $('#txtFreight').attr('readonly', 'true'); + $('#txtFreight').attr('readonly','true'); $('#txtFreight').val('0.00'); change(); } else { @@ -696,7 +700,7 @@ if (!empty($getlogpodtl)) { $('#EDITREVENUE').modal('show'); } }); - EditservicePurchaseorder + $('#drpEditFreight').change(function () { var FreightType = $("#drpEditFreight").val(); @@ -716,6 +720,7 @@ if (!empty($getlogpodtl)) { var FreightCalculation = ''; $('#freightcalmodel').modal('show'); $('#txtEditFreight').removeAttr('readonly', 'true'); + } else if (selValue == NilType) { $('#txtEditFreight').attr('readonly', 'true'); @@ -1485,7 +1490,10 @@ if (!empty($getlogpodtl)) { return false; } else { var AfterDiscount = parseFloat($('#txtEditAfterDiscount').val()); + let freightCalculationOnValue = $(`input[type='radio'][name='optFreight']:checked`).val(); + FreightCalculation=freightCalculationOnValue; AfterFreight = FreightCalculation == 0 ? : ; + console.log(AfterDiscount); } } else if (FreightType == NilType) { @@ -4121,6 +4129,7 @@ if (!empty($getlogpodtl)) { +