This commit is contained in:
Aung Myo
2018-02-20 14:15:01 +06:30

View File

@@ -5,8 +5,8 @@ class Api::BillController < Api::ApiController
def create def create
@status = false @status = false
@error_message = "Order ID or Booking ID is require to request for a bill." @error_message = "Order ID or Booking ID is require to request for a bill."
byebug # if shift_by_terminal = ShiftSale.current_open_shift(get_cashier[0].id)
if shift_by_terminal = ShiftSale.current_open_shift(get_cashier[0].id) if !ShiftSale.current_shift.nil?
#create Bill by Booking ID #create Bill by Booking ID
table = 0 table = 0
if (params[:booking_id]) if (params[:booking_id])
@@ -41,8 +41,8 @@ class Api::BillController < Api::ApiController
end end
# Bind shift sale id to sale # Bind shift sale id to sale
@sale_data.shift_sale_id = shift_by_terminal.id # @sale_data.shift_sale_id = shift_by_terminal.id
@sale_data.save # @sale_data.save
Promotion.promo_activate(@sale) Promotion.promo_activate(@sale)