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

@@ -56,7 +56,7 @@
</div>
<script>
cashier_type = window.location.href.indexOf("quick_service");
cashier_type = '<%= @cashier_type %>';
console.log(cashier_type)
var payment_method = "";
@@ -83,19 +83,19 @@
url: "<%= origami_cash_ins_path %>",
data: "reference="+ reference + "&remark=" + remark + "&amount="+ amount + "&payment_method="+payment_method + "&payment_method_reference="+ payment_method_reference,
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(){
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>