fix order bug

This commit is contained in:
wvengen 2014-05-06 10:51:45 +02:00
parent 3953c21ae2
commit 3a41e9530f
5 changed files with 6 additions and 6 deletions

View file

@ -46,7 +46,7 @@ class Order < ActiveRecord::Base
# make sure to include those articles which are no longer available
# but which have already been ordered in this stock order
StockArticle.available.includes(:article_category).
order('article_categories.name, articles.name').reject{ |a|
order('article_categories.name', 'articles.name').reject{ |a|
a.quantity_available <= 0 and not a.ordered_in_order?(self)
}.group_by { |a| a.article_category.name }
else