fix timezone

This commit is contained in:
Thein Lin Kyaw
2023-02-10 14:50:30 +06:30
parent 944f7a7259
commit 5d9281e196
18 changed files with 54 additions and 54 deletions

View File

@@ -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(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')
@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")