added new image upload file
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class Booking < ApplicationRecord
|
||||
#primary key - need to be unique
|
||||
|
||||
|
||||
belongs_to :dining_facility, :optional => true
|
||||
belongs_to :sale, :optional => true
|
||||
has_many :booking_orders
|
||||
|
||||
@@ -223,8 +223,7 @@ class Order < ApplicationRecord
|
||||
left join dining_facilities on dining_facilities.id = bookings.dining_facility_id
|
||||
left join order_items on order_items.order_id = orders.id")
|
||||
.where("dining_facilities.type=? and orders.order_type=? and dining_facilities.is_active=?",DiningFacility::TABLE_TYPE,"dine_in",true)
|
||||
|
||||
.group("orders.id")
|
||||
.group("orders.id, order_items.id,dining_facilities.name")
|
||||
|
||||
end
|
||||
#Origami: Cashier : to view order type Room
|
||||
@@ -248,8 +247,7 @@ class Order < ApplicationRecord
|
||||
left join bookings on bookings.id = booking_orders.id
|
||||
left join dining_facilities on dining_facilities.id = bookings.dining_facility_id
|
||||
left join order_items on order_items.order_id = orders.id")
|
||||
|
||||
.where("dining_facilities.is_active=? and orders.date between ? and ?",true,from,to)
|
||||
.group("orders.id")
|
||||
.group("orders.id,order_items.id,dining_facilities.name")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -28,7 +28,8 @@ class Sale < ApplicationRecord
|
||||
end
|
||||
booking.sale_id = sale_id
|
||||
end
|
||||
|
||||
order = booking.booking_orders.take.order
|
||||
link_order_sale(order.id)
|
||||
return status
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user