add order source
This commit is contained in:
@@ -120,7 +120,7 @@ class Origami::SplitBillController < BaseOrigamiController
|
||||
if booking
|
||||
if booking.sale_id.nil?
|
||||
sale = Sale.new
|
||||
status, sale_id = sale.generate_invoice_from_booking(params[:booking_id], current_user, current_user, cashier_type, "cashier")
|
||||
status, sale_id = sale.generate_invoice_from_booking(params[:booking_id], current_user, current_user, cashier_type)
|
||||
sale_data = Sale.find_by_sale_id(sale_id)
|
||||
else
|
||||
status = true
|
||||
|
||||
@@ -355,13 +355,14 @@
|
||||
if(orders.length == 1){
|
||||
booking_id = booking[0].booking_id;
|
||||
}
|
||||
var cashier_type = "cashier";
|
||||
|
||||
var ajax_url = "/origami/split_bills";
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
dataType: 'JSON',
|
||||
data: {'dining_id' : dining_id, 'type': type, 'customer_id' : customer_id, 'booking_id' : booking_id, 'order_ids' : [], 'order_items' : '', 'orders' : JSON.stringify(arr_order)},
|
||||
data: {'cashier_type':cashier_type,'dining_id' : dining_id, 'type': type, 'customer_id' : customer_id, 'booking_id' : booking_id, 'order_ids' : [], 'order_items' : '', 'orders' : JSON.stringify(arr_order)},
|
||||
success: function (result) {
|
||||
if (!result.status) {
|
||||
swal("Information!", result.error_message);
|
||||
|
||||
Reference in New Issue
Block a user