Merge branch 'quick_service'
This commit is contained in:
@@ -37,9 +37,10 @@ class Origami::AddordersController < ApplicationController#BaseOrigamiController
|
||||
|
||||
def get_menu_category ()
|
||||
if (params[:id])
|
||||
puts params[:id]
|
||||
|
||||
#Pull this menu
|
||||
@menu = MenuCategory.find_by_id(params[:id])
|
||||
|
||||
# puts @menu.menu_items[1].item_attributes.to_json
|
||||
return @menu
|
||||
else
|
||||
@@ -49,7 +50,6 @@ class Origami::AddordersController < ApplicationController#BaseOrigamiController
|
||||
|
||||
def get_menu()
|
||||
if (params[:id])
|
||||
puts params[:id]
|
||||
#Pull this menu
|
||||
@menu = Menu.find_by_id(params[:id])
|
||||
@menu_category = MenuCategory.where("menu_id='#{@menu.id}'").order("order_by asc")
|
||||
@@ -61,10 +61,13 @@ class Origami::AddordersController < ApplicationController#BaseOrigamiController
|
||||
end
|
||||
|
||||
def get_menu_sub_category ()
|
||||
|
||||
id = params[:id]
|
||||
|
||||
if (id)
|
||||
#Pull this menu
|
||||
@sub_menu = MenuCategory.where("menu_category_id = #{id}").active
|
||||
|
||||
# puts @menu.menu_items[1].item_attributes.to_json
|
||||
return @sub_menu
|
||||
end
|
||||
@@ -153,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
|
||||
|
||||
Reference in New Issue
Block a user