Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes
This commit is contained in:
@@ -9,7 +9,7 @@ class MenuCategory < ApplicationRecord
|
||||
validates_presence_of :code, :name, :menu, :order_by
|
||||
validates_uniqueness_of :code
|
||||
|
||||
default_scope { order('order_by asc') }
|
||||
default_scope { order('name asc') }
|
||||
scope :active, -> {where("is_available = 1")}
|
||||
|
||||
def self.destroyCategory(menu_category)
|
||||
|
||||
@@ -16,7 +16,7 @@ class MenuItem < ApplicationRecord
|
||||
validates_presence_of :item_code, :name, :type, :min_qty,:account_id
|
||||
validates_uniqueness_of :item_code
|
||||
|
||||
default_scope { order('item_code asc') }
|
||||
default_scope { order('name asc') }
|
||||
|
||||
scope :simple_menu_item, -> { where(type: 'SimpleMenuItem') }
|
||||
scope :set_menu_item, -> { where(type: 'SetMenuItem') }
|
||||
|
||||
@@ -71,9 +71,9 @@ class Order < ApplicationRecord
|
||||
BookingOrder.create({:booking_id => booking.booking_id, :order => self})
|
||||
|
||||
#Send order to queue one it done!
|
||||
# if self.source != "quick_service"
|
||||
if self.source != "quick_service"
|
||||
process_order_queue
|
||||
# end
|
||||
end
|
||||
|
||||
#send order to broadcast job
|
||||
send_order_broadcast(booking)
|
||||
|
||||
@@ -116,6 +116,7 @@ class OrderQueueStation < ApplicationRecord
|
||||
order = Order.find(order_id)
|
||||
order_items = order.order_items
|
||||
|
||||
Order.pay_process_order_queue(order_id,table_id)
|
||||
if table_id.to_i > 0
|
||||
# get dining
|
||||
dining = DiningFacility.find(table_id)
|
||||
|
||||
Reference in New Issue
Block a user