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

@@ -56,6 +56,9 @@
</div>
<script>
cashier_type = window.location.href.indexOf("quick_service");
console.log(cashier_type)
var payment_method = "";
$('.payment-type').on('click',function(){
$('.payment-type').css("background-color","#7a62d3")
@@ -80,11 +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){
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';
if (cashier_type == -1) {
window.location.href = '/origami';
}else{
window.location.href = '/origami/quick_service/pending_order';
}
})
</script>