table_id
This commit is contained in:
@@ -74,7 +74,8 @@ class Api::OrdersController < Api::ApiController
|
||||
else
|
||||
if checkin_checkout_time(params[:booking_id])
|
||||
|
||||
table = DiningFacility.find(params[:table_id]) if params[:table_id].present?
|
||||
table = DiningFacility.find_by_name(params[:table_name]) if params[:table_name].present?
|
||||
# table = DiningFacility.find(params[:table_id]) if params[:table_id].present?
|
||||
|
||||
booking = table.current_checkin_booking if table
|
||||
booking ||= Booking.find(params[:booking_id]) if params[:booking_id].present?
|
||||
@@ -107,7 +108,7 @@ class Api::OrdersController < Api::ApiController
|
||||
customer_id: params[:customer_id].present? ? params[:customer_id] : Customer.walkin.customer_id, # for no customer id from mobile
|
||||
items: items_arr,
|
||||
guest: params[:guest_info],
|
||||
table_id: params[:table_id],
|
||||
table_id: !table.nil? ? table.id : '',
|
||||
new_booking: true,
|
||||
waiters: @user.name,
|
||||
employee_name: @user.name,
|
||||
@@ -132,7 +133,8 @@ class Api::OrdersController < Api::ApiController
|
||||
end
|
||||
end
|
||||
else
|
||||
return return_json_status_with_code(406, "Checkout time is over!")
|
||||
@status =false
|
||||
@message ="Checkout time is over!"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -130,7 +130,7 @@ class Api::PaymentsController < Api::ApiController
|
||||
other_amount = SaleItem.calculate_other_charges(sale_items)
|
||||
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings, false, nil, cashier_terminal,sale_items,sale,params[:card_no], item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,@shop, 'Foodcourt',current_balance,card_data,other_amount,latest_order_no,card_balance_amount,nil,transaction_ref)
|
||||
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings, false, nil, cashier_terminal,sale_items,sale,params[:card_no], item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,@shop, 'Paid',current_balance,card_data,other_amount,latest_order_no,card_balance_amount,nil,transaction_ref)
|
||||
render json: JSON.generate({:status => true, :balance_amount => card_balance_amount,:receipt_no => sale.receipt_no,:order_no => latest_order_no, :message => "complete", :paid_amount => sale.grand_total})
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user