sort ordergroups in order screen and pdfs

This commit is contained in:
wvengen 2013-09-17 00:25:38 +02:00
parent 8ca95f396f
commit b11706f30a
6 changed files with 7 additions and 5 deletions

View file

@ -14,7 +14,7 @@ class GroupOrderArticle < ActiveRecord::Base
validates_inclusion_of :tolerance, :in => 0..99
validates_uniqueness_of :order_article_id, :scope => :group_order_id # just once an article per group order
scope :ordered, :conditions => 'result > 0 OR quantity > 0 OR tolerance > 0'
scope :ordered, :conditions => 'group_order_articles.result > 0 OR group_order_articles.quantity > 0 OR group_order_articles.tolerance > 0', :include => {:group_order => :ordergroup}, :order => 'groups.name'
localize_input_of :result