From 40f0153f904c701e01002a2668746d96e22a3468 Mon Sep 17 00:00:00 2001 From: venkateswaran ubuntu Date: Sat, 2 Sep 2023 18:41:21 +0530 Subject: [PATCH] susee --- app/Views/credit_points_list.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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); }