diff --git a/app/Views/credit_points_list.php b/app/Views/credit_points_list.php index 63dee4a..9c1b13c 100644 --- a/app/Views/credit_points_list.php +++ b/app/Views/credit_points_list.php @@ -193,7 +193,7 @@ $(document).on('click','.manage-credits',function(){
- +
@@ -382,6 +382,7 @@ function matchnum(event) $(document).on('change','.add_or_sub',function(){ var selectedValue = $('input[name="add_or_sub"]:checked').val(); if (selectedValue === 'sub') { + $("#packs").val(""); // Clear the Pack select $("#packs").val("CreditPoints"); $('#method option[value="card"]').hide(); $('#method option[value="cash"]').hide(); @@ -389,7 +390,13 @@ $(document).on('change','.add_or_sub',function(){ $("#packs option[value='7']").hide(); $('#count_hide_show').hide(); $('#remarks').prop('required', true); + $("#credit").val("1"); // Reset Credit to 1 (you can set it to any default value) + $("#cost").val(""); + $('#credit').prop('readonly', false); + $('.changeClass').removeClass('col-md-8').addClass('col-md-12'); } else { + $("#packs").val("CreditPoints"); + $('#count_hide_show').hide(); $('#method option[value="card"]').show(); $('#method option[value="cash"]').show(); $("#packs option[value='6']").show();