susee
This commit is contained in:
parent
1582f8e139
commit
40f0153f90
@ -382,18 +382,23 @@ function matchnum(event)
|
|||||||
}
|
}
|
||||||
$(document).on('change','.add_or_sub',function(){
|
$(document).on('change','.add_or_sub',function(){
|
||||||
var selectedValue = $('input[name="add_or_sub"]:checked').val();
|
var selectedValue = $('input[name="add_or_sub"]:checked').val();
|
||||||
|
const methodField = document.getElementById('method');
|
||||||
if (selectedValue === 'sub') {
|
if (selectedValue === 'sub') {
|
||||||
|
$("#packs").val("CreditPoints");
|
||||||
$('#method option[value="card"]').hide();
|
$('#method option[value="card"]').hide();
|
||||||
$('#method option[value="cash"]').hide();
|
$('#method option[value="cash"]').hide();
|
||||||
$("#packs option[value='6']").hide();
|
$("#packs option[value='6']").hide();
|
||||||
$("#packs option[value='7']").hide();
|
$("#packs option[value='7']").hide();
|
||||||
|
$('#count_hide_show').hide();
|
||||||
|
methodField.value = '';
|
||||||
$('#remarks').prop('required', true);
|
$('#remarks').prop('required', true);
|
||||||
} else {
|
} else {
|
||||||
$('#method option[value="card"]').show();
|
$('#method option[value="card"]').show();
|
||||||
$('#method option[value="cash"]').show();
|
$('#method option[value="cash"]').show();
|
||||||
$("#packs option[value='6']").hide();
|
$("#packs option[value='6']").show();
|
||||||
$("#packs option[value='7']").hide();
|
$("#packs option[value='7']").show();
|
||||||
|
$('#count_hide_show').show();
|
||||||
|
methodField.value = '';
|
||||||
$('#remarks').prop('required', false);
|
$('#remarks').prop('required', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user