Hide StockArticles with negeative stock amount in new order. Closes #9
This commit is contained in:
parent
27ff4bbd9b
commit
0db7724f85
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ class Order < ActiveRecord::Base
|
||||||
if stockit?
|
if stockit?
|
||||||
StockArticle.available.without_deleted(:include => :article_category,
|
StockArticle.available.without_deleted(:include => :article_category,
|
||||||
:order => 'article_categories.name, articles.name').reject{ |a|
|
:order => 'article_categories.name, articles.name').reject{ |a|
|
||||||
a.quantity_available == 0
|
a.quantity_available <= 0
|
||||||
}.group_by { |a| a.article_category.name }
|
}.group_by { |a| a.article_category.name }
|
||||||
else
|
else
|
||||||
supplier.articles.available.without_deleted.group_by { |a| a.article_category.name }
|
supplier.articles.available.without_deleted.group_by { |a| a.article_category.name }
|
||||||
|
|
Loading…
Reference in a new issue