From 2af35e55bcceb0b70b98483ca81da4e6a798b796 Mon Sep 17 00:00:00 2001 From: Benjamin Meichsner Date: Sun, 17 May 2009 16:50:13 +0200 Subject: [PATCH] Improved stockit overiew. Fixed article ordering by suppliers. --- app/controllers/stockit_controller.rb | 2 +- app/views/stockit/index.html.haml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/stockit_controller.rb b/app/controllers/stockit_controller.rb index a8ce1e21..cd8220fb 100644 --- a/app/controllers/stockit_controller.rb +++ b/app/controllers/stockit_controller.rb @@ -1,7 +1,7 @@ class StockitController < ApplicationController def index - @stock_articles = StockArticle.without_deleted( + @stock_articles = StockArticle.without_deleted.all( :include => [:supplier, :article_category], :order => 'suppliers.name, article_categories.name, articles.name' ) diff --git a/app/views/stockit/index.html.haml b/app/views/stockit/index.html.haml index ba47f5e3..c28fe097 100644 --- a/app/views/stockit/index.html.haml +++ b/app/views/stockit/index.html.haml @@ -28,6 +28,7 @@ %th Artikel %th im Lager %th davon bestellt + %th verfügbar %th Einheit %th Preis %th Lieferantin @@ -39,6 +40,7 @@ %td=h article.name %td= article.quantity %td= article.quantity - article.quantity_available + %th= article.quantity_available %td= article.unit %td= article.price %td= link_to article.supplier.name, article.supplier