update cash in and out for quick service
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
cashier_type = window.location.href.indexOf("quick_service");
|
||||
$('#cash_out').on('click',function(){
|
||||
var reference = $('#reference').val();
|
||||
var remark = $('#remark').val();
|
||||
@@ -33,12 +34,22 @@
|
||||
url: "<%= origami_cash_outs_path %>",
|
||||
data: "reference="+ reference + "&remark=" + remark + "&amount="+ amount,
|
||||
success:function(result){
|
||||
window.location.href = '/origami';
|
||||
|
||||
if (cashier_type == -1) {
|
||||
window.location.href = '/origami';
|
||||
}else{
|
||||
window.location.href = '/origami/quick_service/pending_order';
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
$('#back').on('click',function(){
|
||||
window.location.href = '/origami';
|
||||
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';
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user