47 lines
1.8 KiB
Text
47 lines
1.8 KiB
Text
- title @stock_article.name
|
|
|
|
.row-fluid
|
|
.span6
|
|
%dl.dl-horizontal
|
|
%dt= StockArticle.human_attribute_name 'supplier'
|
|
%dd= link_to @stock_article.supplier.name, @stock_article.supplier
|
|
%dt= StockArticle.human_attribute_name 'name'
|
|
%dd= @stock_article.name
|
|
%dt= StockArticle.human_attribute_name 'unit'
|
|
%dd= @stock_article.unit
|
|
%dt= StockArticle.human_attribute_name 'price'
|
|
%dd= number_to_currency @stock_article.price
|
|
%dt= StockArticle.human_attribute_name 'tax'
|
|
%dd= number_to_percentage @stock_article.tax
|
|
%dt= StockArticle.human_attribute_name 'deposit'
|
|
%dd= number_to_currency @stock_article.deposit
|
|
%dt= StockArticle.human_attribute_name 'fc_price'
|
|
%dd= number_to_currency @stock_article.fc_price
|
|
%dt= StockArticle.human_attribute_name 'article_category'
|
|
%dd= @stock_article.article_category.name
|
|
%dt= StockArticle.human_attribute_name 'note'
|
|
%dd= @stock_article.note
|
|
%dt= StockArticle.human_attribute_name 'quantity'
|
|
%dd= @stock_article.quantity
|
|
%dt= StockArticle.human_attribute_name 'quantity_available'
|
|
%dd= @stock_article.quantity_available
|
|
.form-actions
|
|
= link_to t('ui.edit'), edit_stock_article_path(@stock_article), class: 'btn'
|
|
|
|
.span6
|
|
%h2= t('.stock_changes')
|
|
%table.table.table-hover#stock_changes
|
|
%thead
|
|
%tr
|
|
%th= t '.datetime'
|
|
%th= t '.reason'
|
|
%th= t '.change_quantity'
|
|
%th= t '.new_quantity'
|
|
%tbody
|
|
- reversed_history = @stock_article.quantity_history.reverse
|
|
- @stock_changes.each_with_index do |stock_change, index|
|
|
%tr
|
|
%td= l stock_change.created_at
|
|
%td= link_to_stock_change_reason(stock_change)
|
|
%td= stock_change.quantity
|
|
%td= reversed_history[index]
|