foodcourt
This commit is contained in:
@@ -46,7 +46,6 @@ class Api::PaymentsController < Api::ApiController
|
|||||||
|
|
||||||
rebate_amount = nil
|
rebate_amount = nil
|
||||||
# For Cashier by Zone
|
# For Cashier by Zone
|
||||||
# bookings = Booking.where("sale_id='#{sale_id}'")
|
|
||||||
bookings = Booking.find_by_sale_id(sale_id)
|
bookings = Booking.find_by_sale_id(sale_id)
|
||||||
|
|
||||||
shift = ShiftSale.current_open_shift(current_login_employee)
|
shift = ShiftSale.current_open_shift(current_login_employee)
|
||||||
@@ -68,7 +67,6 @@ class Api::PaymentsController < Api::ApiController
|
|||||||
end
|
end
|
||||||
|
|
||||||
# For Print
|
# For Print
|
||||||
# if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
|
|
||||||
receipt_bill_a5_pdf = Lookup.collection_of("print_settings") #print_settings with name:ReceiptBillA5Pdf
|
receipt_bill_a5_pdf = Lookup.collection_of("print_settings") #print_settings with name:ReceiptBillA5Pdf
|
||||||
unique_code = "ReceiptBillPdf"
|
unique_code = "ReceiptBillPdf"
|
||||||
print_settings = PrintSetting.all
|
print_settings = PrintSetting.all
|
||||||
@@ -110,7 +108,6 @@ class Api::PaymentsController < Api::ApiController
|
|||||||
end
|
end
|
||||||
|
|
||||||
#orders print out
|
#orders print out
|
||||||
# if type == "quick_service"
|
|
||||||
booking = Booking.find_by_sale_id(sale_id)
|
booking = Booking.find_by_sale_id(sale_id)
|
||||||
if booking.dining_facility_id.to_i>0
|
if booking.dining_facility_id.to_i>0
|
||||||
table_id = booking.dining_facility_id
|
table_id = booking.dining_facility_id
|
||||||
@@ -133,7 +130,6 @@ class Api::PaymentsController < Api::ApiController
|
|||||||
ActionCable.server.broadcast "order_queue_station_channel",order: assign_order,from:from
|
ActionCable.server.broadcast "order_queue_station_channel",order: assign_order,from:from
|
||||||
end
|
end
|
||||||
|
|
||||||
# end
|
|
||||||
|
|
||||||
#for card sale data
|
#for card sale data
|
||||||
card_data = Array.new
|
card_data = Array.new
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ class Foodcourt::AddordersController < BaseFoodcourtController
|
|||||||
else
|
else
|
||||||
@display_type = nil
|
@display_type = nil
|
||||||
end
|
end
|
||||||
# if params[:menu] == "true"
|
|
||||||
@menus = []
|
@menus = []
|
||||||
@menu = []
|
@menu = []
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class Foodcourt::CashInsController < BaseFoodcourtController
|
|||||||
p_jour.cash_in(reference, remark, amount, payment_method, payment_method_reference, current_user)
|
p_jour.cash_in(reference, remark, amount, payment_method, payment_method_reference, current_user)
|
||||||
shift = ShiftSale.current_open_shift(current_user)
|
shift = ShiftSale.current_open_shift(current_user)
|
||||||
|
|
||||||
current_shift = ShiftSale.current_shift(Shop.current_shopshop_code)
|
current_shift = ShiftSale.current_shift(Shop.current_shop.shop_code)
|
||||||
# set cashier
|
# set cashier
|
||||||
if shift != nil
|
if shift != nil
|
||||||
shift = shift
|
shift = shift
|
||||||
@@ -36,7 +36,6 @@ class Foodcourt::CashInsController < BaseFoodcourtController
|
|||||||
shift =current_shift
|
shift =current_shift
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
puts shift.to_json
|
|
||||||
shift.cash_in = shift.cash_in + amount.to_f
|
shift.cash_in = shift.cash_in + amount.to_f
|
||||||
shift.save
|
shift.save
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -70,8 +70,7 @@ class Foodcourt::OrdersController < BaseFoodcourtController
|
|||||||
.joins("JOIN orders ON orders.order_id=booking_orders.order_id")
|
.joins("JOIN orders ON orders.order_id=booking_orders.order_id")
|
||||||
.joins("JOIN order_items ON orders.order_id=order_items.order_id")
|
.joins("JOIN order_items ON orders.order_id=order_items.order_id")
|
||||||
.joins("JOIN customers ON orders.customer_id=customers.customer_id")
|
.joins("JOIN customers ON orders.customer_id=customers.customer_id")
|
||||||
.where("orders.source='app' and bookings.shop_code='#{Shop.current_shop.shop_code}'").order("bookings.created_at desc").uniq
|
.where("orders.source='app' and bookings.shop_code=? and DATE(bookings.created_at)=?",Shop.current_shop.shop_code,Date.today).order("bookings.created_at desc").uniq
|
||||||
# .where("orders.source='app' and bookings.shop_code='#{Shop.current_shop.shop_code}' and DATE(bookings.created_at) = '#{Date.today}'").order("bookings.created_at desc").uniq
|
|
||||||
end
|
end
|
||||||
def completed
|
def completed
|
||||||
customer =Customer.find_by_customer_id(params[:customer_id])
|
customer =Customer.find_by_customer_id(params[:customer_id])
|
||||||
|
|||||||
@@ -21,11 +21,11 @@ class ActionController::Base
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
# check for license file
|
# check for license file
|
||||||
# if check_license
|
if check_license
|
||||||
# current_license(ENV["SX_PROVISION_URL"])
|
current_license(ENV["SX_PROVISION_URL"])
|
||||||
# else
|
else
|
||||||
# redirect_to activate_path
|
redirect_to activate_path
|
||||||
# end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
# application_path="#{File.expand_path("../..", __FILE__)}"
|
application_path="#{File.expand_path("../..", __FILE__)}"
|
||||||
# directory application_path
|
directory application_path
|
||||||
# #environment ENV.fetch("RAILS_ENV") { "production" }
|
#environment ENV.fetch("RAILS_ENV") { "production" }
|
||||||
# environment "production"
|
environment "production"
|
||||||
# pidfile "#{application_path}/tmp/puma/pid"
|
pidfile "#{application_path}/tmp/puma/pid"
|
||||||
# state_path "#{application_path}/tmp/puma/state"
|
state_path "#{application_path}/tmp/puma/state"
|
||||||
# stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
|
stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
|
||||||
# port ENV.fetch("PORT") { 62158 }
|
port ENV.fetch("PORT") { 62158 }
|
||||||
# workers 2
|
workers 2
|
||||||
# preload_app!
|
preload_app!
|
||||||
# threads 1,1
|
threads 1,1
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
3072
|
8746
|
||||||
Reference in New Issue
Block a user