add to existing order
This commit is contained in:
@@ -1655,4 +1655,32 @@ $(function() {
|
||||
//end is_sub_item false
|
||||
}
|
||||
}
|
||||
$("#add_to_existing_order").on('click', function(e){
|
||||
$(this).attr('disabled', 'disabled');
|
||||
e.preventDefault();
|
||||
type = $("#link_type").val();
|
||||
$("#oqs_loading_wrapper").show();
|
||||
var ajax_url = 'addorders/add_to_existing_order';
|
||||
var table_type = $('#table_type').text();
|
||||
var table_id = $('#table_id').text();
|
||||
var customer_id = $('#customer_id').text();
|
||||
var booking_id = $('#booking_id').text();
|
||||
var sale_id = $('#sale_id').text();
|
||||
var order_items = JSON.stringify(get_order_item_rows());
|
||||
var params = {'order_source': type, 'order_type': "dine_in",
|
||||
'customer_id': customer_id, 'guest_info': "",'booking_id':booking_id,
|
||||
'table_id': table_id,
|
||||
'order_items': order_items,'sale_id': sale_id,'create_type': "create_pay" };
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
data: params,
|
||||
dataType: "json",
|
||||
success:function(result){
|
||||
if (result.status) {
|
||||
window.location.href = "/foodcourt/table/sale/" + sale_id + "/food_court/edit";
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user