food court and Booking ID for order and receipt

This commit is contained in:
phyusin
2018-10-08 17:41:22 +06:30
parent 5535a5db81
commit 03fd7c79b8
44 changed files with 1155 additions and 378 deletions

View File

@@ -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>