From 0c2443562c28a94f0dab7e56dee9057157d28c39 Mon Sep 17 00:00:00 2001 From: gandhimathi Bharathirajan Date: Mon, 31 Jul 2017 17:31:53 +0530 Subject: [PATCH] Cost center issue fixed --- application/views/addCostCenter.php | 15 ++++++--------- application/views/editOldcost.php | 9 +++------ 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/application/views/addCostCenter.php b/application/views/addCostCenter.php index f83c7dd8..869d0889 100755 --- a/application/views/addCostCenter.php +++ b/application/views/addCostCenter.php @@ -520,14 +520,15 @@ $("#Edit").on("shown.bs.modal", function(e) { $('.tempClick').click(function(){ - + if ($("#Addbudget option:selected").val() =='-1' ) { alert('Please Select the Budget Type '); //return; } - if(document.getElementById('AddYear').value == '' ) + //if ($("#AddYear option:selected").val() =='0' ) + if($('#AddYear').val() == '0' ) { alert('Please Enter the Budget Year'); //return; @@ -539,8 +540,8 @@ $("#Edit").on("shown.bs.modal", function(e) { } - if ($("#Addbudget option:selected").val() !='-1' && $('#AddYear').val() && $('#AddAmout').val() ) - { + if ($("#Addbudget option:selected").val() !='-1' && $('#AddYear').val() != '0' && $('#AddAmout').val() != '' ) + { $('#BudgetTable').show(); var temp = index; @@ -575,11 +576,7 @@ $("#Edit").on("shown.bs.modal", function(e) { CountRows(); } - else - { - alert('Please enter all the values'); - - } + }); diff --git a/application/views/editOldcost.php b/application/views/editOldcost.php index 68ba52ea..2230f3f2 100755 --- a/application/views/editOldcost.php +++ b/application/views/editOldcost.php @@ -627,7 +627,7 @@ $("#Edit").on("shown.bs.modal", function(e) { //return; } - if(document.getElementById('AddYear').value == '' ) + if($('#AddYear').val() == '0' ) { alert('Please Enter the Budget Year'); //return; @@ -639,7 +639,7 @@ $("#Edit").on("shown.bs.modal", function(e) { } - if ($("#Addbudget option:selected").val() !='-1' && $('#AddYear').val() && $('#AddAmout').val() ) + if ($("#Addbudget option:selected").val() !='-1' && $('#AddYear').val() != '0' && $('#AddAmout').val() != '' ) { // $('#BudgetTable').show(); @@ -675,10 +675,7 @@ $("#Edit").on("shown.bs.modal", function(e) { $('#txtRowCount').val(temp); } - else - { - alert('Please enter all the values'); - } + });