2012-10-29 18:28:17 +01:00
|
|
|
- title "Lager (#{StockArticle.available.count})"
|
|
|
|
- content_for :javascript do
|
2011-05-27 14:09:01 +02:00
|
|
|
:javascript
|
|
|
|
$(function() {
|
|
|
|
$('tr.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
|
2013-02-11 11:19:26 +01:00
|
|
|
= t '.view_options'
|
2012-10-29 18:28:17 +01:00
|
|
|
%span.caret
|
|
|
|
%ul.dropdown-menu
|
2013-02-11 11:19:26 +01:00
|
|
|
%li= link_to t('.toggle_unavailable'), "#", 'data-toggle-this' => 'tr.unavailable', tabindex: -1
|
2009-10-17 20:33:36 +02:00
|
|
|
|
2012-10-29 18:28:17 +01:00
|
|
|
.btn-group
|
2013-02-11 11:19:26 +01:00
|
|
|
= link_to_if @current_user.role_orders?, t('.order_online'), new_order_path(supplier_id: 0),
|
2013-01-26 15:57:29 +01:00
|
|
|
class: 'btn', class: 'btn btn-primary'
|
2013-02-11 11:19:26 +01:00
|
|
|
= link_to t('.new_stock_article'), new_stock_article_path, class: 'btn'
|
|
|
|
= link_to t('.new_stock_taking'), new_stock_taking_path, class: 'btn'
|
|
|
|
= link_to t('.show_stock_takings'), stock_takings_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
|
2013-02-11 11:19:26 +01:00
|
|
|
= t '.new_delivery'
|
2012-10-29 18:28:17 +01:00
|
|
|
%span.caret
|
|
|
|
%ul.dropdown-menu
|
|
|
|
- Supplier.all.each do |supplier|
|
|
|
|
%li= link_to supplier.name, new_supplier_delivery_path(supplier), tabindex: -1
|
2009-02-11 18:09:04 +01:00
|
|
|
|
|
|
|
|
2012-10-29 18:28:17 +01:00
|
|
|
%table.table.table-hover#articles
|
|
|
|
%thead
|
|
|
|
%tr
|
2013-02-11 11:19:26 +01:00
|
|
|
%th= t '.article.article'
|
|
|
|
%th= t '.article.stock'
|
|
|
|
%th= t '.article.ordered'
|
|
|
|
%th= t '.article.available'
|
|
|
|
%th= t '.article.unit'
|
|
|
|
%th= t '.article.price'
|
|
|
|
%th= t '.article.vat'
|
|
|
|
%th= t '.article.supplier'
|
|
|
|
%th= t '.article.category'
|
2012-10-29 18:28:17 +01:00
|
|
|
%th
|
|
|
|
%tbody
|
|
|
|
- for article in @stock_articles
|
|
|
|
%tr{:class => stock_article_classes(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
|
2013-02-11 11:19:26 +01:00
|
|
|
= link_to t('ui.edit'), edit_stock_article_path(article), class: 'btn btn-mini'
|
|
|
|
= link_to t('ui.delete'), article, :method => :delete, :confirm => t('.confirm_delete'),
|
2012-10-29 18:28:17 +01:00
|
|
|
class: 'btn btn-mini btn-danger'
|
|
|
|
%p
|
2013-02-11 11:19:26 +01:00
|
|
|
= t '.stock_worth'
|
2012-10-29 18:28:17 +01:00
|
|
|
= number_to_currency StockArticle.stock_value
|
|
|
|
|
|
2013-02-11 11:19:26 +01:00
|
|
|
=t '.stock_count'
|
2012-10-29 18:28:17 +01:00
|
|
|
= StockArticle.available.count
|
2009-02-11 18:09:04 +01:00
|
|
|
|