show lines with zero units but with member orders in balancing screen (closes foodcoops/foodsoft#179)
This commit is contained in:
parent
9ac9d1ea50
commit
6cfaa4979a
2 changed files with 3 additions and 2 deletions
|
|
@ -12,7 +12,8 @@ class OrderArticle < ActiveRecord::Base
|
|||
validate :article_and_price_exist
|
||||
validates_uniqueness_of :article_id, scope: :order_id
|
||||
|
||||
scope :ordered, :conditions => "units_to_order >= 1"
|
||||
scope :ordered, :conditions => "units_to_order > 0"
|
||||
scope :ordered_or_member, -> { includes(:group_order_articles).where("units_to_order > 0 OR group_order_articles.result > 0") }
|
||||
|
||||
before_create :init_from_balancing
|
||||
after_destroy :update_ordergroup_prices
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue