check query
This commit is contained in:
@@ -51,7 +51,7 @@ class Booking < ApplicationRecord
|
||||
|
||||
if from.present? && to.present?
|
||||
booking = Booking.joins(" LEFT JOIN dining_facilities df ON df.id=bookings.dining_facility_id")
|
||||
.where("DATE_FORMAT(created_at,'%d-%m-%Y') >= ?" + " AND DATE_FORMAT(created_at,'%d-%m-%Y') <= ? and NOT booking_status = 'void' ", from,to)
|
||||
.where("DATE_FORMAT(bookings.created_at,'%d-%m-%Y') >= ?" + " AND DATE_FORMAT(bookings.created_at,'%d-%m-%Y') <= ? and NOT bookings.booking_status = 'void' ", from,to)
|
||||
query = booking.where(keyword)
|
||||
else
|
||||
joins(" LEFT JOIN dining_facilities df ON df.id=bookings.dining_facility_id")
|
||||
|
||||
Reference in New Issue
Block a user