check product sale
This commit is contained in:
@@ -179,6 +179,11 @@ class Ability
|
||||
can :remove_all_discount, :discount
|
||||
can :member_discount, :discount
|
||||
|
||||
can :move_dining, :movetable
|
||||
can :moving, :movetable
|
||||
|
||||
can :move_dining, :moveroom
|
||||
|
||||
can :manage, Customer
|
||||
can :manage, DiningQueue
|
||||
|
||||
|
||||
@@ -950,7 +950,7 @@ def self.get_menu_item_query(order_by)
|
||||
" LEFT JOIN sale_items si ON si.item_instance_code = mii.item_instance_code" +
|
||||
" LEFT JOIN sales s ON s.sale_id = si.sale_id")
|
||||
.where("(CASE WHEN s.sale_status IS NOT NULL THEN s.sale_status='completed' ELSE 1 END)")
|
||||
.group("mc.id, (CASE WHEN si.product_name IS NOT NULL THEN si.product_name ELSE mii.item_instance_name END)")
|
||||
.group("mc.id, (CASE WHEN si.product_name IS NOT NULL THEN si.product_name ELSE CONCAT(menu_items.name,' - ',mii.item_instance_name) END)")
|
||||
.order("si.qty #{order_by}, menu_items.menu_category_id #{order_by}")
|
||||
end
|
||||
#product sale report query
|
||||
|
||||
Reference in New Issue
Block a user