Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
12
app/controllers/origami/order_reservation_controller.rb
Normal file
12
app/controllers/origami/order_reservation_controller.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class Origami::OrderReservationController < BaseOrigamiController
|
||||
|
||||
def index
|
||||
@webview = check_mobile
|
||||
@shop = Shop::ShopDetail
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
@@ -154,10 +154,13 @@ class Origami::QuickServiceController < ApplicationController
|
||||
|
||||
result = {:status=> true, :data => @sale }
|
||||
render :json => result.to_json
|
||||
end
|
||||
end
|
||||
elsif (params[:sale_id][0,3] == "BKI")
|
||||
result = {:status=> true, :data => 'OK' }
|
||||
render :json => result.to_json
|
||||
else
|
||||
result = {:status=> true, :data => nil }
|
||||
render :json => result.to_json
|
||||
render :json => result.to_json
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -16,7 +16,12 @@ class Origami::RequestBillsController < ApplicationController
|
||||
bk_order = BookingOrder.find_by_order_id(order_id)
|
||||
order = Order.find(order_id)
|
||||
check_booking = Booking.find_by_booking_id(bk_order.booking_id)
|
||||
table = DiningFacility.find(check_booking.dining_facility_id)
|
||||
if check_booking.dining_facility_id.to_i > 0
|
||||
table = DiningFacility.find(check_booking.dining_facility_id)
|
||||
else
|
||||
table = nil
|
||||
end
|
||||
|
||||
if check_booking.sale_id.nil?
|
||||
# Create Sale if it doesn't exist
|
||||
@status, @sale_id = @sale.generate_invoice_from_booking(check_booking.id,current_login_employee, current_user, order.source)
|
||||
|
||||
Reference in New Issue
Block a user