foodsoft/app/views/stockit/index.html.haml

78 lines
2.9 KiB
Text
Raw Normal View History

2012-10-29 18:28:17 +01:00
- title "Lager (#{StockArticle.available.count})"
- content_for :javascript do
:javascript
$(function() {
2013-01-28 20:46:35 +01:00
$('tr.unavailable,input.unavailable,div.unavailable').hide();
})
2012-10-29 18:28:17 +01:00
.well.well-small
.btn-toolbar
.btn-group.pull-right
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn dropdown-toggle' do
2009-10-17 20:33:36 +02:00
Ansichtsoptionen
2012-10-29 18:28:17 +01:00
%span.caret
%ul.dropdown-menu
2013-01-28 20:46:35 +01:00
%li= link_to "Nicht verfügbare Artikel zeigen/verstecken", "#", 'data-toggle-this' => 'tr.unavailable,input.unavailable,div.unavailable', tabindex: -1
2009-10-17 20:33:36 +02:00
2012-10-29 18:28:17 +01:00
.btn-group
= link_to_if @current_user.role_orders?, "Lagerbestellung online stellen", new_order_path(supplier_id: 0),
class: 'btn', class: 'btn btn-primary'
= link_to "Neuen Lagerartikel anlegen", new_stock_article_path, class: 'btn'
2012-10-29 18:28:17 +01:00
= link_to "Inventur anlegen", new_stock_taking_path, class: 'btn'
= link_to "Inventurübersicht", stock_takings_path, class: 'btn'
= link_to 'Löschvorschläge', stock_article_selections_path, class: 'btn'
2009-10-17 20:33:36 +02:00
2012-10-29 18:28:17 +01:00
.btn-group
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn dropdown-toggle' do
Neue Lieferung ..
%span.caret
%ul.dropdown-menu
- Supplier.all.each do |supplier|
%li= link_to supplier.name, new_supplier_delivery_path(supplier), tabindex: -1
= form_for @stock_article_selection do |form|
- if @stock_article_selection.errors.has_key?(:stock_articles)
.alert.alert-error
= @stock_article_selection.errors.get(:stock_articles).join(" ")
%table.table.table-hover#articles
%thead
%tr
%th= check_box_tag 'checkall', '1', false,
{ 'data-check-all' => 'table#articles tr.unavailable', :title => 'Alle löschbaren Artikel', :class => 'unavailable' }
%th Artikel
%th im Lager
%th davon bestellt
%th verfügbar
%th Einheit
%th Preis
%th MwSt
%th Lieferantin
%th Kategorie
%th
%tbody
- for article in @stock_articles
%tr{:class => stock_article_classes(article)}
%td= stock_article_delete_checkbox(article)
%td=h article.name
%td= article.quantity
%td= article.quantity - article.quantity_available
%th= article.quantity_available
%td= article.unit
%td= article.price
%td= number_to_percentage article.tax
%td= link_to article.supplier.name, article.supplier
%td= article.article_category.name
%td
= link_to "Bearbeiten", edit_stock_article_path(article), class: 'btn btn-mini'
= link_to "Löschen", article, :method => :delete, :confirm => "Bist Du sicher?",
class: 'btn btn-mini btn-danger'
2013-01-28 20:46:35 +01:00
.form-actions.unavailable
= submit_tag "Artikel zum Löschen vormerken", { :class => 'unavailable btn' }
2012-10-29 18:28:17 +01:00
%p
Aktueller Lagerwert:
= number_to_currency StockArticle.stock_value
|
Artikelanzahl:
= StockArticle.available.count