2009-08-12 11:46:27 +02:00
|
|
|
- title "Lagerübersicht: #{StockArticle.available.count} Artikel im Lager"
|
2011-05-27 14:09:01 +02:00
|
|
|
- content_for :head do
|
|
|
|
:javascript
|
|
|
|
$(function() {
|
|
|
|
$('tr.unavailable').hide();
|
|
|
|
})
|
2009-10-17 20:33:36 +02:00
|
|
|
.menu
|
|
|
|
- form_tag do
|
|
|
|
%ul
|
|
|
|
%li
|
|
|
|
Ansichtsoptionen
|
|
|
|
%ul
|
2011-05-27 14:09:01 +02:00
|
|
|
%li= link_to "Nicht verfügbare Artikel zeigen/verstecken", "#", 'data-toggle-this' => 'tr.unavailable',
|
|
|
|
:style => "width:15em"
|
2009-10-17 20:33:36 +02:00
|
|
|
|
|
|
|
|
2009-02-11 18:09:04 +01:00
|
|
|
%div{:style => "padding:0 0 0.5em 0.7em;margin-bottom:2em"}
|
|
|
|
%span{:style => "float:left"}
|
|
|
|
- form_tag do
|
|
|
|
Neue Lieferung anlegen für:
|
2011-05-27 14:09:01 +02:00
|
|
|
= select_tag :new_delivery,
|
|
|
|
options_for_select([[" -- Lieferantin wählen --", ""]] + Supplier.all.map {|s| [ s.name, new_supplier_delivery_url(s)]}),
|
|
|
|
'data-redirect-to' => true, :style => "font-size: 0.9em;margin-left:1em;"
|
2009-02-11 18:09:04 +01:00
|
|
|
|
|
|
|
.single_column{:style => 'width:100%; clear:both'}
|
|
|
|
.box_title
|
|
|
|
.column_content
|
|
|
|
#actions
|
2009-02-12 18:32:20 +01:00
|
|
|
%b= link_to "Neuen Lagerartikel anlegen", new_stock_article_path
|
2009-02-11 18:09:04 +01:00
|
|
|
|
|
|
|
|
= link_to_if @current_user.role_orders?, "Lagerbestellung online stellen", {:controller => 'orders', :action => 'new', :supplier_id => 0}
|
2009-02-12 18:32:20 +01:00
|
|
|
|
|
2009-02-12 21:38:41 +01:00
|
|
|
%b= link_to "Inventur anlegen", new_stock_taking_path
|
|
|
|
|
|
|
|
|
= link_to "Inventurübersicht", stock_takings_path
|
2009-02-11 18:09:04 +01:00
|
|
|
|
|
|
|
#articles{:style => "clear:both;margin-top:1em"}
|
|
|
|
%table.list
|
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th Artikel
|
|
|
|
%th im Lager
|
|
|
|
%th davon bestellt
|
2009-05-17 16:50:13 +02:00
|
|
|
%th verfügbar
|
2009-02-11 18:09:04 +01:00
|
|
|
%th Einheit
|
|
|
|
%th Preis
|
2009-09-07 11:29:56 +02:00
|
|
|
%th MwSt
|
2009-03-22 13:49:16 +01:00
|
|
|
%th Lieferantin
|
2009-02-11 18:09:04 +01:00
|
|
|
%th Kategorie
|
|
|
|
%th
|
|
|
|
%tbody
|
|
|
|
- for article in @stock_articles
|
2009-10-17 20:33:36 +02:00
|
|
|
- class_name = cycle :even, :odd
|
2011-05-27 14:09:01 +02:00
|
|
|
- class_name += " unavailable" if article.quantity_available <= 0
|
2009-10-17 20:33:36 +02:00
|
|
|
- class_name += " supplier_#{article.supplier.id}"
|
|
|
|
%tr{:class => class_name}
|
2009-02-11 18:09:04 +01:00
|
|
|
%td=h article.name
|
|
|
|
%td= article.quantity
|
|
|
|
%td= article.quantity - article.quantity_available
|
2009-05-17 16:50:13 +02:00
|
|
|
%th= article.quantity_available
|
2009-02-11 18:09:04 +01:00
|
|
|
%td= article.unit
|
|
|
|
%td= article.price
|
2009-09-07 11:29:56 +02:00
|
|
|
%td= number_to_percentage article.tax
|
2009-02-11 18:09:04 +01:00
|
|
|
%td= link_to article.supplier.name, article.supplier
|
|
|
|
%td= article.article_category.name
|
|
|
|
%td
|
|
|
|
= link_to icon(:edit), edit_stock_article_path(article)
|
|
|
|
= link_to icon(:delete), article, :method => :delete, :confirm => "Bist Du sicher?"
|
2009-08-04 13:41:28 +02:00
|
|
|
%p
|
|
|
|
Aktueller Lagerwert:
|
|
|
|
= number_to_currency StockArticle.stock_value
|
2009-08-12 11:46:27 +02:00
|
|
|
|
|
|
|
|
Artikelanzahl:
|
|
|
|
= StockArticle.available.count
|
2009-02-11 18:09:04 +01:00
|
|
|
|