update table box
This commit is contained in:
@@ -128,15 +128,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var cashier_type = "<%= @cashier_type %>";
|
||||
// Bill Request
|
||||
$(document).ready(function () {
|
||||
|
||||
$(".update").on('click', function () {
|
||||
var sale_item_id = $(this).attr('data-id');
|
||||
var qty = $('#' + sale_item_id + "_qty").val();
|
||||
var price = $('#' + sale_item_id + "_price").val();
|
||||
var qty = $('#' + sale_item_id + "_qty").val();
|
||||
var price = $('#' + sale_item_id + "_price").val();
|
||||
console.log(qty + "|" + price)
|
||||
var ajax_url = "/origami/item_edit";
|
||||
var ajax_url = "/origami/item_edit";
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
@@ -196,7 +197,12 @@
|
||||
|
||||
$('#back').on('click', function () {
|
||||
var table_id = '<%= @table_id %>'
|
||||
window.location.href = '/origami/table/' + table_id;
|
||||
var sale_id = "<%= @saleobj.sale_id %>"
|
||||
if (cashier_type=="quick_service") {
|
||||
window.location.href = '/origami/sale/'+sale_id+'/'+cashier_type+'/payment/';
|
||||
}else{
|
||||
window.location.href = '/origami/table/' + table_id;
|
||||
}
|
||||
})
|
||||
|
||||
$('#cancel_all_void').on('click', function () {
|
||||
@@ -221,7 +227,12 @@
|
||||
url: ajax_url,
|
||||
data: 'sale_id=' + sale_id,
|
||||
success: function (result) {
|
||||
window.location.href = '/origami/table/' + table_id;
|
||||
if (cashier_type=="quick_service") {
|
||||
window.location.href = '/origami/sale/'+sale_id+'/'+cashier_type+'/payment/';
|
||||
}else{
|
||||
window.location.href = '/origami/table/' + table_id;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user