update cash in and out for quick service

This commit is contained in:
Aung Myo
2018-05-16 18:01:47 +06:30
parent 29434f2df9
commit ca360c75d6
8 changed files with 76 additions and 17 deletions

View File

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