diff --git a/application/views/alterpurchaseorder.php b/application/views/alterpurchaseorder.php index e3fc70c3..e77f204a 100755 --- a/application/views/alterpurchaseorder.php +++ b/application/views/alterpurchaseorder.php @@ -387,7 +387,7 @@ var SelectedMaterialList = { $('#txtPackaging').removeAttr( 'readonly','true' ); } } - change(); + //change(); }); $('#EditPackagingType').change(function() { $('#txtEditPackaging').val(''); @@ -406,14 +406,15 @@ var SelectedMaterialList = { $('#txtEditPackaging').attr('readonly', 'true'); $('#txtEditPackaging').val('0.00'); - change(); + $('#txtEditAfterPackaging').val('0.00'); + Editchange(); } else { $('#txtEditPackaging').removeAttr( 'readonly','true' ); } } - change(); + //change(); }); $('#txtExciseDuty').change(function() { @@ -441,18 +442,13 @@ var SelectedMaterialList = { } }); - $('#drpEditFreight').change(function() { - $('#txtEditFreight').val(''); + $('#drpEditFreight').change(function() { + $('#txtEditFreight').val(''); $('#txtEditAfterFreight').val(''); var FreightType =$("#drpEditFreight").val(); // selValue = $("#drpFreight").val() ; - if(FreightType == PercentageType) - { - var freightCalculation = ''; - $('#freightmodel').modal('show'); - // $('#txtEditAfterFreight').removeAttr( 'readonly','true' ); - } - else if (FreightType == "PER TRIP") + + if (FreightType == "PER TRIP") { $('#EditTripsValue').show(); @@ -461,7 +457,29 @@ var SelectedMaterialList = { $('#EditTripsValue').hide(); } - calculateFreight(1); + if(FreightType == PercentageType) + { + var freightCalculation = ''; + $('#freightmodel').modal('show'); + $('#txtEditFreight').removeAttr( 'readonly','true'); + } + else if (selValue == NilType) + { + + $('#txtEditFreight').attr('readonly', 'true'); + $('#txtEditFreight').val('0.00'); + $('#txtEditAfterFreight').val('0.00'); + Editchange(); + } + else + { + $('#txtEditFreight').removeAttr( 'readonly','true' ); + // $('#txtEditAfterFreight').val(''); + + + } + // selValue = $("#drpEditFreight").val() ; + }); //add // $('#drpFreight').change(function() { @@ -1769,11 +1787,21 @@ function SetExciseCalculationCancel() var Tot = txtQuantity * txtUnitPrice $('#txtEditRevenueBasicValue').val(Tot); if($("#EditDiscountType").val()!=0){ - calculateDiscount(isEdit); + calculateDiscount(isEdit); } - var discount = $('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val(); + + + + if ($("#EditPackagingType").val()!=0) { + calculatePackaging(1); + } + if ($("#drpEditFreight").val()!=0) { + calculateFreight(1); + } + var discount = $('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val(); var basic = $('#txtEditRevenueBasicValue').val() == '' ? '0.00' : $('#txtEditRevenueBasicValue').val(); var basicValue1 = parseFloat(basic-discount); + //alert(basicValue1); var packaging = $('#txtEditAfterPackaging').val() == '' ? '0.00' : $('#txtEditAfterPackaging').val(); //alert(packaging); var freight =$('#txtEditAfterFreight').val() == '' ? '0.00' : $('#txtEditAfterFreight').val(); @@ -1781,7 +1809,8 @@ function SetExciseCalculationCancel() var packfreight = parseFloat(packaging)+parseFloat(freight); var basicValue = parseFloat(basicValue1+packfreight); //alert(basicValue); - if($("#RevenueEditCgst").val()!=''){ + + if($("#RevenueEditCgst").val()!=''){ $('#RevenueEditAfterCgst').val(calculateCgstTax(basicValue,$('#RevenueEditCgst').val())); } @@ -1802,14 +1831,6 @@ function SetExciseCalculationCancel() else{ $('#RevenueEditAfterIgst').val(0.00); } - - - if ($("#EditPackagingType").val()!=0) { - calculatePackaging(isEdit); - } - if ($("#drpEditFreight").val()!=0) { - calculateFreight(isEdit); - } calculateEditTotalValue(); @@ -1852,6 +1873,12 @@ Editchange(); if ($("#PackagingType").val()!=0) { calculatePackaging(isEdit); } + if($("#drpFreight").val()!=0){ + calculateFreight(isEdit); + + + } + var discount = $('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val(); var basic = $('#txtBasicValue').val() == '' ? '0.00' : $('#txtBasicValue').val(); @@ -1882,21 +1909,7 @@ Editchange(); else{ $('#RevenueAfterIgst').val(0.00); } - - if($("#drpFreight").val()!=0){ - calculateFreight(isEdit); - - - } - - - - - - - - - calculateTotalValue($('#isEdit').val()); + calculateTotalValue($('#isEdit').val()); } @@ -3335,7 +3348,7 @@ function populateValueMainFormForDeleteItem(rowid)
'RevenueEditCgst','value' => set_value('RevenueEditCgst',0),'id'=>'RevenueEditCgst', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Editchange();RevenueChangeEditSgst();'); + $data = array('name' => 'RevenueEditCgst','value' => set_value('RevenueEditCgst',0),'id'=>'RevenueEditCgst', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Editchange();'); echo form_input($data); ?>
@@ -3378,7 +3391,7 @@ function populateValueMainFormForDeleteItem(rowid)
'txtEditPackaging','value' => set_value('txtEditPackaging'),'id'=>'txtEditPackaging', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculatePackaging(1);Editchange();','style'=>'text-align:right;'); + $data = array('name' => 'txtEditPackaging','value' => set_value('txtEditPackaging'),'id'=>'txtEditPackaging', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Editchange();','style'=>'text-align:right;'); echo form_input($data); ?>
@@ -3469,7 +3482,7 @@ function populateValueMainFormForDeleteItem(rowid)
'txtEditFreight','value' => set_value('txtEditFreight'),'id'=>'txtEditFreight', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculateFreight(1);Editchange();','style'=>'text-align:right;'); + $data = array('name' => 'txtEditFreight','value' => set_value('txtEditFreight'),'id'=>'txtEditFreight', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Editchange();','style'=>'text-align:right;'); echo form_input($data); ?>
@@ -6201,10 +6214,10 @@ function populateValueMainFormForDeleteItem(rowid) { var basicValue = parseFloat(varBasicValue); - //alert(basicValue); + // alert(basicValue); var Cgst = parseFloat(Cgst); - //alert(Cgst); + // alert(Cgst); var ServiceTaxValue = 0.0; ServiceTaxValue = ; diff --git a/application/views/capitalpurchaseorder.php b/application/views/capitalpurchaseorder.php index 3e29c3c7..8153fdf4 100755 --- a/application/views/capitalpurchaseorder.php +++ b/application/views/capitalpurchaseorder.php @@ -990,9 +990,9 @@ function vaildateBeforeOpenModal()
-
-
-
+
+
-
+
-
+
-
+
@@ -1075,7 +1075,7 @@ function vaildateBeforeOpenModal()
-
+
-
+
CGST In %
-
+
-
-
-
+
+
-
+
-
+
-
+
@@ -1813,7 +1813,7 @@ function vaildateBeforeOpenModal()
-
+
- +
'EditCPTotalAmount','value' => set_value('EditCPTotalAmount'),'id'=>'EditCPTotalAmount', 'class' => 'form-control num' ,'readonly' => 'true'); @@ -1428,9 +1428,9 @@ document.getElementById('dispatchinternational').style.display = 'block';
-
-
-
+
+
-
+
-
+
-
+
@@ -1514,8 +1514,8 @@ document.getElementById('dispatchinternational').style.display = 'block';
-
- +
+
'txtAfterFreightlocedit','value' => set_value('txtAfterFreightlocedit'),'id'=>'txtAfterFreightlocedit', 'class' => 'form-control num' ,'readonly' => 'true'); @@ -1619,7 +1619,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
- +
@@ -1636,7 +1636,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
- +
@@ -2076,7 +2076,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
- + 'txtTotIgst','value' => set_value('txtTotIgst' ,number_format($TotalIGST, 2, '.', '')),'id'=>'txtTotIgst', 'class' => 'form-control num' ,'readonly' => 'true'); echo form_input($data); diff --git a/application/views/editCapitalPo.php b/application/views/editCapitalPo.php index 194164c7..1f0dcc5f 100755 --- a/application/views/editCapitalPo.php +++ b/application/views/editCapitalPo.php @@ -1466,9 +1466,9 @@ $("#PaymentMethod").select2();
-
-
-
+
+
-
+
-
+
-
+
-
+
'Select Freight Type'); //print_r( $options); @@ -1533,6 +1533,7 @@ $("#PaymentMethod").select2(); ?>
+ -
- +
+
'txtAfterFreightloc','value' => set_value('txtAfterFreightloc'),'id'=>'txtAfterFreightloc', 'class' => 'form-control num' ,'readonly' => 'true'); @@ -1563,6 +1564,7 @@ $("#PaymentMethod").select2();
+ @@ -2208,9 +2210,9 @@ $("#PaymentMethod").select2();
-
-
-
+
+
-
+
-
+
+
@@ -2295,7 +2297,7 @@ $("#PaymentMethod").select2();
-
+
-
-
-
+
+
-
+
-
+
+
@@ -3015,7 +3017,7 @@ $("#PaymentMethod").select2(); ?>
-
+
-
+
-
+