update fixed issues for quickservice from sqa
This commit is contained in:
@@ -156,7 +156,7 @@ class Origami::AddordersController < ApplicationController#BaseOrigamiController
|
||||
end
|
||||
|
||||
@status, @booking = @order.generate
|
||||
if current_user.role != "waiter"
|
||||
if current_user.role != "waiter" && params[:create_type] == "create_pay"
|
||||
if @status && @booking && @order.source == 'quick_service'
|
||||
|
||||
@status, @sale = Sale.request_bill(@order,current_user,current_login_employee)
|
||||
|
||||
@@ -403,6 +403,19 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
printer.print_receipt_bill(print_settings,cashier_terminal,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, "FOC",nil,nil)
|
||||
|
||||
if params[:type] == "quick_service"
|
||||
booking = Booking.find_by_sale_id(sale_id)
|
||||
if booking.dining_facility_id.to_i>0
|
||||
table_id = booking.dining_facility_id
|
||||
else
|
||||
table_id = 0
|
||||
end
|
||||
|
||||
booking.booking_orders.each do |order|
|
||||
Order.pay_process_order_queue(order.order_id,table_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -23,15 +23,15 @@ class Origami::PendingOrderController < BaseOrigamiController
|
||||
|
||||
@order_items = Array.new
|
||||
@bookings.booking_orders.each do |booking_order|
|
||||
order = Order.find(booking_order.order_id)
|
||||
if (order.status == "new")
|
||||
order.order_items.each do |item|
|
||||
@order = Order.find(booking_order.order_id)
|
||||
if (@order.status == "new")
|
||||
@order.order_items.each do |item|
|
||||
@order_items.push(item)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
puts @status
|
||||
if @bookings.dining_facility_id.to_i > 0
|
||||
@table_id = Booking.find(@bookings.booking_id).dining_facility_id
|
||||
@dining = DiningFacility.find(@table_id)
|
||||
|
||||
@@ -14,7 +14,7 @@ class Origami::QuickServiceController < ApplicationController
|
||||
# @rooms = Room.all.active.order('zone_id asc').group("zone_id")
|
||||
# @all_table = Table.all.active.order('status desc')
|
||||
# @all_room = Room.all.active.order('status desc')
|
||||
# render "origami/addorders/detail"
|
||||
render "origami/addorders/detail"
|
||||
end
|
||||
|
||||
def modify_order
|
||||
@@ -51,6 +51,7 @@ class Origami::QuickServiceController < ApplicationController
|
||||
else
|
||||
@booking = nil
|
||||
end
|
||||
render "origami/addorders/detail"
|
||||
end
|
||||
|
||||
def update_modify_order
|
||||
|
||||
Reference in New Issue
Block a user