fix timezone
This commit is contained in:
@@ -40,15 +40,15 @@ class Api::CheckInProcessController < Api::ApiController
|
||||
lookup_checkout_time = Lookup.collection_of("checkout_alert_time")
|
||||
|
||||
if !lookup_checkout_time.empty?
|
||||
now = Time.current
|
||||
lookup_checkout_time.each do |checkout_time|
|
||||
arr_time = checkout_time[0].split("-")
|
||||
start_time = Time.zone.parse(arr_time[0].strip).utc.strftime("%H:%M%p")
|
||||
end_time = Time.zone.parse(arr_time[1].strip).utc.strftime("%H:%M%p")
|
||||
if start_time <= now && now <= end_time
|
||||
alert_time_min = checkout_time[1].to_i
|
||||
end
|
||||
end
|
||||
now = Time.now.utc
|
||||
lookup_checkout_time.each do |checkout_time|
|
||||
arr_time = checkout_time[0].split("-")
|
||||
start_time = Time.zone.parse(arr_time[0].strip).utc.strftime("%H:%M%p")
|
||||
end_time = Time.zone.parse(arr_time[1].strip).utc.strftime("%H:%M%p")
|
||||
if start_time <= now && now <= end_time
|
||||
alert_time_min = checkout_time[1].to_i
|
||||
end
|
||||
end
|
||||
render :json => { :status => true, :check_in_time => check_in_time, :check_out_time => check_out_time, :alert_time_min => alert_time_min, :extra_minutes => extra_minutes }
|
||||
else
|
||||
render :json => { :status => true }
|
||||
|
||||
@@ -35,7 +35,7 @@ class Api::ShiftsController < Api::ApiController
|
||||
@shift = ShiftSale.find_by_id(shift_id)
|
||||
if !@shift.nil?
|
||||
if @shift.shift_closed_at.nil?
|
||||
@shift.shift_closed_at = DateTime.now.utc
|
||||
@shift.shift_closed_at = Time.current
|
||||
@shift.closing_balance = closing_balance.to_f
|
||||
@shift.save
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ class BaseReportController < ActionController::Base
|
||||
if params[:from].present? && params[:to].present?
|
||||
from = Time.zone.parse(params[:from])
|
||||
to = Time.zone.parse(params[:to])
|
||||
|
||||
else
|
||||
case period.to_i
|
||||
when PERIOD["today"]
|
||||
|
||||
@@ -5,9 +5,9 @@ class Crm::DiningQueuesController < BaseCrmController
|
||||
# GET /crm/dining_queues
|
||||
# GET /crm/dining_queues.json
|
||||
def index
|
||||
today = DateTime.now.strftime('%Y-%m-%d')
|
||||
@dining_queues = DiningQueue.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and status is NULL ", today).order("queue_no asc")
|
||||
@complete_queue = DiningQueue.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and status = 'Assign' ", today).order("queue_no asc")
|
||||
today = Time.current.strftime('%Y-%m-%d')
|
||||
@dining_queues = DiningQueue.where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status is NULL ", today).order("queue_no asc")
|
||||
@complete_queue = DiningQueue.where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status = 'Assign' ", today).order("queue_no asc")
|
||||
|
||||
if params[:term]
|
||||
@customer = Customer.order(:name).where('lower(name) LIKE ?', "%#{params[:term].downcase}%")
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
class Crm::HomeController < BaseCrmController
|
||||
def index
|
||||
|
||||
|
||||
@booking = Booking.all
|
||||
@customer = Customer.all
|
||||
from = Time.current.beginning_of_day
|
||||
to = Time.current.end_of_day
|
||||
@queue = DiningQueue.where('created_at BETWEEN ? AND ?', from, to).order('queue_no ASC')
|
||||
redirect_to crm_customers_path
|
||||
redirect_to crm_customers_path
|
||||
# .where("dining_facilities.is_active=? and orders.date between ? and ?",true,from,to)
|
||||
|
||||
end
|
||||
@@ -16,12 +16,12 @@ class Crm::HomeController < BaseCrmController
|
||||
|
||||
#print for crm
|
||||
def print_order
|
||||
|
||||
|
||||
@booking = Booking.find(params[:id])
|
||||
|
||||
@total_amount = 0.00
|
||||
@total_tax = 0.00
|
||||
|
||||
|
||||
if @booking.booking_orders
|
||||
order_items = []
|
||||
@booking.booking_orders.each do |bo|
|
||||
@@ -32,14 +32,14 @@ class Crm::HomeController < BaseCrmController
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
# unique_code="CrmOrderPdf"
|
||||
|
||||
# print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||
|
||||
# printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
|
||||
# printer.print_crm_order(@booking,order_items,print_settings)
|
||||
# printer.print_crm_order(@booking,order_items,print_settings)
|
||||
|
||||
end
|
||||
|
||||
@@ -53,8 +53,7 @@ class Crm::HomeController < BaseCrmController
|
||||
# else
|
||||
# render json: JSON.generate({:status => false, :error_message => "Record not found"})
|
||||
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -21,7 +21,7 @@ class Foodcourt::FoodCourtController < ApplicationController
|
||||
@tables = Table.active.order('status desc')
|
||||
@rooms = Room.active.order('status desc')
|
||||
|
||||
today = DateTime.now
|
||||
today = Time.current
|
||||
day = Date.today.wday
|
||||
@menus = []
|
||||
@menu = []
|
||||
|
||||
@@ -7,7 +7,7 @@ class Foodcourt::HomeController < BaseFoodcourtController
|
||||
@tables = Table.unscoped.all.active.order('status desc')
|
||||
@rooms = Room.unscoped.all.active.order('status desc')
|
||||
@complete = Sale.completed_sale("cashier")
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",DateTime.now.strftime('%Y-%m-%d')).order('date desc')
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",Time.current.strftime('%Y-%m-%d')).order('date desc')
|
||||
|
||||
@customers = Customer.pluck("customer_id, name")
|
||||
@occupied_table = DiningFacility.where("status='occupied'").count
|
||||
@@ -22,7 +22,7 @@ class Foodcourt::HomeController < BaseFoodcourtController
|
||||
@tables = Table.unscoped.all.active.order('status desc')
|
||||
@rooms = Room.unscoped.all.active.order('status desc')
|
||||
@complete = Sale.completed_sale("cashier")
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",DateTime.now.strftime('%Y-%m-%d')).order('date desc')
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",Time.current.strftime('%Y-%m-%d')).order('date desc')
|
||||
@customers = Customer.pluck("customer_id, name")
|
||||
@shift = ShiftSale.current_open_shift(current_user)
|
||||
|
||||
@@ -33,8 +33,8 @@ class Foodcourt::HomeController < BaseFoodcourtController
|
||||
@membership = MembershipSetting::MembershipSetting
|
||||
@payment_methods = PaymentMethodSetting.all
|
||||
|
||||
@dining_booking = @dining.bookings.active.where("DATE_FORMAT(created_at,'%Y-%m-%d') = '#{DateTime.now.strftime('%Y-%m-%d')}' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '#{Date.today.prev_day}' ")
|
||||
#@dining_booking = @dining.bookings.active.where("created_at between '#{DateTime.now.utc - 12.hours}' and '#{DateTime.now.utc}'")
|
||||
@dining_booking = @dining.bookings.active.where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '#{Time.current.strftime('%Y-%m-%d')}' OR DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '#{Date.today.prev_day}' ")
|
||||
|
||||
@order_items = Array.new
|
||||
@dining_booking.each do |booking|
|
||||
if booking.sale_id.nil? && booking.booking_status != 'moved'
|
||||
|
||||
@@ -7,8 +7,8 @@ class Foodcourt::OrdersController < BaseFoodcourtController
|
||||
|
||||
@tables = Table.unscoped.all.active.order('status desc')
|
||||
@rooms = Room.unscoped.all.active.order('status desc')
|
||||
@complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d'))
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",DateTime.now.strftime('%Y-%m-%d')).order('date desc')
|
||||
@complete = Sale.where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and sale_status != 'new'",Time.not.utc.strftime('%Y-%m-%d'))
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",Time.current.strftime('%Y-%m-%d')).order('date desc')
|
||||
@order = Order.find(params[:order_id])
|
||||
booking = Booking.select('bookings.booking_id, bookings.dining_facility_id')
|
||||
.joins(" JOIN booking_orders as bo on bo.booking_id = bookings.booking_id")
|
||||
@@ -100,7 +100,7 @@ class Foodcourt::OrdersController < BaseFoodcourtController
|
||||
@rooms = Room.active.order('status desc')
|
||||
|
||||
@cashier_type = "food_court"
|
||||
today = DateTime.now
|
||||
today = Time.current
|
||||
day = Date.today.wday
|
||||
|
||||
@menus = []
|
||||
@@ -214,7 +214,7 @@ class Foodcourt::OrdersController < BaseFoodcourtController
|
||||
in_duties.each do |in_duty|
|
||||
induty = InDuty.find(in_duty.id)
|
||||
induty.sale_id = sale_data.sale_id
|
||||
induty.out_time = Time.now.utc
|
||||
induty.out_time = Time.now
|
||||
induty.save
|
||||
end
|
||||
end
|
||||
|
||||
@@ -8,7 +8,7 @@ class Foodcourt::SalesController < BaseFoodcourtController
|
||||
@tables = Table.unscoped.all.active.order('status desc')
|
||||
@rooms = Room.unscoped.all.active.order('status desc')
|
||||
@complete = Sale.completed_sale("cashier")
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",DateTime.now.strftime('%Y-%m-%d')).order('date desc')
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",Time.current.strftime('%Y-%m-%d')).order('date desc')
|
||||
@customers = Customer.pluck("customer_id, name")
|
||||
@sale = Sale.find(params[:sale_id])
|
||||
@order = SaleOrder.find_by_sale_id(@sale.sale_id).order_id
|
||||
@@ -29,7 +29,7 @@ class Foodcourt::SalesController < BaseFoodcourtController
|
||||
sale_data = []
|
||||
table = DiningFacility.find(dining)
|
||||
existing_booking = Booking.find_by_sale_id(sale_id)
|
||||
table.bookings.active.where("DATE_FORMAT(created_at,'%Y-%m-%d') = '#{DateTime.now.strftime('%Y-%m-%d')}' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '#{Date.today.prev_day}' ").each do |booking|
|
||||
table.bookings.active.where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '#{Time.current.strftime('%Y-%m-%d')}' OR DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '#{Date.today.prev_day}' ").each do |booking|
|
||||
if booking.sale_id.nil?
|
||||
order_array = []
|
||||
booking.booking_orders.each do |booking_order|
|
||||
|
||||
@@ -46,7 +46,7 @@ class Foodcourt::ShiftsController < BaseFoodcourtController
|
||||
shift_id = params[:shift_id]
|
||||
@shift = ShiftSale.find_by_id(shift_id)
|
||||
if @shift
|
||||
@shift.shift_closed_at = DateTime.now.utc
|
||||
@shift.shift_closed_at = Time.now
|
||||
@shift.closing_balance = closing_balance.to_f
|
||||
@shift.save
|
||||
|
||||
|
||||
@@ -4,15 +4,15 @@ class Induties::AssignInDutiesController < ApplicationController
|
||||
@commiss=Commissioner.active.all.order(created_at: :desc)
|
||||
@commiss.each do|commissioner|
|
||||
check_in_count =InDuty.where('commissioner_ids =? and out_time is null', commissioner.id.to_json).count;
|
||||
@commissioners.push({ "id"=>commissioner.id,
|
||||
@commissioners.push({ "id"=>commissioner.id,
|
||||
"name"=>commissioner.name,
|
||||
"image_path"=>commissioner.image_path.url,
|
||||
"check_in_count"=>check_in_count
|
||||
})
|
||||
|
||||
|
||||
end
|
||||
@booking_id = params[:booking_id]
|
||||
|
||||
|
||||
end
|
||||
|
||||
def get_all_occupied_dining
|
||||
@@ -32,10 +32,10 @@ class Induties::AssignInDutiesController < ApplicationController
|
||||
induty.booking_id = booking_id
|
||||
induty.commissioner_ids = commissioner_ids
|
||||
induty.by_name = params[:by_name]
|
||||
induty.in_time = Time.current
|
||||
induty.in_time = Time.now
|
||||
if induty.save
|
||||
dinning = DiningFacility.find(induty.dinning_id)
|
||||
@induty= {"id"=>induty.id,
|
||||
@induty= {"id"=>induty.id,
|
||||
"dinning_id"=>induty.dinning_id,
|
||||
"in_time"=>induty.in_time,
|
||||
"out_time"=>induty.out_time,
|
||||
|
||||
@@ -249,7 +249,7 @@ class Oqs::HomeController < BaseOqsController
|
||||
# left join booking_orders as bo on bo.order_id = assigned_order_items.order_id
|
||||
# left join bookings as bk on bk.booking_id = bo.booking_id
|
||||
# left join dining_facilities as df on df.id = bk.dining_facility_id")
|
||||
# .where("assigned_order_items.delivery_status = #{status} AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}' ")
|
||||
# .where("assigned_order_items.delivery_status = #{status} AND assigned_order_items.created_at >= '#{Time.current.beginning_of_day.utc}' ")
|
||||
# query = query.where("df.name LIKE ? OR odt.order_id LIKE ? OR odt.item_name LIKE ? OR cus.name = '#{filter}'","%#{filter}%","%#{filter}%","%#{filter}%",)
|
||||
# .group("oqs.id")
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ class Origami::BankIntegrationController < ApplicationController #BaseOrigamiCon
|
||||
def settle_trans
|
||||
if(params[:type] == 'request')
|
||||
card_settle_trans = CardSettleTran.new()
|
||||
card_settle_trans.req_date = Time.current.strftime("%Y-%m-%d")
|
||||
card_settle_trans.req_time = Time.current
|
||||
card_settle_trans.req_date = Date.today
|
||||
card_settle_trans.req_time = Time.now
|
||||
card_settle_trans.req_cmd = params[:data][:cmd_type]
|
||||
card_settle_trans.req_type = params[:data][:payment_type]
|
||||
card_settle_trans.save()
|
||||
@@ -13,8 +13,8 @@ class Origami::BankIntegrationController < ApplicationController #BaseOrigamiCon
|
||||
response = {status: 'success', card_settle_trans_id: card_settle_trans_id}
|
||||
else
|
||||
card_settle_trans = CardSettleTran.find(params[:card_settle_trans_id])
|
||||
card_settle_trans.res_date = Time.current.strftime("%Y-%m-%d")
|
||||
card_settle_trans.res_time = Time.current
|
||||
card_settle_trans.res_date = Date.today
|
||||
card_settle_trans.res_time = Time.now
|
||||
card_settle_trans.res_cmd = params[:data][:CMD]
|
||||
card_settle_trans.res_type = params[:data][:TYPE]
|
||||
card_settle_trans.status = params[:data][:STATUS]
|
||||
@@ -42,8 +42,8 @@ class Origami::BankIntegrationController < ApplicationController #BaseOrigamiCon
|
||||
if(params[:type] == 'request')
|
||||
card_sale_trans = CardSaleTran.new()
|
||||
card_sale_trans.sale_id = params[:data][:sale_id]
|
||||
card_sale_trans.req_date = Time.current.strftime("%Y-%m-%d")
|
||||
card_sale_trans.req_time = Time.current
|
||||
card_sale_trans.req_date = Date.today
|
||||
card_sale_trans.req_time = Time.now
|
||||
card_sale_trans.req_amt = params[:data][:amt]
|
||||
card_sale_trans.req_inv_no = params[:data][:inv_no]
|
||||
card_sale_trans.req_cmd = params[:data][:cmd_type]
|
||||
|
||||
@@ -14,7 +14,7 @@ class Origami::CheckInProcessController < BaseOrigamiController
|
||||
checkout_at = checkout_at + (checkout_time[1]).to_i.minutes
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if checkout_at.strftime("%Y-%m-%d %H:%M%p") > today.strftime("%Y-%m-%d %H:%M%p")
|
||||
@dining_facility = DiningFacility.find(params[:dining_id])
|
||||
|
||||
@@ -23,9 +23,9 @@ class Origami::CheckInProcessController < BaseOrigamiController
|
||||
# else
|
||||
# type = "RoomBooking"
|
||||
# end
|
||||
|
||||
|
||||
@booking = Booking.create({:dining_facility_id => params[:dining_id],:type => "TableBooking",
|
||||
:checkin_by=>current_login_employee.name,:checkin_at => Time.current,:checkout_at =>checkout_at, :booking_status => "assign", :reserved_at => checkout_at, :reserved_by => current_login_employee.name })
|
||||
:checkin_by=>current_login_employee.name, :checkin_at => Time.current, :checkout_at =>checkout_at, :booking_status => "assign", :reserved_at => checkout_at, :reserved_by => current_login_employee.name })
|
||||
|
||||
cashier_terminal = CashierTerminal.find_by_id(@dining_facility.zone_id)
|
||||
|
||||
@@ -40,13 +40,13 @@ class Origami::CheckInProcessController < BaseOrigamiController
|
||||
booking = Booking.find_by_booking_id(@booking.booking_id)
|
||||
table = DiningFacility.find(params[:dining_id])
|
||||
|
||||
# print when complete click
|
||||
# print when complete click
|
||||
order_queue_printer = Printer::OrderQueuePrinter.new(printer)
|
||||
|
||||
if !printer.nil?
|
||||
order_queue_printer.print_check_in_out(printer, cashier_terminal, booking, table)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -8,8 +8,8 @@ class Origami::CreditSalesController < BaseOrigamiController
|
||||
|
||||
@tables = Table.unscope(:order).all.active.order('status desc')
|
||||
@rooms = Room.unscope(:order).all.active.order('status desc')
|
||||
@complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d'))
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",DateTime.now.strftime('%Y-%m-%d')).order('date desc')
|
||||
@complete = Sale.where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and sale_status != 'new'",Time.current.strftime('%Y-%m-%d'))
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",Time.current.strftime('%Y-%m-%d')).order('date desc')
|
||||
@customers = Customer.pluck("customer_id, name")
|
||||
|
||||
@sale = Sale.find_by_sale_id(params[:sale_id])
|
||||
|
||||
@@ -8,7 +8,7 @@ class Origami::FoodCourtController < ApplicationController
|
||||
end
|
||||
|
||||
def index
|
||||
today = DateTime.now
|
||||
today = Time.current
|
||||
day = Date.current.wday
|
||||
# if params[:menu] == "true"
|
||||
@menus = []
|
||||
@@ -47,7 +47,7 @@ class Origami::FoodCourtController < ApplicationController
|
||||
|
||||
def modify_order
|
||||
@cashier_type = "food_court"
|
||||
today = DateTime.now
|
||||
today = Time.current
|
||||
day = Date.current.wday
|
||||
# if params[:menu] == "true"
|
||||
@menus = []
|
||||
|
||||
@@ -7,7 +7,7 @@ class Origami::HomeController < BaseOrigamiController
|
||||
@tables = Table.unscope(:order).includes(:zone, :current_checkin_booking, :current_checkout_booking, :current_reserved_booking).active.order('status desc')
|
||||
@rooms = Room.unscope(:order).includes(:zone, :current_checkin_booking, :current_checkout_booking, :current_reserved_booking).active.order('status desc')
|
||||
@complete = Sale.completed_sale("cashier")
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",DateTime.now.strftime('%Y-%m-%d')).order('date desc')
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",Time.current.strftime('%Y-%m-%d')).order('date desc')
|
||||
|
||||
|
||||
@customers = Customer.pluck("customer_id, name")
|
||||
@@ -24,7 +24,7 @@ class Origami::HomeController < BaseOrigamiController
|
||||
@tables = Table.unscope(:order).includes(:zone, :current_checkin_booking, :current_checkout_booking, :current_reserved_booking).all.active.order('status desc')
|
||||
@rooms = Room.unscope(:order).includes(:zone, :current_checkin_booking, :current_checkout_booking, :current_reserved_booking).all.active.order('status desc')
|
||||
@complete = Sale.completed_sale("cashier")
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",DateTime.now.strftime('%Y-%m-%d')).order('date desc')
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",Time.current.strftime('%Y-%m-%d')).order('date desc')
|
||||
|
||||
@customers = Customer.pluck("customer_id, name")
|
||||
@shift = ShiftSale.current_open_shift(current_user)
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
class Origami::MoveroomController < BaseOrigamiController
|
||||
|
||||
|
||||
authorize_resource :class => false
|
||||
|
||||
|
||||
def move_dining
|
||||
@webview = check_mobile
|
||||
|
||||
|
||||
@tables = Table.all.active.order('status desc')
|
||||
@rooms = Room.all.active.order('status desc')
|
||||
@complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d'))
|
||||
@orders = Order.where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed'",DateTime.now.strftime('%Y-%m-%d')).order('date desc')
|
||||
@complete = Sale.where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and sale_status != 'new'",Time.current.strftime('%Y-%m-%d'))
|
||||
@orders = Order.where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status != 'billed'",Time.current.strftime('%Y-%m-%d')).order('date desc')
|
||||
|
||||
@status_order = ""
|
||||
@status_sale = ""
|
||||
@sale_array = Array.new
|
||||
@dining = DiningFacility.find(params[:dining_id])
|
||||
@dining_room = @dining.bookings.active.where("DATE_FORMAT(created_at,'%Y-%m-%d') = '#{DateTime.now.strftime('%Y-%m-%d')}' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '#{Date.current.prev_day}' ")
|
||||
@dining_room = @dining.bookings.active.where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '#{Time.current.strftime('%Y-%m-%d')}' OR DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '#{Date.current.prev_day}' ")
|
||||
@dining_room.each do |booking|
|
||||
if booking.sale_id.nil?
|
||||
@order_items = Array.new
|
||||
|
||||
@@ -7,15 +7,15 @@ class Origami::MovetableController < BaseOrigamiController
|
||||
|
||||
@tables = Table.all.active.order('status desc')
|
||||
@rooms = Room.all.active.order('status desc')
|
||||
@complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d'))
|
||||
@orders = Order.where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed'",DateTime.now.strftime('%Y-%m-%d')).order('date desc')
|
||||
@complete = Sale.where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and sale_status != 'new'",Time.current.strftime('%Y-%m-%d'))
|
||||
@orders = Order.where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status != 'billed'",Time.current.strftime('%Y-%m-%d')).order('date desc')
|
||||
@dining = DiningFacility.find(params[:dining_id])
|
||||
|
||||
@status_order = ""
|
||||
@status_sale = ""
|
||||
@sale_array = Array.new
|
||||
|
||||
@dining_booking = @dining.bookings.active.where("DATE_FORMAT(created_at,'%Y-%m-%d') = '#{DateTime.now.strftime('%Y-%m-%d')}' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '#{Date.current.prev_day}' ")
|
||||
@dining_booking = @dining.bookings.active.where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '#{Time.current.strftime('%Y-%m-%d')}' OR DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '#{Date.current.prev_day}' ")
|
||||
|
||||
@dining_booking.each do |booking|
|
||||
if booking.sale_id.nil?
|
||||
@@ -32,7 +32,7 @@ class Origami::MovetableController < BaseOrigamiController
|
||||
@order_items.push(item)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
accounts = @customer.tax_profiles
|
||||
@account_arr =[]
|
||||
accounts.each do |acc|
|
||||
@@ -69,11 +69,11 @@ class Origami::MovetableController < BaseOrigamiController
|
||||
|
||||
def moving
|
||||
change_to = params[:change_to] #new
|
||||
change_from = params[:change_from] #original
|
||||
change_from = params[:change_from] #original
|
||||
|
||||
# bookings = Booking.where('dining_facility_id=?',change_from)
|
||||
|
||||
bookings = Booking.where("((DATE_FORMAT(created_at,'%Y-%m-%d') = '#{DateTime.now.strftime('%Y-%m-%d')}' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '#{Date.current.prev_day}')) AND dining_facility_id='#{change_from}'")
|
||||
bookings = Booking.where("((DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '#{Time.current.strftime('%Y-%m-%d')}' OR DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '#{Date.current.prev_day}')) AND dining_facility_id='#{change_from}'")
|
||||
|
||||
booking_array = Array.new
|
||||
order_items = Array.new
|
||||
@@ -85,13 +85,13 @@ class Origami::MovetableController < BaseOrigamiController
|
||||
|
||||
booking.booking_orders.each do |booking_order|
|
||||
order = Order.find(booking_order.order_id)
|
||||
if order.status == 'new'
|
||||
if order.status == 'new'
|
||||
oqs = OrderQueueStation.new
|
||||
oqs.process_order(order, change_from, order.source, 'move',change_to,current_user.name)
|
||||
# order.order_items.each do |order_item|
|
||||
# order_items.push(order_item)
|
||||
# end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -104,9 +104,9 @@ class Origami::MovetableController < BaseOrigamiController
|
||||
# @to = (DiningFacility.find(change_to)).name
|
||||
# @type = (DiningFacility.find(change_to)).type
|
||||
# @moved_by = @current_user.name
|
||||
# @date = DateTime.now
|
||||
# @date = Time.current
|
||||
# @shop = @shop
|
||||
# unique_code = "MoveTablePdf"
|
||||
# unique_code = "MoveTablePdf"
|
||||
# pdf_no = PrintSetting.where(:unique_code => unique_code).count
|
||||
# #print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||
# printer_array = []
|
||||
@@ -115,15 +115,15 @@ class Origami::MovetableController < BaseOrigamiController
|
||||
# for i in 0..pdf_no
|
||||
# if i != pdf_no
|
||||
# print_settings = printer_array[i]
|
||||
# printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
# printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
# printer.print_move_table(print_settings,@to,@from ,@shop,@date,@type,@moved_by,order_items)
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
|
||||
type = 'move'
|
||||
from = getCloudDomain #get sub domain in cloud mode
|
||||
ActionCable.server.broadcast "order_channel",table: change_from,type:type,from:from ,change_to:change_to
|
||||
ActionCable.server.broadcast "order_channel",table: change_from,type:type,from:from ,change_to:change_to
|
||||
end
|
||||
|
||||
#get cloud domain
|
||||
|
||||
@@ -2,13 +2,13 @@ class Origami::OrdersController < BaseOrigamiController
|
||||
def show
|
||||
@webview = false
|
||||
if check_mobile
|
||||
@webview = true
|
||||
@webview = true
|
||||
end
|
||||
|
||||
|
||||
@tables = Table.unscope(:order).all.active.order('status desc')
|
||||
@rooms = Room.unscope(:order).all.active.order('status desc')
|
||||
@complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d'))
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",DateTime.now.strftime('%Y-%m-%d')).order('date desc')
|
||||
@complete = Sale.where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and sale_status != 'new'",Time.current.strftime('%Y-%m-%d'))
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",Time.current.strftime('%Y-%m-%d')).order('date desc')
|
||||
@order = Order.find(params[:order_id])
|
||||
booking = Booking.select('bookings.booking_id, bookings.dining_facility_id')
|
||||
.joins(" JOIN booking_orders as bo on bo.booking_id = bookings.booking_id")
|
||||
@@ -22,7 +22,7 @@ class Origami::OrdersController < BaseOrigamiController
|
||||
else
|
||||
@booking.push({'booking_id' => booking.booking_id, 'dining_facility_id' => booking.dining_facility_id, 'type' => nil})
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
@customers = Customer.pluck("customer_id, name")
|
||||
#for split bill
|
||||
@@ -39,7 +39,7 @@ class Origami::OrdersController < BaseOrigamiController
|
||||
@sale_status = sale.sale_status
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@order.order_items.each_with_index do |item, order_item_index|
|
||||
if !item.set_menu_items.nil?
|
||||
instance_item_sets = JSON.parse(item.set_menu_items)
|
||||
@@ -52,7 +52,7 @@ class Origami::OrdersController < BaseOrigamiController
|
||||
@order.order_items[order_item_index].set_menu_items = arr_instance_item_sets
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# bookings = Booking.all
|
||||
# if !bookings.today.nil?
|
||||
# @order_items_count = Hash.new
|
||||
@@ -85,5 +85,5 @@ class Origami::OrdersController < BaseOrigamiController
|
||||
# end
|
||||
# end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class Origami::PendingOrderController < BaseOrigamiController
|
||||
def index
|
||||
# @dining= DiningFacility.where("status = 'occupied'")
|
||||
# @order = Order.where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status = 'billed' and source = 'quick_service'",DateTime.now.strftime('%Y-%m-%d'))
|
||||
# @order = Order.where("DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status = 'billed' and source = 'quick_service'",Time.current.strftime('%Y-%m-%d'))
|
||||
@cashier_type = params[:type]
|
||||
@sale = Sale.pending_sale(@cashier_type)
|
||||
@order = Sale.pending_order(@cashier_type)
|
||||
|
||||
@@ -8,7 +8,7 @@ class Origami::QuickServiceController < ApplicationController
|
||||
end
|
||||
|
||||
def index
|
||||
today = DateTime.now
|
||||
today = Time.current
|
||||
day = Date.current.wday
|
||||
|
||||
@menus = []
|
||||
@@ -46,7 +46,7 @@ class Origami::QuickServiceController < ApplicationController
|
||||
|
||||
def modify_order
|
||||
@cashier_type = "quick_service"
|
||||
today = DateTime.now
|
||||
today = Time.current
|
||||
day = Date.current.wday
|
||||
# if params[:menu] == "true"
|
||||
@menus = []
|
||||
|
||||
@@ -4,7 +4,7 @@ class Origami::RoomsController < BaseOrigamiController
|
||||
@tables = Table.unscope(:order).all.active.order('status desc')
|
||||
@rooms = Room.unscope(:order).all.active.order('status desc')
|
||||
@complete = Sale.completed_sale("cashier")
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",DateTime.now.strftime('%Y-%m-%d')).order('date desc')
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",Time.current.strftime('%Y-%m-%d')).order('date desc')
|
||||
@shift = ShiftSale.current_open_shift(current_user)
|
||||
@webview = false
|
||||
if check_mobile
|
||||
@@ -22,7 +22,7 @@ class Origami::RoomsController < BaseOrigamiController
|
||||
@tables = Table.unscope(:order).all.active.order('status desc')
|
||||
@rooms = Room.unscope(:order).all.active.order('status desc')
|
||||
@complete = Sale.completed_sale("cashier")
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",DateTime.now.strftime('%Y-%m-%d')).order('date desc')
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",Time.current.strftime('%Y-%m-%d')).order('date desc')
|
||||
@customers = Customer.pluck("customer_id, name")
|
||||
@room = DiningFacility.find(params[:room_id])
|
||||
@shift = ShiftSale.current_open_shift(current_user)
|
||||
@@ -33,8 +33,8 @@ class Origami::RoomsController < BaseOrigamiController
|
||||
|
||||
@membership = MembershipSetting::MembershipSetting
|
||||
@payment_methods = PaymentMethodSetting.all
|
||||
|
||||
@dining_room = @room.bookings.active.where("DATE_FORMAT(created_at,'%Y-%m-%d') = '#{DateTime.now.strftime('%Y-%m-%d')}' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '#{Date.current.prev_day}' ")
|
||||
|
||||
@dining_room = @room.bookings.active.where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '#{Time.current.strftime('%Y-%m-%d')}' OR DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '#{Date.current.prev_day}' ")
|
||||
@order_items = Array.new
|
||||
@dining_room.each do |booking|
|
||||
if booking.sale_id.nil? && booking.booking_status != 'moved'
|
||||
|
||||
@@ -9,7 +9,7 @@ class Origami::SalesController < BaseOrigamiController
|
||||
@tables = Table.unscope(:order).all.active.order('status desc')
|
||||
@rooms = Room.unscope(:order).all.active.order('status desc')
|
||||
@complete = Sale.completed_sale("cashier")
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",DateTime.now.strftime('%Y-%m-%d')).order('date desc')
|
||||
@orders = Order.includes("sale_orders").where("DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status != 'billed' and source != 'quick_service'",Time.current.strftime('%Y-%m-%d')).order('date desc')
|
||||
@customers = Customer.pluck("customer_id, name")
|
||||
@sale = Sale.find(params[:sale_id])
|
||||
@order = SaleOrder.find_by_sale_id(@sale.sale_id).order_id
|
||||
@@ -31,7 +31,7 @@ class Origami::SalesController < BaseOrigamiController
|
||||
Sale.transaction do
|
||||
table = DiningFacility.find(dining)
|
||||
booking = table.current_checkin_booking
|
||||
|
||||
|
||||
sale = Sale.find(sale_id)
|
||||
existing = sale.booking
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class Origami::ShiftsController < BaseOrigamiController
|
||||
shift_id = params[:shift_id]
|
||||
@shift = ShiftSale.find_by_id(shift_id)
|
||||
if @shift
|
||||
@shift.shift_closed_at = DateTime.now.utc
|
||||
@shift.shift_closed_at = Time.current.utc
|
||||
@shift.closing_balance = closing_balance.to_f
|
||||
@shift.save
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ class Reports::StockCheckController < BaseReportController
|
||||
|
||||
def index
|
||||
|
||||
# from_date = DateTime.now.beginning_of_day
|
||||
# to_date = DateTime.now.end_of_day
|
||||
# from_date = Time.current.beginning_of_day
|
||||
# to_date = Time.current.end_of_day
|
||||
# unless params[:daterange].blank?
|
||||
# from_date = Date.parse(params[:daterange].split(' - ')[0]).beginning_of_day
|
||||
# to_date = Date.parse(params[:daterange].split(' - ')[1]).end_of_day
|
||||
|
||||
@@ -20,7 +20,7 @@ class Settings::OutOfStockController < ApplicationController
|
||||
}
|
||||
|
||||
item_instance = MenuItemInstance.where(item_instance_code: [items_arr])
|
||||
date = DateTime.now
|
||||
date = Time.current
|
||||
|
||||
unless item_instance.nil?
|
||||
if !item_instance.first.is_out_of_stock?
|
||||
|
||||
@@ -17,8 +17,8 @@ class Settings::PromotionsController < ApplicationController
|
||||
# GET /promotions/new
|
||||
def new
|
||||
@promotion = Promotion.new
|
||||
@promotion.promo_start_date = DateTime.now
|
||||
@promotion.promo_end_date = DateTime.now
|
||||
@promotion.promo_start_date = Time.current
|
||||
@promotion.promo_end_date = Time.current
|
||||
end
|
||||
|
||||
# GET /promotions/1/edit
|
||||
|
||||
@@ -5,31 +5,31 @@ class Transactions::CardSettleTransController < ApplicationController
|
||||
# GET /transactions/sales.json
|
||||
def index
|
||||
@status = [["All Status",''], ["Approved","Approved"], ["Declined","Declined"]]
|
||||
@payment_method = [["All Payments",''],["MPU Payment","mpu"], ["Visa & Master Payment","vmj"],
|
||||
["JCB Payment","jcb"],["UnionPay Payment","cup"],
|
||||
@payment_method = [["All Payments",''],["MPU Payment","mpu"], ["Visa & Master Payment","vmj"],
|
||||
["JCB Payment","jcb"],["UnionPay Payment","cup"],
|
||||
["Alipay Payment","alipay"]]
|
||||
@sales = Sale.all
|
||||
|
||||
payment_type = params[:payment_type]
|
||||
cashier_name = params[:cashier_name]
|
||||
status_type = params[:status_type]
|
||||
|
||||
|
||||
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
if cashier_name.nil? && from.nil? && to.nil? && payment_method.nil? && status_type.nil?
|
||||
|
||||
|
||||
@cardSettles = CardSettleTran.order("sale_id desc")
|
||||
|
||||
|
||||
@cardSettles = Kaminari.paginate_array(@cardSettles).page(params[:page]).per(20)
|
||||
else
|
||||
cardSettle = CardSettleTran.search(cashier_name,from,to,payment_type,status_type)
|
||||
if cardSettle.count > 0
|
||||
@cardSettles = cardSettle
|
||||
@cardSettles = cardSettle
|
||||
@cardSettles = Kaminari.paginate_array(@cardSettles).page(params[:page]).per(20)
|
||||
else
|
||||
@cardSettles = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@@ -49,51 +49,51 @@ class Transactions::CardSettleTransController < ApplicationController
|
||||
}
|
||||
|
||||
def get_date_range_from_params
|
||||
period_type = params[:period_type]
|
||||
period = params[:period]
|
||||
|
||||
if params[:from].present? && params[:to].present?
|
||||
from = Time.zone.parse(params[:from])
|
||||
to = Time.zone.parse(params[:to])
|
||||
else
|
||||
case period.to_i
|
||||
when PERIOD["today"]
|
||||
from = Time.current
|
||||
to = Time.current
|
||||
when PERIOD["yesterday"]
|
||||
from = 1.day.ago
|
||||
to = 1.day.ago
|
||||
when PERIOD["this_week"]
|
||||
from = Time.current.beginning_of_week
|
||||
to = Time.current
|
||||
when PERIOD["last_week"]
|
||||
from = 1.week.ago.beginning_of_week
|
||||
to = 1.week.ago.end_of_week
|
||||
when PERIOD["last_7"]
|
||||
from = 7.day.ago
|
||||
to = Time.current
|
||||
when PERIOD["this_month"]
|
||||
from = Time.current.beginning_of_month
|
||||
to = Time.current
|
||||
when PERIOD["last_month"]
|
||||
from = 1.month.ago.beginning_of_month
|
||||
to = 1.month.ago.end_of_month
|
||||
when PERIOD["last_30"]
|
||||
from = 30.day.ago
|
||||
to = Time.current
|
||||
when PERIOD["this_year"]
|
||||
from = Time.current.beginning_of_year
|
||||
to = Time.current
|
||||
when PERIOD["last_year"]
|
||||
from = 1.year.ago.beginning_of_year
|
||||
to = 1.year.ago.end_of_year
|
||||
end
|
||||
period_type = params[:period_type]
|
||||
period = params[:period]
|
||||
|
||||
if params[:from].present? && params[:to].present?
|
||||
from = Time.zone.parse(params[:from])
|
||||
to = Time.zone.parse(params[:to])
|
||||
else
|
||||
case period.to_i
|
||||
when PERIOD["today"]
|
||||
from = Time.current
|
||||
to = Time.current
|
||||
when PERIOD["yesterday"]
|
||||
from = 1.day.ago
|
||||
to = 1.day.ago
|
||||
when PERIOD["this_week"]
|
||||
from = Time.current.beginning_of_week
|
||||
to = Time.current
|
||||
when PERIOD["last_week"]
|
||||
from = 1.week.ago.beginning_of_week
|
||||
to = 1.week.ago.end_of_week
|
||||
when PERIOD["last_7"]
|
||||
from = 7.day.ago
|
||||
to = Time.current
|
||||
when PERIOD["this_month"]
|
||||
from = Time.current.beginning_of_month
|
||||
to = Time.current
|
||||
when PERIOD["last_month"]
|
||||
from = 1.month.ago.beginning_of_month
|
||||
to = 1.month.ago.end_of_month
|
||||
when PERIOD["last_30"]
|
||||
from = 30.day.ago
|
||||
to = Time.current
|
||||
when PERIOD["this_year"]
|
||||
from = Time.current.beginning_of_year
|
||||
to = Time.current
|
||||
when PERIOD["last_year"]
|
||||
from = 1.year.ago.beginning_of_year
|
||||
to = 1.year.ago.end_of_year
|
||||
end
|
||||
end
|
||||
|
||||
from = from.beginning_of_day
|
||||
to = to.end_of_day
|
||||
from = from.beginning_of_day
|
||||
to = to.end_of_day
|
||||
|
||||
return from, to
|
||||
return from, to
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -23,7 +23,7 @@ class CardSaleTran < ApplicationRecord
|
||||
|
||||
if from.present? && to.present?
|
||||
|
||||
# cardSale = CardSaleTran.where("DATE_FORMAT(req_date,'%Y-%m-%d') >= ?" + " AND DATE_FORMAT(req_date,'%Y-%m-%d') <= ? and status IS NULL ", from,to)
|
||||
# cardSale = CardSaleTran.where("DATE_FORMAT(CONVERT_TZ(req_date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') >= ?" + " AND DATE_FORMAT(CONVERT_TZ(req_date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') <= ? and status IS NULL ", from,to)
|
||||
from_date = from.strftime("%Y-%m-%d")
|
||||
to_date = to.strftime("%Y-%m-%d")
|
||||
query = CardSaleTran.joins("Join sales s ON s.sale_id = card_sale_trans.sale_id"+
|
||||
@@ -48,7 +48,7 @@ class CardSaleTran < ApplicationRecord
|
||||
|
||||
query = CardSaleTran.joins("Join sales s ON s.sale_id = card_sale_trans.sale_id"+
|
||||
" JOIN customers c ON c.customer_id = s.customer_id")
|
||||
cardSale = query.where("DATE_FORMAT(req_date,'%Y-%m-%d') >= ? and DATE_FORMAT(req_date,'%Y-%m-%d') <= ? and status = 'Approved'",from,to)
|
||||
cardSale = query.where("DATE_FORMAT(CONVERT_TZ(req_date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') >= ? and DATE_FORMAT(CONVERT_TZ(req_date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') <= ? and status = 'Approved'",from,to)
|
||||
|
||||
if shift.present?
|
||||
query1 = cardSale.where("s.shift_sale_id in (?)", shift.to_a)
|
||||
@@ -63,8 +63,8 @@ class CardSaleTran < ApplicationRecord
|
||||
end
|
||||
|
||||
def self.get_by_shift_sale_by_card(from,to,status)
|
||||
query = ShiftSale.select("shift_sales.id ,shift_started_at AS opening_date,
|
||||
shift_closed_at As closing_date,")
|
||||
query = ShiftSale.select("shift_sales.id ,shift_started_at,
|
||||
shift_closed_at,")
|
||||
.order("shift_sales.id DESC")
|
||||
return query = query.where("shift_sales.shift_started_at >= ?" , from)
|
||||
end
|
||||
|
||||
@@ -25,7 +25,7 @@ class CardSettleTran < ApplicationRecord
|
||||
|
||||
query = CardSettleTran.joins("Join shift_sales ss ON ss.id = card_settle_trans.shift_sale_id"+
|
||||
" JOIN employees e ON e.id = ss.employee_id")
|
||||
cardSettle = query.where("DATE_FORMAT(req_date,'%Y-%m-%d') >= ? and DATE_FORMAT(req_date,'%Y-%m-%d') <= ?",from,to)
|
||||
cardSettle = query.where("DATE_FORMAT(CONVERT_TZ(req_date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') >= ? and DATE_FORMAT(CONVERT_TZ(req_date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') <= ?",from,to)
|
||||
query1 = cardSettle.where(keyword)
|
||||
query2 = query1.where(payment)
|
||||
query3 = query2.where(status)
|
||||
@@ -45,14 +45,14 @@ class CardSettleTran < ApplicationRecord
|
||||
|
||||
query = CardSettleTran.joins("Join shift_sales ss ON ss.id = card_settle_trans.shift_sale_id"+
|
||||
" JOIN employees e ON e.id = ss.employee_id")
|
||||
cardSettle = query.where("DATE_FORMAT(req_date,'%Y-%m-%d') >= ? and DATE_FORMAT(req_date,'%Y-%m-%d') <= ? and status = 'Approved'",from,to)
|
||||
cardSettle = query.where("DATE_FORMAT(CONVERT_TZ(req_date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') >= ? and DATE_FORMAT(CONVERT_TZ(req_date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') <= ? and status = 'Approved'",from,to)
|
||||
|
||||
if shift.present?
|
||||
query1 = cardSettle.where("ss.id in (?)", shift.to_a)
|
||||
elsif shift_sale_range.present?
|
||||
query1 = cardSettle.where("ss.id in (?)",shift_sale_range.to_a)
|
||||
else
|
||||
query1 = cardSettle.where("DATE_FORMAT(req_date,'%Y-%m-%d') between ? and ?",from,to)
|
||||
query1 = cardSettle.where("DATE_FORMAT(CONVERT_TZ(req_date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') between ? and ?",from,to)
|
||||
end
|
||||
query2 = query1.where(payment)
|
||||
|
||||
@@ -60,8 +60,8 @@ class CardSettleTran < ApplicationRecord
|
||||
end
|
||||
|
||||
def self.get_by_shift_sale_by_card(from,to,status)
|
||||
query = ShiftSale.select("shift_sales.id ,shift_started_at AS opening_date,
|
||||
shift_closed_at As closing_date,")
|
||||
query = ShiftSale.select("shift_sales.id ,shift_started_at,
|
||||
shift_closed_at,")
|
||||
.order("shift_sales.id DESC")
|
||||
return query = query.where("shift_sales.shift_started_at >= ?" , from)
|
||||
end
|
||||
|
||||
@@ -24,7 +24,7 @@ class Customer < ApplicationRecord
|
||||
self.contact_no = params[:phone_number]
|
||||
self.email = pin.to_s + "@gmail.com"
|
||||
self.pin_code = pin.to_s
|
||||
self.pin_sent_at = Time.now
|
||||
self.pin_sent_at = Time.current
|
||||
tax_profiles=TaxProfile.where(group_type: "online_order")
|
||||
tax_ids =[]
|
||||
tax_profiles.each {|tax| tax_ids << "#{tax.id}"}
|
||||
@@ -33,7 +33,7 @@ class Customer < ApplicationRecord
|
||||
return self
|
||||
else
|
||||
cus.pin_code = pin
|
||||
cus.pin_sent_at = Time.now
|
||||
cus.pin_sent_at = Time.current
|
||||
cus.save
|
||||
return cus
|
||||
end
|
||||
@@ -389,7 +389,7 @@ class Customer < ApplicationRecord
|
||||
def self.search(search)
|
||||
if search
|
||||
# find(:all, :conditions => ['name LIKE ? OR contact_no LIKE ?', "%#{search}%", "%#{search}%"])
|
||||
where("name LIKE ? OR customer_type LIKE ? OR contact_no LIKE ? OR card_no LIKE ? OR DATE_FORMAT(date_of_birth,'%Y-%m-%d') LIKE ? OR nrc_no LIKE ? OR gender LIKE ? OR paypar_account_no ='#{search}'", "%#{search}%", "%#{search}%", "%#{search}%", "%#{search}%", "%#{search}%", "%#{search}%", "%#{search}%")
|
||||
where("name LIKE ? OR customer_type LIKE ? OR contact_no LIKE ? OR card_no LIKE ? OR DATE_FORMAT(CONVERT_TZ(date_of_birth,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') LIKE ? OR nrc_no LIKE ? OR gender LIKE ? OR paypar_account_no ='#{search}'", "%#{search}%", "%#{search}%", "%#{search}%", "%#{search}%", "%#{search}%", "%#{search}%", "%#{search}%")
|
||||
else
|
||||
find(:all)
|
||||
end
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
class DiningQueue < ApplicationRecord
|
||||
belongs_to :dining_facility, :optional => true
|
||||
def self.generate_queue_no
|
||||
today = DateTime.now.strftime('%Y-%m-%d')
|
||||
dining_queues = DiningQueue.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? ", today).order("queue_no desc")
|
||||
today = Time.current.strftime('%Y-%m-%d')
|
||||
dining_queues = DiningQueue.where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? ", today).order("queue_no desc")
|
||||
queue_no = dining_queues.count + 1
|
||||
return queue_no
|
||||
end
|
||||
|
||||
@@ -36,8 +36,8 @@ class Employee < ApplicationRecord
|
||||
#user.authenticate(password)
|
||||
if (user.authenticate(password))
|
||||
user.generate_token
|
||||
user.session_expiry = DateTime.now.utc + expiry_time.minutes
|
||||
user.session_last_login = DateTime.now.utc
|
||||
user.session_expiry = Time.now + expiry_time.minutes
|
||||
user.session_last_login = Time.now
|
||||
user.save
|
||||
return user
|
||||
end
|
||||
@@ -50,7 +50,7 @@ class Employee < ApplicationRecord
|
||||
user = Employee.find_by_token_session(session_token)
|
||||
expiry_time = login_expiry_time
|
||||
|
||||
if user && user.session_expiry && user.session_expiry.utc > DateTime.now.utc
|
||||
if user && user.session_expiry && user.session_expiry.utc > Time.current.utc
|
||||
#Extend the login time each time authenticatation take place
|
||||
user.session_expiry = user.session_expiry.utc + expiry_time.minutes
|
||||
user.save
|
||||
|
||||
@@ -7,7 +7,7 @@ class KbzPay
|
||||
prefix = shop.shop_code
|
||||
receipt_no = "#{prefix}#{receipt_no}"
|
||||
|
||||
datetime = DateTime.now.strftime("%d%m%Y%H%M")
|
||||
datetime = Time.current.strftime("%d%m%Y%H%M")
|
||||
kbz_app_id = app_id
|
||||
kbz_merch_code = code
|
||||
kbz_api_key = key
|
||||
@@ -66,7 +66,7 @@ class KbzPay
|
||||
prefix = shop.shop_code
|
||||
receipt_no = "#{prefix}#{receipt_no}"
|
||||
amount = 0
|
||||
datetime = DateTime.now.strftime("%d%m%Y%H%M")
|
||||
datetime = Time.current.strftime("%d%m%Y%H%M")
|
||||
kbz_app_id = app_id
|
||||
kbz_merch_code = code
|
||||
kbz_api_key = key
|
||||
|
||||
@@ -10,7 +10,7 @@ class Menu < ApplicationRecord
|
||||
scope :active, -> {where("is_active = true")}
|
||||
|
||||
def self.current_menu
|
||||
today = DateTime.now
|
||||
today = Time.current
|
||||
day_of_week = today.wday
|
||||
menus = Menu.where("is_active = true and '#{today.strftime("%H:%M")}' between TIME(valid_time_from) and TIME(valid_time_to)")
|
||||
current_menu = nil
|
||||
|
||||
@@ -13,7 +13,7 @@ class Order < ApplicationRecord
|
||||
|
||||
#internal references attributes for business logic control
|
||||
attr_accessor :items, :guest, :table_id, :new_booking, :booking_type, :employee_name, :booking_id, :extra_time, :is_extra_time
|
||||
scope :active, -> { where("date BETWEEN '#{DateTime.now.utc.end_of_day}' AND '#{DateTime.now.utc.beginning_of_day}'") }
|
||||
scope :active, -> { where("date BETWEEN '#{Time.current.utc.end_of_day}' AND '#{Time.current.utc.beginning_of_day}'") }
|
||||
#Main Controller method to create new order - validate all inputs and generate new order
|
||||
# order_item : {
|
||||
# order_item_code : "",
|
||||
|
||||
@@ -20,7 +20,8 @@ class OrderItem < ApplicationRecord
|
||||
# after_save :add_to_journal, if: Proc.new { !self.id_changed? }
|
||||
# after_save :update_stock_journal, if: Proc.new { self.id_changed? }
|
||||
|
||||
|
||||
alias_attribute :order_at, :created_at
|
||||
alias_attribute :order_by, :item_order_by
|
||||
|
||||
#This Method - handle how items is added into order
|
||||
# order_item : {
|
||||
|
||||
@@ -182,7 +182,7 @@ class OrderQueueStation < ApplicationRecord
|
||||
@to = (DiningFacility.find(change_to)).name
|
||||
@type = (DiningFacility.find(change_to)).type
|
||||
@moved_by = current_user
|
||||
@date = DateTime.now
|
||||
@date = Time.current
|
||||
|
||||
@shop = Shop.current_shop
|
||||
unique_code = "MoveTablePdf"
|
||||
|
||||
@@ -7,7 +7,7 @@ class OrderReservation < ApplicationRecord
|
||||
has_many :order_reservation_items
|
||||
has_one :delivery
|
||||
|
||||
scope :active, -> { where("created_at BETWEEN '#{DateTime.now.utc.beginning_of_day}' AND '#{DateTime.now.utc.end_of_day}'") }
|
||||
scope :active, -> { where("created_at BETWEEN '#{Time.current.beginning_of_day.utc}' AND '#{Time.current.end_of_day.utc}'") }
|
||||
scope :latest_order, -> { order("order_reservation_id desc, created_at desc") }
|
||||
|
||||
SEND_TO_KITCHEN = "send_to_kitchen"
|
||||
@@ -158,7 +158,7 @@ class OrderReservation < ApplicationRecord
|
||||
if(Sale.exists?(order.sale_id))
|
||||
saleObj = Sale.find(order.sale_id)
|
||||
|
||||
shop_details = Shop.current_shop
|
||||
shop_details = Shop.current_shop
|
||||
# rounding adjustment
|
||||
if shop_details.is_rounding_adj
|
||||
a = saleObj.grand_total % 25 # Modulus
|
||||
@@ -311,18 +311,18 @@ class OrderReservation < ApplicationRecord
|
||||
end
|
||||
|
||||
if status == "accepted"
|
||||
action_times = {"accepted_time" => DateTime.now.utc, "kitchen_time" => "", "ready_time" => ""}
|
||||
action_times = {"accepted_time" => Time.now.utc, "kitchen_time" => "", "ready_time" => ""}
|
||||
order_reservation.action_times = action_times.to_json
|
||||
elsif status == SEND_TO_KITCHEN
|
||||
if !order_reservation.action_times.nil?
|
||||
action_data = JSON.parse(order_reservation.action_times)
|
||||
action_data["kitchen_time"] = DateTime.now.utc
|
||||
action_data["kitchen_time"] = Time.now.utc
|
||||
order_reservation.action_times = action_data.to_json
|
||||
end
|
||||
elsif status == READY_TO_DELIVERY
|
||||
if !order_reservation.action_times.nil?
|
||||
action_data = JSON.parse(order_reservation.action_times)
|
||||
action_data["ready_time"] = DateTime.now.utc
|
||||
action_data["ready_time"] = Time.now.utc
|
||||
order_reservation.action_times = action_data.to_json
|
||||
end
|
||||
end
|
||||
@@ -391,7 +391,7 @@ class OrderReservation < ApplicationRecord
|
||||
|
||||
def self.get_count_on_completed
|
||||
order_reservation = OrderReservation.select("COUNT(order_reservation_id) as count")
|
||||
.where("created_at BETWEEN '#{DateTime.now.beginning_of_day}' AND '#{DateTime.now.end_of_day}' AND status = 'delivered'").first()
|
||||
.where("created_at BETWEEN '#{Time.current.beginning_of_day.utc}' AND '#{Time.current.end_of_day.utc}' AND status = 'delivered'").first()
|
||||
end
|
||||
|
||||
def self.get_pending_orders
|
||||
@@ -426,7 +426,7 @@ class OrderReservation < ApplicationRecord
|
||||
else
|
||||
shop_code = ''
|
||||
end
|
||||
order_reservation = OrderReservation.where("status='accepted' and requested_time <= '#{Time.current.utc}'")
|
||||
order_reservation = OrderReservation.where("status='accepted' and requested_time <= '#{Time.now.utc}'")
|
||||
if order_reservation.length > 0
|
||||
if ENV["SERVER_MODE"] == 'cloud'
|
||||
from = request.subdomain + "." + request.domain
|
||||
@@ -444,7 +444,7 @@ class OrderReservation < ApplicationRecord
|
||||
else
|
||||
shop_code = ''
|
||||
end
|
||||
order_reservation = OrderReservation.where("status='send_to_kitchen' and requested_time <= '#{Time.current.utc}'")
|
||||
order_reservation = OrderReservation.where("status='send_to_kitchen' and requested_time <= '#{Time.now.utc}'")
|
||||
if order_reservation.length > 0
|
||||
if ENV["SERVER_MODE"] == 'cloud'
|
||||
from = request.subdomain + "." + request.domain
|
||||
|
||||
@@ -22,7 +22,7 @@ class PaymentJournal < ApplicationRecord
|
||||
|
||||
# def self.today_cash_in(current_user)
|
||||
# credit = 0.0
|
||||
# today_date = DateTime.now.strftime("%Y-%m-%d")
|
||||
# today_date = Time.current.strftime("%Y-%m-%d")
|
||||
# pj_credit = PaymentJournal.where("TO_CHAR(created_at, 'YYYY-MM-DD')=? and created_by=?",today_date, current_user)
|
||||
# pj_credit.each do |obj|
|
||||
# credit += obj.credit_amount
|
||||
@@ -32,7 +32,7 @@ class PaymentJournal < ApplicationRecord
|
||||
#
|
||||
# def self.today_cash_out(current_user)
|
||||
# debit = 0.0
|
||||
# today_date = DateTime.now.strftime("%Y-%m-%d")
|
||||
# today_date = Time.current.strftime("%Y-%m-%d")
|
||||
# pj_debit = PaymentJournal.where("TO_CHAR(created_at, 'YYYY-MM-DD')=? and created_by=?",today_date, current_user)
|
||||
# pj_debit.each do |obj|
|
||||
# debit += obj.debit_amount
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class Printer::CashierStationPrinter < Printer::PrinterWorker
|
||||
|
||||
def print_open_cashier(receipt_no)
|
||||
time = DateTime.now
|
||||
time = Time.current
|
||||
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
@@ -17,7 +17,7 @@ class Printer::CashierStationPrinter < Printer::PrinterWorker
|
||||
# def print_close_cashier(receipt_no)
|
||||
# #Use CUPS service
|
||||
# #Generate PDF
|
||||
# time = DateTime.now
|
||||
# time = Time.current
|
||||
# #Print
|
||||
# pdf = CashierStationClosing.new
|
||||
# pdf.render_file "tmp/cashier_station_#{order_id}_closing_#{time}.pdf"
|
||||
|
||||
@@ -150,7 +150,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
# Query for OQS with status
|
||||
def print_query(type, id)
|
||||
if type == "order_item"
|
||||
OrderItem.select("orders.source,cus.contact_no,order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining, item.alt_name as alt_name")
|
||||
OrderItem.select("orders.source,cus.contact_no,order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by, order_items.created_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining, item.alt_name as alt_name")
|
||||
.joins("left join orders ON orders.order_id = order_items.order_id
|
||||
left join booking_orders AS bo ON bo.order_id=order_items.order_id
|
||||
left join bookings AS b ON b.booking_id = bo.booking_id
|
||||
@@ -160,7 +160,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
.where("order_items.order_items_id = '#{ id }'")
|
||||
.group("order_items.item_code")
|
||||
elsif type == "order_summary"
|
||||
OrderItem.select("orders.source,cus.contact_no,order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining, item.alt_name as alt_name")
|
||||
OrderItem.select("orders.source,cus.contact_no,order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by, order_items.created_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining, item.alt_name as alt_name")
|
||||
.joins("left join orders ON orders.order_id = order_items.order_id
|
||||
left join booking_orders AS bo ON bo.order_id=order_items.order_id
|
||||
left join bookings AS b ON b.booking_id = bo.booking_id
|
||||
@@ -171,7 +171,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
.group("order_items.order_items_id")
|
||||
else
|
||||
# order summary for booking
|
||||
OrderItem.select("orders.source,cus.contact_no,order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining, item.alt_name as alt_name")
|
||||
OrderItem.select("orders.source,cus.contact_no,order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by, order_items.created_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining, item.alt_name as alt_name")
|
||||
.joins("left join orders ON orders.order_id = order_items.order_id
|
||||
left join booking_orders AS bo ON bo.order_id=order_items.order_id
|
||||
left join bookings AS b ON b.booking_id = bo.booking_id
|
||||
|
||||
@@ -31,7 +31,7 @@ class Promotion < ApplicationRecord
|
||||
end
|
||||
|
||||
def self.is_between_promo_datetime(current_day,current_time) #database is not local time
|
||||
promoList = Promotion.where("(Date_Format(promo_start_date, '%Y-%m-%d') <=? AND Date_Format(promo_end_date, '%Y-%m-%d') >=?) AND (promo_start_hour < ? AND promo_end_hour > ?)", current_day, current_day, current_time, current_time)
|
||||
promoList = Promotion.where("(Date_Format(CONVERT_TZ(promo_start_date, '+00:00', Time.zone.formatted_offset), '%Y-%m-%d') <=? AND Date_Format(CONVERT_TZ(promo_start_date, '+00:00', Time.zone.formatted_offset), '%Y-%m-%d') >=?) AND (promo_start_hour < ? AND promo_end_hour > ?)", current_day, current_day, current_time, current_time)
|
||||
return promoList
|
||||
end
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ class Reservation < ApplicationRecord
|
||||
|
||||
has_many :reservation_items
|
||||
|
||||
scope :active, -> { where("created_at BETWEEN '#{DateTime.now.utc.beginning_of_day}' AND '#{DateTime.now.utc.end_of_day}'") }
|
||||
scope :active, -> { where("created_at BETWEEN '#{Time.current.utc.beginning_of_day}' AND '#{Time.current.utc.end_of_day}'") }
|
||||
|
||||
private
|
||||
def generate_custom_id
|
||||
|
||||
@@ -29,8 +29,8 @@ class Sale < ApplicationRecord
|
||||
before_save :round_to_precision
|
||||
after_update :update_stock_journal
|
||||
|
||||
scope :open_invoices, -> { where("sale_status = 'new' and receipt_date BETWEEN '#{DateTime.now.utc.end_of_day}' AND '#{DateTime.now.utc.beginning_of_day}'") }
|
||||
scope :complete_sale, -> { where("sale_status = 'completed' and receipt_date BETWEEN '#{DateTime.now.utc.beginning_of_day}' AND '#{DateTime.now.utc.end_of_day}'") }
|
||||
scope :open_invoices, -> { where("sale_status = 'new' and receipt_date BETWEEN '#{Time.current.utc.end_of_day}' AND '#{Time.current.utc.beginning_of_day}'") }
|
||||
scope :complete_sale, -> { where("sale_status = 'completed' and receipt_date BETWEEN '#{Time.current.utc.beginning_of_day}' AND '#{Time.current.utc.end_of_day}'") }
|
||||
scope :paid, -> { where(payment_status: 'paid')}
|
||||
scope :completed, -> { where(sale_status: 'completed') }
|
||||
|
||||
@@ -202,7 +202,7 @@ class Sale < ApplicationRecord
|
||||
def generate_invoice_by_items (items, requested_by)
|
||||
taxable = true
|
||||
self.requested_by = requested_by
|
||||
self.requested_at = DateTime.now
|
||||
self.requested_at = Time.current
|
||||
|
||||
items.each do |item|
|
||||
add_item(item)
|
||||
@@ -658,7 +658,7 @@ class Sale < ApplicationRecord
|
||||
# SaleOrder.create(:sale_id => self.id, :order_id => order_id)
|
||||
# end
|
||||
#dosomrting here
|
||||
#puts Time.now.format(":short")
|
||||
#puts Time.current.format(":short")
|
||||
end
|
||||
|
||||
def adjust_rounding
|
||||
@@ -707,7 +707,7 @@ class Sale < ApplicationRecord
|
||||
shop_details = Shop.current_shop
|
||||
#Date-Shift-
|
||||
if self.receipt_no.nil?
|
||||
prefix = DateTime.now().utc
|
||||
prefix = Time.current().utc
|
||||
#self.receipt_no = prefix.to_s + "/" + self.shit_id.to_s + "/" + SeedGenerator.new_receipt_no().to_s
|
||||
new_receipt_no = SeedGenerator.new_receipt_no().to_s
|
||||
|
||||
@@ -897,8 +897,8 @@ def self.get_by_shiftsales(from,to,shift)
|
||||
end
|
||||
|
||||
def self.get_by_shift_sale(from,to,status)
|
||||
query = ShiftSale.select("shift_sales.id ,shift_started_at AS opening_date,
|
||||
shift_closed_at As closing_date," +
|
||||
query = ShiftSale.select("shift_sales.id ,shift_started_at,
|
||||
shift_closed_at," +
|
||||
" grand_total AS grand_total, cash_sales AS cash," +
|
||||
"total_taxes AS total_tax,total_discounts As total_discount")
|
||||
.order("shift_sales.id DESC")
|
||||
@@ -906,8 +906,8 @@ def self.get_by_shift_sale(from,to,status)
|
||||
end
|
||||
|
||||
def self.get_by_shift_sale_by_item(from,to,status)
|
||||
query = ShiftSale.select("shift_sales.id ,shift_started_at AS opening_date,
|
||||
shift_closed_at As closing_date," +
|
||||
query = ShiftSale.select("shift_sales.id ,shift_started_at,
|
||||
shift_closed_at," +
|
||||
" grand_total AS grand_total, cash_sales AS cash," +
|
||||
"total_taxes AS total_tax,total_discounts As total_discount")
|
||||
.order("shift_sales.id DESC")
|
||||
|
||||
@@ -35,7 +35,7 @@ class SaleAudit < ApplicationRecord
|
||||
sale_audit = SaleAudit.new()
|
||||
sale_audit.sale_id = sale_id
|
||||
sale_audit.action = "SALEVOID"
|
||||
sale_audit.action_at = DateTime.now.utc
|
||||
sale_audit.action_at = Time.current.utc
|
||||
sale_audit.action_by = void_by
|
||||
sale_audit.approved_by = approved_by
|
||||
sale_audit.remark = reason
|
||||
@@ -47,7 +47,7 @@ class SaleAudit < ApplicationRecord
|
||||
sale_audit = SaleAudit.new()
|
||||
sale_audit.sale_id = sale_id
|
||||
sale_audit.action = "SALECOMPLETE"
|
||||
sale_audit.action_at = DateTime.now.utc
|
||||
sale_audit.action_at = Time.current.utc
|
||||
sale_audit.action_by = Sale.find(sale_id).cashier_id
|
||||
sale_audit.remark = remark
|
||||
sale_audit.approved_by = action_by
|
||||
@@ -59,7 +59,7 @@ class SaleAudit < ApplicationRecord
|
||||
sale_audit = SaleAudit.new()
|
||||
sale_audit.sale_id = sale_id
|
||||
sale_audit.action = type
|
||||
sale_audit.action_at = DateTime.now.utc
|
||||
sale_audit.action_at = Time.current.utc
|
||||
sale_audit.action_by = discount_by
|
||||
sale_audit.approved_by = approved_by
|
||||
sale_audit.remark = reason
|
||||
@@ -72,7 +72,7 @@ class SaleAudit < ApplicationRecord
|
||||
sale_audit = SaleAudit.new()
|
||||
sale_audit.sale_id = sale_id
|
||||
sale_audit.action = "SALEFOC"
|
||||
sale_audit.action_at = DateTime.now.utc
|
||||
sale_audit.action_at = Time.current.utc
|
||||
sale_audit.action_by = cashier_id
|
||||
sale_audit.approved_by = approved_by
|
||||
sale_audit.remark = reason
|
||||
@@ -84,7 +84,7 @@ class SaleAudit < ApplicationRecord
|
||||
sale_audit = SaleAudit.new()
|
||||
sale_audit.sale_id = sale_id
|
||||
sale_audit.action = type
|
||||
sale_audit.action_at = DateTime.now.utc
|
||||
sale_audit.action_at = Time.current.utc
|
||||
sale_audit.action_by = cashier_id
|
||||
sale_audit.approved_by = approved_by
|
||||
sale_audit.remark = reason
|
||||
@@ -95,7 +95,7 @@ class SaleAudit < ApplicationRecord
|
||||
sale_audit = SaleAudit.new()
|
||||
sale_audit.sale_id = sale_id
|
||||
sale_audit.action = "SALEPAYMENT"
|
||||
sale_audit.action_at = DateTime.now.utc
|
||||
sale_audit.action_at = Time.current.utc
|
||||
sale_audit.action_by = action_by
|
||||
sale_audit.remark = remark
|
||||
sale_audit.approved_by = action_by
|
||||
@@ -106,7 +106,7 @@ class SaleAudit < ApplicationRecord
|
||||
sale_audit = SaleAudit.new()
|
||||
sale_audit.sale_id = sale_id
|
||||
sale_audit.action = "PAYMAL"
|
||||
sale_audit.action_at = DateTime.now.utc
|
||||
sale_audit.action_at = Time.current.utc
|
||||
sale_audit.action_by = Sale.find(sale_id).cashier_id
|
||||
sale_audit.remark = remark
|
||||
sale_audit.approved_by = action_by
|
||||
@@ -117,7 +117,7 @@ class SaleAudit < ApplicationRecord
|
||||
sale_audit = SaleAudit.new()
|
||||
sale_audit.sale_id = sale_id
|
||||
sale_audit.action = type
|
||||
sale_audit.action_at = DateTime.now.utc
|
||||
sale_audit.action_at = Time.current.utc
|
||||
sale_audit.action_by = action_by
|
||||
sale_audit.remark = remark
|
||||
sale_audit.approved_by = action_by
|
||||
@@ -128,7 +128,7 @@ class SaleAudit < ApplicationRecord
|
||||
sale_audit = SaleAudit.new()
|
||||
sale_audit.sale_id = sale_id
|
||||
sale_audit.action = "CHANGE_TAX"
|
||||
sale_audit.action_at = DateTime.now.utc
|
||||
sale_audit.action_at = Time.current.utc
|
||||
sale_audit.action_by = action_by
|
||||
sale_audit.remark = remark
|
||||
sale_audit.approved_by = action_by
|
||||
|
||||
@@ -17,8 +17,11 @@ class ShiftSale < ApplicationRecord
|
||||
belongs_to :employee, :foreign_key => 'employee_id'
|
||||
has_many :sales
|
||||
|
||||
alias_attribute :opening_date, :shift_started_at
|
||||
alias_attribute :closing_date, :shift_closed_at
|
||||
|
||||
def self.current_shift
|
||||
# today_date = DateTime.now.strftime("%Y-%m-%d")
|
||||
# today_date = Time.current.strftime("%Y-%m-%d")
|
||||
shift = ShiftSale.where.not(shift_started_at: nil).where(shift_closed_at: nil).first
|
||||
return shift
|
||||
end
|
||||
@@ -27,7 +30,7 @@ class ShiftSale < ApplicationRecord
|
||||
#if current_user
|
||||
#find open shift where is open today and is not closed and login by current cashier
|
||||
#DATE(shift_started_at)=? and
|
||||
today_date = DateTime.now.strftime("%Y-%m-%d")
|
||||
today_date = Time.current.strftime("%Y-%m-%d")
|
||||
shift = ShiftSale.where("shift_started_at is not null and shift_closed_at is null and employee_id = ?", current_user).take
|
||||
return shift
|
||||
#end
|
||||
@@ -80,7 +83,7 @@ class ShiftSale < ApplicationRecord
|
||||
|
||||
def create(opening_balance,cashier_terminal, current_user)
|
||||
self.cashier_terminal_id = cashier_terminal
|
||||
self.shift_started_at = DateTime.now
|
||||
self.shift_started_at = Time.current
|
||||
self.employee_id = current_user.id
|
||||
self.opening_balance = opening_balance
|
||||
self.other_sales = 0
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<!-- Footer -->
|
||||
<div class="legal">
|
||||
<div class="copyright">
|
||||
© <%= Time.now.strftime("%Y") %> <a href="javascript:void(0);">Code2Lab</a>.
|
||||
© <%= Time.current.strftime("%Y") %> <a href="javascript:void(0);">Code2Lab</a>.
|
||||
</div>
|
||||
<div class="version">
|
||||
<b>Version: </b> 1.0.1
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
<%= @table.name %>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<label>Commissioner Name:</label>
|
||||
<%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %><br/><br/>
|
||||
<label>In time</label>
|
||||
<%= f.text_field :in_time, :value=>DateTime.now.strftime("%Y-%m-%d / %I:%M %p"),:class=>"form-control datepicker"%><br/>
|
||||
<%= f.text_field :in_time, :value=>Time.current.strftime("%Y-%m-%d / %I:%M %p"),:class=>"form-control datepicker"%><br/>
|
||||
<label>Out time</label>
|
||||
<%= f.text_field :out_time, :value=>DateTime.now.strftime("%Y-%m-%d / %I:%M %p"),:class=>"form-control datepicker"%>
|
||||
<%= f.text_field :out_time, :value=>Time.current.strftime("%Y-%m-%d / %I:%M %p"),:class=>"form-control datepicker"%>
|
||||
</div><br>
|
||||
<div class="form-actions">
|
||||
<div class='row'>
|
||||
@@ -66,4 +66,4 @@ $(function() {
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
<tbody>
|
||||
<% i=1
|
||||
@order.each do |order| %>
|
||||
<% if order.status == 'delivered' && (order.created_at.strftime("%Y-%m-%d") == DateTime.now.strftime("%Y-%m-%d")) && !order.delivery.nil? %>
|
||||
<% if order.status == 'delivered' && (order.created_at.strftime("%Y-%m-%d") == Time.current.strftime("%Y-%m-%d")) && !order.delivery.nil? %>
|
||||
<tr class="custom-tr fifth-<%=i%>" style="" data-id="<%=order.order_reservation_id%>" data-sr-no="<%= i %>">
|
||||
<td width ="5%" class="align-left">
|
||||
<%=i%>
|
||||
|
||||
38
install
38
install
@@ -4233,7 +4233,7 @@ Processing by Origami::HomeController#index as HTML
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mRoom Load (0.5ms)[0m [1m[34mSELECT `dining_facilities`.* FROM `dining_facilities` WHERE `dining_facilities`.`type` IN ('Room') AND `dining_facilities`.`is_active` = 1 ORDER BY status desc[0m
|
||||
[1m[36mOrder Load (0.5ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(date,'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mOrder Load (0.5ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mCACHE Employee Load (0.0ms)[0m [1m[34mSELECT `employees`.* FROM `employees` WHERE `employees`.`token_session` = '20e3649ff22a629a733f' LIMIT 1[0m [["token_session", "20e3649ff22a629a733f"], ["LIMIT", 1]]
|
||||
[1m[36mCACHE Employee Load (0.0ms)[0m [1m[34mSELECT `employees`.* FROM `employees` WHERE `employees`.`token_session` = '20e3649ff22a629a733f' LIMIT 1[0m [["token_session", "20e3649ff22a629a733f"], ["LIMIT", 1]]
|
||||
[1m[36mCACHE Employee Load (0.0ms)[0m [1m[34mSELECT `employees`.* FROM `employees` WHERE `employees`.`token_session` = '20e3649ff22a629a733f' LIMIT 1[0m [["token_session", "20e3649ff22a629a733f"], ["LIMIT", 1]]
|
||||
@@ -4351,7 +4351,7 @@ Processing by Origami::HomeController#show as HTML
|
||||
[1m[36mShiftSale Load (1.1ms)[0m [1m[34mSELECT `shift_sales`.* FROM `shift_sales` WHERE (shift_started_at is not null and shift_closed_at is null and employee_id = 7) LIMIT 1[0m
|
||||
[1m[36mShop Load (0.5ms)[0m [1m[34mSELECT `shops`.* FROM `shops` ORDER BY `shops`.`id` ASC LIMIT 1[0m
|
||||
[1m[36mMembershipSetting Load (0.5ms)[0m [1m[34mSELECT `membership_settings`.* FROM `membership_settings` WHERE `membership_settings`.`id` = 1 LIMIT 1[0m
|
||||
[1m[36mBooking Load (1.8ms)[0m [1m[34mSELECT `bookings`.* FROM `bookings` WHERE `bookings`.`dining_facility_id` = 29 AND (booking_status != 'moved') AND (DATE_FORMAT(created_at,'%Y-%m-%d') = '2019-04-22' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '2019-04-21' )[0m
|
||||
[1m[36mBooking Load (1.8ms)[0m [1m[34mSELECT `bookings`.* FROM `bookings` WHERE `bookings`.`dining_facility_id` = 29 AND (booking_status != 'moved') AND (DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' OR DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-21' )[0m
|
||||
[1m[36mLookup Load (0.3ms)[0m [1m[34mSELECT name, value FROM `lookups` WHERE `lookups`.`lookup_type` = 'checkout_time'[0m
|
||||
[1m[36mLookup Load (0.3ms)[0m [1m[34mSELECT name, value FROM `lookups` WHERE `lookups`.`lookup_type` = 'checkout_alert_time'[0m
|
||||
[1m[36mTaxProfile Load (0.5ms)[0m [1m[34mSELECT `tax_profiles`.* FROM `tax_profiles` WHERE (group_type = 'cashier') ORDER BY order_by asc, order_by ASC[0m
|
||||
@@ -4437,7 +4437,7 @@ Processing by Origami::HomeController#show as HTML
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mRoom Load (0.5ms)[0m [1m[34mSELECT `dining_facilities`.* FROM `dining_facilities` WHERE `dining_facilities`.`type` IN ('Room') AND `dining_facilities`.`is_active` = 1 ORDER BY status desc[0m
|
||||
[1m[36mOrder Load (0.6ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(date,'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mOrder Load (0.6ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mPaymentMethodSetting Load (0.4ms)[0m [1m[34mSELECT `payment_method_settings`.* FROM `payment_method_settings`[0m
|
||||
Rendered origami/home/show.html.erb within layouts/origami (438.3ms)
|
||||
[1m[36mCACHE Employee Load (0.0ms)[0m [1m[34mSELECT `employees`.* FROM `employees` WHERE `employees`.`token_session` = '20e3649ff22a629a733f' LIMIT 1[0m [["token_session", "20e3649ff22a629a733f"], ["LIMIT", 1]]
|
||||
@@ -5358,7 +5358,7 @@ Processing by Origami::HomeController#index as HTML
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mRoom Load (0.3ms)[0m [1m[34mSELECT `dining_facilities`.* FROM `dining_facilities` WHERE `dining_facilities`.`type` IN ('Room') AND `dining_facilities`.`is_active` = 1 ORDER BY status desc[0m
|
||||
[1m[36mOrder Load (0.4ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(date,'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mOrder Load (0.4ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mSaleOrder Load (0.5ms)[0m [1m[34mSELECT `sale_orders`.* FROM `sale_orders` WHERE `sale_orders`.`order_id` = 'ODR-000000040176'[0m
|
||||
[1m[36mCACHE Employee Load (0.0ms)[0m [1m[34mSELECT `employees`.* FROM `employees` WHERE `employees`.`token_session` = '20e3649ff22a629a733f' LIMIT 1[0m [["token_session", "20e3649ff22a629a733f"], ["LIMIT", 1]]
|
||||
[1m[36mCACHE Employee Load (0.0ms)[0m [1m[34mSELECT `employees`.* FROM `employees` WHERE `employees`.`token_session` = '20e3649ff22a629a733f' LIMIT 1[0m [["token_session", "20e3649ff22a629a733f"], ["LIMIT", 1]]
|
||||
@@ -5557,7 +5557,7 @@ Processing by Origami::HomeController#index as HTML
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mRoom Load (0.6ms)[0m [1m[34mSELECT `dining_facilities`.* FROM `dining_facilities` WHERE `dining_facilities`.`type` IN ('Room') AND `dining_facilities`.`is_active` = 1 ORDER BY status desc[0m
|
||||
[1m[36mOrder Load (0.5ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(date,'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mOrder Load (0.5ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mSaleOrder Load (0.3ms)[0m [1m[34mSELECT `sale_orders`.* FROM `sale_orders` WHERE `sale_orders`.`order_id` = 'ODR-000000040176'[0m
|
||||
[1m[36mCACHE Employee Load (0.0ms)[0m [1m[34mSELECT `employees`.* FROM `employees` WHERE `employees`.`token_session` = '20e3649ff22a629a733f' LIMIT 1[0m [["token_session", "20e3649ff22a629a733f"], ["LIMIT", 1]]
|
||||
[1m[36mCACHE Employee Load (0.0ms)[0m [1m[34mSELECT `employees`.* FROM `employees` WHERE `employees`.`token_session` = '20e3649ff22a629a733f' LIMIT 1[0m [["token_session", "20e3649ff22a629a733f"], ["LIMIT", 1]]
|
||||
@@ -5675,7 +5675,7 @@ Processing by Origami::HomeController#show as HTML
|
||||
[1m[35m (0.7ms)[0m [1m[34mSELECT customer_id, name FROM `customers`[0m
|
||||
[1m[36mShiftSale Load (1.9ms)[0m [1m[34mSELECT `shift_sales`.* FROM `shift_sales` WHERE (shift_started_at is not null and shift_closed_at is null and employee_id = 7) LIMIT 1[0m
|
||||
[1m[36mShop Load (0.7ms)[0m [1m[34mSELECT `shops`.* FROM `shops` ORDER BY `shops`.`id` ASC LIMIT 1[0m
|
||||
[1m[36mBooking Load (5.9ms)[0m [1m[34mSELECT `bookings`.* FROM `bookings` WHERE `bookings`.`dining_facility_id` = 31 AND (booking_status != 'moved') AND (DATE_FORMAT(created_at,'%Y-%m-%d') = '2019-04-22' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '2019-04-21' )[0m
|
||||
[1m[36mBooking Load (5.9ms)[0m [1m[34mSELECT `bookings`.* FROM `bookings` WHERE `bookings`.`dining_facility_id` = 31 AND (booking_status != 'moved') AND (DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' OR DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-21' )[0m
|
||||
[1m[36mLookup Load (0.7ms)[0m [1m[34mSELECT name, value FROM `lookups` WHERE `lookups`.`lookup_type` = 'checkout_time'[0m
|
||||
[1m[36mLookup Load (0.4ms)[0m [1m[34mSELECT name, value FROM `lookups` WHERE `lookups`.`lookup_type` = 'checkout_alert_time'[0m
|
||||
[1m[36mTaxProfile Load (0.8ms)[0m [1m[34mSELECT `tax_profiles`.* FROM `tax_profiles` WHERE (group_type = 'cashier') ORDER BY order_by asc, order_by ASC[0m
|
||||
@@ -5764,7 +5764,7 @@ Processing by Origami::HomeController#show as HTML
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mRoom Load (0.4ms)[0m [1m[34mSELECT `dining_facilities`.* FROM `dining_facilities` WHERE `dining_facilities`.`type` IN ('Room') AND `dining_facilities`.`is_active` = 1 ORDER BY status desc[0m
|
||||
[1m[36mOrder Load (0.6ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(date,'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mOrder Load (0.6ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mSaleOrder Load (0.8ms)[0m [1m[34mSELECT `sale_orders`.* FROM `sale_orders` WHERE `sale_orders`.`order_id` = 'ODR-000000040176'[0m
|
||||
[1m[36mPaymentMethodSetting Load (0.3ms)[0m [1m[34mSELECT `payment_method_settings`.* FROM `payment_method_settings`[0m
|
||||
Rendered origami/home/show.html.erb within layouts/origami (421.3ms)
|
||||
@@ -5880,7 +5880,7 @@ Processing by Origami::HomeController#show as HTML
|
||||
[1m[35m (0.3ms)[0m [1m[34mSELECT customer_id, name FROM `customers`[0m
|
||||
[1m[36mShiftSale Load (0.4ms)[0m [1m[34mSELECT `shift_sales`.* FROM `shift_sales` WHERE (shift_started_at is not null and shift_closed_at is null and employee_id = 7) LIMIT 1[0m
|
||||
[1m[36mShop Load (0.3ms)[0m [1m[34mSELECT `shops`.* FROM `shops` ORDER BY `shops`.`id` ASC LIMIT 1[0m
|
||||
[1m[36mBooking Load (1.6ms)[0m [1m[34mSELECT `bookings`.* FROM `bookings` WHERE `bookings`.`dining_facility_id` = 31 AND (booking_status != 'moved') AND (DATE_FORMAT(created_at,'%Y-%m-%d') = '2019-04-22' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '2019-04-21' )[0m
|
||||
[1m[36mBooking Load (1.6ms)[0m [1m[34mSELECT `bookings`.* FROM `bookings` WHERE `bookings`.`dining_facility_id` = 31 AND (booking_status != 'moved') AND (DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' OR DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-21' )[0m
|
||||
[1m[36mLookup Load (0.3ms)[0m [1m[34mSELECT name, value FROM `lookups` WHERE `lookups`.`lookup_type` = 'checkout_time'[0m
|
||||
[1m[36mLookup Load (0.3ms)[0m [1m[34mSELECT name, value FROM `lookups` WHERE `lookups`.`lookup_type` = 'checkout_alert_time'[0m
|
||||
[1m[36mTaxProfile Load (0.3ms)[0m [1m[34mSELECT `tax_profiles`.* FROM `tax_profiles` WHERE (group_type = 'cashier') ORDER BY order_by asc, order_by ASC[0m
|
||||
@@ -5969,7 +5969,7 @@ Processing by Origami::HomeController#show as HTML
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mRoom Load (0.4ms)[0m [1m[34mSELECT `dining_facilities`.* FROM `dining_facilities` WHERE `dining_facilities`.`type` IN ('Room') AND `dining_facilities`.`is_active` = 1 ORDER BY status desc[0m
|
||||
[1m[36mOrder Load (0.6ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(date,'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mOrder Load (0.6ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mSaleOrder Load (0.4ms)[0m [1m[34mSELECT `sale_orders`.* FROM `sale_orders` WHERE `sale_orders`.`order_id` = 'ODR-000000040176'[0m
|
||||
[1m[36mPaymentMethodSetting Load (0.4ms)[0m [1m[34mSELECT `payment_method_settings`.* FROM `payment_method_settings`[0m
|
||||
Rendered origami/home/show.html.erb within layouts/origami (458.3ms)
|
||||
@@ -6087,7 +6087,7 @@ Processing by Origami::HomeController#show as HTML
|
||||
[1m[36mShiftSale Load (0.5ms)[0m [1m[34mSELECT `shift_sales`.* FROM `shift_sales` WHERE (shift_started_at is not null and shift_closed_at is null and employee_id = 7) LIMIT 1[0m
|
||||
[1m[36mShop Load (0.4ms)[0m [1m[34mSELECT `shops`.* FROM `shops` ORDER BY `shops`.`id` ASC LIMIT 1[0m
|
||||
[1m[36mMembershipSetting Load (0.3ms)[0m [1m[34mSELECT `membership_settings`.* FROM `membership_settings` WHERE `membership_settings`.`id` = 1 LIMIT 1[0m
|
||||
[1m[36mBooking Load (1.5ms)[0m [1m[34mSELECT `bookings`.* FROM `bookings` WHERE `bookings`.`dining_facility_id` = 31 AND (booking_status != 'moved') AND (DATE_FORMAT(created_at,'%Y-%m-%d') = '2019-04-22' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '2019-04-21' )[0m
|
||||
[1m[36mBooking Load (1.5ms)[0m [1m[34mSELECT `bookings`.* FROM `bookings` WHERE `bookings`.`dining_facility_id` = 31 AND (booking_status != 'moved') AND (DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' OR DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-21' )[0m
|
||||
[1m[36mLookup Load (0.3ms)[0m [1m[34mSELECT name, value FROM `lookups` WHERE `lookups`.`lookup_type` = 'checkout_time'[0m
|
||||
[1m[36mLookup Load (0.4ms)[0m [1m[34mSELECT name, value FROM `lookups` WHERE `lookups`.`lookup_type` = 'checkout_alert_time'[0m
|
||||
[1m[36mTaxProfile Load (0.3ms)[0m [1m[34mSELECT `tax_profiles`.* FROM `tax_profiles` WHERE (group_type = 'cashier') ORDER BY order_by asc, order_by ASC[0m
|
||||
@@ -6176,7 +6176,7 @@ Processing by Origami::HomeController#show as HTML
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mRoom Load (0.4ms)[0m [1m[34mSELECT `dining_facilities`.* FROM `dining_facilities` WHERE `dining_facilities`.`type` IN ('Room') AND `dining_facilities`.`is_active` = 1 ORDER BY status desc[0m
|
||||
[1m[36mOrder Load (0.5ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(date,'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mOrder Load (0.5ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mSaleOrder Load (0.9ms)[0m [1m[34mSELECT `sale_orders`.* FROM `sale_orders` WHERE `sale_orders`.`order_id` = 'ODR-000000040176'[0m
|
||||
[1m[36mPaymentMethodSetting Load (0.3ms)[0m [1m[34mSELECT `payment_method_settings`.* FROM `payment_method_settings`[0m
|
||||
Rendered origami/home/show.html.erb within layouts/origami (491.2ms)
|
||||
@@ -6280,7 +6280,7 @@ Processing by Origami::HomeController#show as HTML
|
||||
[1m[36mShiftSale Load (0.4ms)[0m [1m[34mSELECT `shift_sales`.* FROM `shift_sales` WHERE (shift_started_at is not null and shift_closed_at is null and employee_id = 7) LIMIT 1[0m
|
||||
[1m[36mShop Load (0.3ms)[0m [1m[34mSELECT `shops`.* FROM `shops` ORDER BY `shops`.`id` ASC LIMIT 1[0m
|
||||
[1m[36mMembershipSetting Load (1.0ms)[0m [1m[34mSELECT `membership_settings`.* FROM `membership_settings` WHERE `membership_settings`.`id` = 1 LIMIT 1[0m
|
||||
[1m[36mBooking Load (1.1ms)[0m [1m[34mSELECT `bookings`.* FROM `bookings` WHERE `bookings`.`dining_facility_id` = 31 AND (booking_status != 'moved') AND (DATE_FORMAT(created_at,'%Y-%m-%d') = '2019-04-22' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '2019-04-21' )[0m
|
||||
[1m[36mBooking Load (1.1ms)[0m [1m[34mSELECT `bookings`.* FROM `bookings` WHERE `bookings`.`dining_facility_id` = 31 AND (booking_status != 'moved') AND (DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' OR DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-21' )[0m
|
||||
[1m[36mLookup Load (0.4ms)[0m [1m[34mSELECT name, value FROM `lookups` WHERE `lookups`.`lookup_type` = 'checkout_time'[0m
|
||||
[1m[36mLookup Load (0.6ms)[0m [1m[34mSELECT name, value FROM `lookups` WHERE `lookups`.`lookup_type` = 'checkout_alert_time'[0m
|
||||
[1m[36mTaxProfile Load (0.3ms)[0m [1m[34mSELECT `tax_profiles`.* FROM `tax_profiles` WHERE (group_type = 'cashier') ORDER BY order_by asc, order_by ASC[0m
|
||||
@@ -6369,7 +6369,7 @@ Processing by Origami::HomeController#show as HTML
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mRoom Load (0.4ms)[0m [1m[34mSELECT `dining_facilities`.* FROM `dining_facilities` WHERE `dining_facilities`.`type` IN ('Room') AND `dining_facilities`.`is_active` = 1 ORDER BY status desc[0m
|
||||
[1m[36mOrder Load (0.5ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(date,'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mOrder Load (0.5ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mSaleOrder Load (0.4ms)[0m [1m[34mSELECT `sale_orders`.* FROM `sale_orders` WHERE `sale_orders`.`order_id` = 'ODR-000000040176'[0m
|
||||
[1m[36mPaymentMethodSetting Load (0.3ms)[0m [1m[34mSELECT `payment_method_settings`.* FROM `payment_method_settings`[0m
|
||||
Rendered origami/home/show.html.erb within layouts/origami (549.6ms)
|
||||
@@ -6471,7 +6471,7 @@ Processing by Origami::HomeController#show as HTML
|
||||
[1m[35m (1.2ms)[0m [1m[34mSELECT customer_id, name FROM `customers`[0m
|
||||
[1m[36mShiftSale Load (0.5ms)[0m [1m[34mSELECT `shift_sales`.* FROM `shift_sales` WHERE (shift_started_at is not null and shift_closed_at is null and employee_id = 7) LIMIT 1[0m
|
||||
[1m[36mShop Load (0.3ms)[0m [1m[34mSELECT `shops`.* FROM `shops` ORDER BY `shops`.`id` ASC LIMIT 1[0m
|
||||
[1m[36mBooking Load (1.2ms)[0m [1m[34mSELECT `bookings`.* FROM `bookings` WHERE `bookings`.`dining_facility_id` = 31 AND (booking_status != 'moved') AND (DATE_FORMAT(created_at,'%Y-%m-%d') = '2019-04-22' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '2019-04-21' )[0m
|
||||
[1m[36mBooking Load (1.2ms)[0m [1m[34mSELECT `bookings`.* FROM `bookings` WHERE `bookings`.`dining_facility_id` = 31 AND (booking_status != 'moved') AND (DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' OR DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-21' )[0m
|
||||
[1m[36mLookup Load (0.4ms)[0m [1m[34mSELECT name, value FROM `lookups` WHERE `lookups`.`lookup_type` = 'checkout_time'[0m
|
||||
[1m[36mLookup Load (0.2ms)[0m [1m[34mSELECT name, value FROM `lookups` WHERE `lookups`.`lookup_type` = 'checkout_alert_time'[0m
|
||||
[1m[36mTaxProfile Load (0.3ms)[0m [1m[34mSELECT `tax_profiles`.* FROM `tax_profiles` WHERE (group_type = 'cashier') ORDER BY order_by asc, order_by ASC[0m
|
||||
@@ -6560,7 +6560,7 @@ Processing by Origami::HomeController#show as HTML
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mRoom Load (0.4ms)[0m [1m[34mSELECT `dining_facilities`.* FROM `dining_facilities` WHERE `dining_facilities`.`type` IN ('Room') AND `dining_facilities`.`is_active` = 1 ORDER BY status desc[0m
|
||||
[1m[36mOrder Load (0.4ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(date,'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mOrder Load (0.4ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mSaleOrder Load (0.3ms)[0m [1m[34mSELECT `sale_orders`.* FROM `sale_orders` WHERE `sale_orders`.`order_id` = 'ODR-000000040176'[0m
|
||||
[1m[36mPaymentMethodSetting Load (0.9ms)[0m [1m[34mSELECT `payment_method_settings`.* FROM `payment_method_settings`[0m
|
||||
Rendered origami/home/show.html.erb within layouts/origami (441.0ms)
|
||||
@@ -6678,7 +6678,7 @@ Processing by Origami::HomeController#show as HTML
|
||||
[1m[36mShiftSale Load (0.4ms)[0m [1m[34mSELECT `shift_sales`.* FROM `shift_sales` WHERE (shift_started_at is not null and shift_closed_at is null and employee_id = 7) LIMIT 1[0m
|
||||
[1m[36mShop Load (0.4ms)[0m [1m[34mSELECT `shops`.* FROM `shops` ORDER BY `shops`.`id` ASC LIMIT 1[0m
|
||||
[1m[36mMembershipSetting Load (0.3ms)[0m [1m[34mSELECT `membership_settings`.* FROM `membership_settings` WHERE `membership_settings`.`id` = 1 LIMIT 1[0m
|
||||
[1m[36mBooking Load (3.1ms)[0m [1m[34mSELECT `bookings`.* FROM `bookings` WHERE `bookings`.`dining_facility_id` = 31 AND (booking_status != 'moved') AND (DATE_FORMAT(created_at,'%Y-%m-%d') = '2019-04-22' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '2019-04-21' )[0m
|
||||
[1m[36mBooking Load (3.1ms)[0m [1m[34mSELECT `bookings`.* FROM `bookings` WHERE `bookings`.`dining_facility_id` = 31 AND (booking_status != 'moved') AND (DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' OR DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-21' )[0m
|
||||
[1m[36mLookup Load (0.3ms)[0m [1m[34mSELECT name, value FROM `lookups` WHERE `lookups`.`lookup_type` = 'checkout_time'[0m
|
||||
[1m[36mLookup Load (0.3ms)[0m [1m[34mSELECT name, value FROM `lookups` WHERE `lookups`.`lookup_type` = 'checkout_alert_time'[0m
|
||||
[1m[36mTaxProfile Load (0.3ms)[0m [1m[34mSELECT `tax_profiles`.* FROM `tax_profiles` WHERE (group_type = 'cashier') ORDER BY order_by asc, order_by ASC[0m
|
||||
@@ -6767,7 +6767,7 @@ Processing by Origami::HomeController#show as HTML
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mRoom Load (0.4ms)[0m [1m[34mSELECT `dining_facilities`.* FROM `dining_facilities` WHERE `dining_facilities`.`type` IN ('Room') AND `dining_facilities`.`is_active` = 1 ORDER BY status desc[0m
|
||||
[1m[36mOrder Load (0.4ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(date,'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mOrder Load (0.4ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mSaleOrder Load (1.2ms)[0m [1m[34mSELECT `sale_orders`.* FROM `sale_orders` WHERE `sale_orders`.`order_id` = 'ODR-000000040176'[0m
|
||||
[1m[36mPaymentMethodSetting Load (0.4ms)[0m [1m[34mSELECT `payment_method_settings`.* FROM `payment_method_settings`[0m
|
||||
Rendered origami/home/show.html.erb within layouts/origami (595.2ms)
|
||||
@@ -6872,7 +6872,7 @@ Processing by Origami::HomeController#show as HTML
|
||||
[1m[36mShiftSale Load (0.6ms)[0m [1m[34mSELECT `shift_sales`.* FROM `shift_sales` WHERE (shift_started_at is not null and shift_closed_at is null and employee_id = 7) LIMIT 1[0m
|
||||
[1m[36mShop Load (0.3ms)[0m [1m[34mSELECT `shops`.* FROM `shops` ORDER BY `shops`.`id` ASC LIMIT 1[0m
|
||||
[1m[36mMembershipSetting Load (0.3ms)[0m [1m[34mSELECT `membership_settings`.* FROM `membership_settings` WHERE `membership_settings`.`id` = 1 LIMIT 1[0m
|
||||
[1m[36mBooking Load (1.0ms)[0m [1m[34mSELECT `bookings`.* FROM `bookings` WHERE `bookings`.`dining_facility_id` = 31 AND (booking_status != 'moved') AND (DATE_FORMAT(created_at,'%Y-%m-%d') = '2019-04-22' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '2019-04-21' )[0m
|
||||
[1m[36mBooking Load (1.0ms)[0m [1m[34mSELECT `bookings`.* FROM `bookings` WHERE `bookings`.`dining_facility_id` = 31 AND (booking_status != 'moved') AND (DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' OR DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-21' )[0m
|
||||
[1m[36mLookup Load (0.3ms)[0m [1m[34mSELECT name, value FROM `lookups` WHERE `lookups`.`lookup_type` = 'checkout_time'[0m
|
||||
[1m[36mLookup Load (0.9ms)[0m [1m[34mSELECT name, value FROM `lookups` WHERE `lookups`.`lookup_type` = 'checkout_alert_time'[0m
|
||||
[1m[36mTaxProfile Load (0.3ms)[0m [1m[34mSELECT `tax_profiles`.* FROM `tax_profiles` WHERE (group_type = 'cashier') ORDER BY order_by asc, order_by ASC[0m
|
||||
@@ -6961,7 +6961,7 @@ Processing by Origami::HomeController#show as HTML
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mCACHE Zone Load (0.0ms)[0m [1m[34mSELECT `zones`.* FROM `zones` WHERE `zones`.`id` = 1 LIMIT 1[0m [["id", 1], ["LIMIT", 1]]
|
||||
[1m[36mRoom Load (0.4ms)[0m [1m[34mSELECT `dining_facilities`.* FROM `dining_facilities` WHERE `dining_facilities`.`type` IN ('Room') AND `dining_facilities`.`is_active` = 1 ORDER BY status desc[0m
|
||||
[1m[36mOrder Load (0.9ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(date,'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mOrder Load (0.9ms)[0m [1m[34mSELECT `orders`.* FROM `orders` WHERE (DATE_FORMAT(CONVERT_TZ(date,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = '2019-04-22' and status != 'billed' and source != 'quick_service') ORDER BY date desc[0m
|
||||
[1m[36mSaleOrder Load (0.3ms)[0m [1m[34mSELECT `sale_orders`.* FROM `sale_orders` WHERE `sale_orders`.`order_id` = 'ODR-000000040176'[0m
|
||||
[1m[36mPaymentMethodSetting Load (0.3ms)[0m [1m[34mSELECT `payment_method_settings`.* FROM `payment_method_settings`[0m
|
||||
Rendered origami/home/show.html.erb within layouts/origami (537.0ms)
|
||||
|
||||
Reference in New Issue
Block a user