diff --git a/app/Views/credit_points_list.php b/app/Views/credit_points_list.php index 4384cd0..e5ff0b4 100644 --- a/app/Views/credit_points_list.php +++ b/app/Views/credit_points_list.php @@ -382,18 +382,23 @@ function matchnum(event) } $(document).on('change','.add_or_sub',function(){ var selectedValue = $('input[name="add_or_sub"]:checked').val(); + const methodField = document.getElementById('method'); if (selectedValue === 'sub') { - + $("#packs").val("CreditPoints"); $('#method option[value="card"]').hide(); $('#method option[value="cash"]').hide(); $("#packs option[value='6']").hide(); $("#packs option[value='7']").hide(); + $('#count_hide_show').hide(); + methodField.value = ''; $('#remarks').prop('required', true); } else { $('#method option[value="card"]').show(); $('#method option[value="cash"]').show(); - $("#packs option[value='6']").hide(); - $("#packs option[value='7']").hide(); + $("#packs option[value='6']").show(); + $("#packs option[value='7']").show(); + $('#count_hide_show').show(); + methodField.value = ''; $('#remarks').prop('required', false); }