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
|
|
@ -41,7 +41,7 @@ class Order < ActiveRecord::Base
|
|||
if stockit?
|
||||
StockArticle.available.all(:include => :article_category,
|
||||
:order => 'article_categories.name, articles.name').reject{ |a|
|
||||
a.quantity_available <= 0
|
||||
a.quantity_available <= 0 and not a.ordered?(self)
|
||||
}.group_by { |a| a.article_category.name }
|
||||
else
|
||||
supplier.articles.available.all.group_by { |a| a.article_category.name }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue