food court and Booking ID for order and receipt
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
cashier_type = window.location.href.indexOf("quick_service");
|
||||
cashier_type = '<%= @cashier_type %>';
|
||||
$('#cash_out').on('click',function(){
|
||||
var reference = $('#reference').val();
|
||||
var remark = $('#remark').val();
|
||||
@@ -34,22 +34,20 @@
|
||||
url: "<%= origami_cash_outs_path %>",
|
||||
data: "reference="+ reference + "&remark=" + remark + "&amount="+ amount,
|
||||
success:function(result){
|
||||
|
||||
if (cashier_type == -1) {
|
||||
window.location.href = '/origami';
|
||||
if (cashier_type == 'quick_service' || cashier_type == 'food_court') {
|
||||
window.location.href = '/origami/'+cashier_type+'/pending_order';
|
||||
}else{
|
||||
window.location.href = '/origami/quick_service/pending_order';
|
||||
window.location.href = '/origami';
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
$('#back').on('click',function(){
|
||||
cashier_type = window.location.href.indexOf("quick_service");
|
||||
if (cashier_type == -1) {
|
||||
window.location.href = '/origami';
|
||||
}else{
|
||||
window.location.href = '/origami/quick_service/pending_order';
|
||||
}
|
||||
if (cashier_type == 'quick_service' || cashier_type == 'food_court') {
|
||||
window.location.href = '/origami/'+cashier_type+'/pending_order';
|
||||
}else{
|
||||
window.location.href = '/origami';
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user