test no table

This commit is contained in:
Aung Myo
2018-02-14 14:26:36 +06:30
parent 08e372cfb5
commit b2cec95064
3 changed files with 14 additions and 11 deletions

View File

@@ -102,7 +102,7 @@ class Origami::AddordersController < ApplicationController#BaseOrigamiController
if !params["booking_id"].nil?
# check booking id is already completed.
booking = Booking.find(params[:booking_id])
if !params[:table_id].nil?
if params[:table_id].to_i > 0
table_status = booking.dining_facility_id.to_i == params[:table_id].to_i
else
table_status = true
@@ -119,7 +119,7 @@ class Origami::AddordersController < ApplicationController#BaseOrigamiController
@order.booking_id = params[:booking_id]
end
else
if !params[:table_id].nil?
if params[:table_id].to_i > 0
sale_status = check_order_with_table(params[:table_id])
if sale_status
return return_json_status_with_code(400, "bill requested")
@@ -128,7 +128,7 @@ class Origami::AddordersController < ApplicationController#BaseOrigamiController
end
end #booking exists
else
if !params[:table_id].nil?
if params[:table_id].to_i > 0
sale_status = check_order_with_table(params[:table_id])
if sale_status
# return false , @message = "bill requested"

View File

@@ -220,6 +220,8 @@ class Origami::PaymentsController < BaseOrigamiController
#end customer amount
@sale_data.bookings.each do |sbk|
puts "sssssssssss"
puts sbk.dining_facility_id
df = DiningFacility.find(sbk.dining_facility_id)
@table_no = df.type + ' ' + df.name
@checkin_time = sbk.checkin_at