update shift only if sales completed
This commit is contained in:
@@ -6,6 +6,7 @@ class Foodcourt::VoidController < BaseFoodcourtController
|
||||
remark = params[:remark]
|
||||
order_source = params[:type] #tax profile source
|
||||
access_code = params[:access_code]
|
||||
|
||||
if Sale.exists?(sale_id)
|
||||
sale = Sale.find_by_sale_id(sale_id)
|
||||
# update count for shift sale
|
||||
@@ -55,21 +56,11 @@ class Foodcourt::VoidController < BaseFoodcourtController
|
||||
Rails.logger.debug membership_response.to_json
|
||||
end
|
||||
|
||||
|
||||
# For Print
|
||||
member_info = nil
|
||||
rebate_amount = nil
|
||||
current_balance = nil
|
||||
|
||||
# For Cashier by Zone
|
||||
bookings = Booking.where("sale_id='#{sale_id}'")
|
||||
if bookings.count > 1
|
||||
# for Multiple Booking
|
||||
if bookings[0].dining_facility_id.to_i>0
|
||||
table = DiningFacility.find(bookings[0].dining_facility_id)
|
||||
end
|
||||
end
|
||||
|
||||
if bookings[0].dining_facility_id.to_i > 0
|
||||
cashier_zone = CashierTerminalByZone.find_by_zone_id(table.zone_id)
|
||||
cashier_terminal = CashierTerminal.find(cashier_zone.cashier_terminal_id)
|
||||
|
||||
Reference in New Issue
Block a user