Do not exclude ordered articles (with zero quantity) when editing orders.
This commit is contained in:
parent
93a99c45d8
commit
63d8a3a1a6
2 changed files with 5 additions and 1 deletions
|
|
@ -48,6 +48,10 @@ class Article < ActiveRecord::Base
|
|||
order_article ? order_article.order : nil
|
||||
end
|
||||
memoize :in_open_order
|
||||
|
||||
def ordered?(order)
|
||||
order.order_articles.where(article_id: id).where('quantity > 0').one?
|
||||
end
|
||||
|
||||
# this method checks, if the shared_article has been changed
|
||||
# unequal attributes will returned in array
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue