Improved stockit overiew. Fixed article ordering by suppliers.

This commit is contained in:
Benjamin Meichsner 2009-05-17 16:50:13 +02:00
parent 0db7724f85
commit 2af35e55bc
2 changed files with 3 additions and 1 deletions

View file

@ -1,7 +1,7 @@
class StockitController < ApplicationController class StockitController < ApplicationController
def index def index
@stock_articles = StockArticle.without_deleted( @stock_articles = StockArticle.without_deleted.all(
:include => [:supplier, :article_category], :include => [:supplier, :article_category],
:order => 'suppliers.name, article_categories.name, articles.name' :order => 'suppliers.name, article_categories.name, articles.name'
) )

View file

@ -28,6 +28,7 @@
%th Artikel %th Artikel
%th im Lager %th im Lager
%th davon bestellt %th davon bestellt
%th verfügbar
%th Einheit %th Einheit
%th Preis %th Preis
%th Lieferantin %th Lieferantin
@ -39,6 +40,7 @@
%td=h article.name %td=h article.name
%td= article.quantity %td= article.quantity
%td= article.quantity - article.quantity_available %td= article.quantity - article.quantity_available
%th= article.quantity_available
%td= article.unit %td= article.unit
%td= article.price %td= article.price
%td= link_to article.supplier.name, article.supplier %td= link_to article.supplier.name, article.supplier