shop code
This commit is contained in:
@@ -100,7 +100,7 @@ class Origami::SplitBillController < BaseOrigamiController
|
||||
end
|
||||
|
||||
status = false
|
||||
if !ShiftSale.current_shift.nil?
|
||||
if !ShiftSale.current_shift(@shop.shop_code).nil?
|
||||
#create Bill by Booking ID
|
||||
table = 0
|
||||
if !params[:booking_id].empty?
|
||||
@@ -133,7 +133,8 @@ class Origami::SplitBillController < BaseOrigamiController
|
||||
|
||||
booking = Booking.create({:dining_facility_id => params[:dining_id],:type => type,
|
||||
:checkin_at => Time.now.utc, :checkin_by => current_user.name,
|
||||
:booking_status => "assign" })
|
||||
:booking_status => "assign",
|
||||
:shop_code =>@shop.shop_code})
|
||||
|
||||
if !orders.nil?
|
||||
orders.each do |order|
|
||||
@@ -333,7 +334,7 @@ class Origami::SplitBillController < BaseOrigamiController
|
||||
end
|
||||
end
|
||||
|
||||
Promotion.promo_activate(sale_data)
|
||||
Promotion.promo_activate(sale_data,@shop.shop_code)
|
||||
if ENV["SERVER_MODE"] == 'cloud'
|
||||
from = request.subdomain + "." + request.domain
|
||||
else
|
||||
@@ -358,6 +359,7 @@ class Origami::SplitBillController < BaseOrigamiController
|
||||
order.waiters = current_user.name
|
||||
order.employee_name = current_user.name
|
||||
order.guest_info = nil
|
||||
order.shop_code = @shop.shop_code
|
||||
order.save!
|
||||
|
||||
return order
|
||||
@@ -410,10 +412,4 @@ class Origami::SplitBillController < BaseOrigamiController
|
||||
render :json => { status: true }
|
||||
end
|
||||
|
||||
#Shop Name in Navbor
|
||||
helper_method :shop_detail
|
||||
def shop_detail
|
||||
@shop = Shop.first
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user