Fix rendering of stock order in OrderByGroups

This commit is contained in:
Patrick Gansterer 2019-01-28 06:08:04 +01:00
parent 52f322bf6e
commit d925533366
2 changed files with 3 additions and 3 deletions

View file

@ -16,6 +16,7 @@ class GroupOrder < ApplicationRecord
scope :in_open_orders, -> { joins(:order).merge(Order.open) }
scope :in_finished_orders, -> { joins(:order).merge(Order.finished_not_closed) }
scope :stock, -> { where(ordergroup: 0) }
scope :ordered, -> { includes(:ordergroup).order('groups.name') }