update order and request bill
This commit is contained in:
@@ -9,7 +9,7 @@ class Api::BillController < Api::ApiController
|
||||
if !ShiftSale.current_shift.nil?
|
||||
#create Bill by Booking ID
|
||||
table = 0
|
||||
if (params[:booking_id])
|
||||
if params[:booking_id].present?
|
||||
booking = Booking.find(params[:booking_id])
|
||||
if booking.booking_orders.count > 0
|
||||
if booking.checkin_at.utc.strftime("%Y-%m-%d %H:%M") > Time.now.utc.strftime("%Y-%m-%d %H:%M") && booking.checkout_at.nil?
|
||||
@@ -51,13 +51,6 @@ class Api::BillController < Api::ApiController
|
||||
@status = false
|
||||
@error_message = "There is no order for '#{params[:booking_id]}'"
|
||||
end
|
||||
# elsif (params[:order_id])
|
||||
# order = Order.find(params[:order_id])
|
||||
# @status, @sale_id = Sale.generate_invoice_from_order(params[:order_id], current_login_employee, get_cashier, order.source)
|
||||
#
|
||||
# # for Job
|
||||
# booking = Booking.find_by_sale_id(@sale_id)
|
||||
# table = DiningFacility.find(booking.dining_facility_id)
|
||||
end
|
||||
|
||||
# Bind shift sale id to sale
|
||||
|
||||
Reference in New Issue
Block a user