Separate columns for article price and unit in delivery form
This commit is contained in:
parent
a6228bdcf2
commit
f76b9da1e9
6 changed files with 10 additions and 6 deletions
|
@ -104,6 +104,7 @@
|
|||
%th.dom-sort-triggerer.default-sort{:data => {'compare-function' => 'compareText', 'sort-criterion' => 'sort-by-name'}}
|
||||
= t '.article'
|
||||
%th= t '.price'
|
||||
%th= t '.unit'
|
||||
%th= t '.category'
|
||||
%th= t '.actions'
|
||||
%tbody
|
||||
|
@ -117,6 +118,7 @@
|
|||
%th.dom-sort-triggerer.default-sort{:data => {'compare-function' => 'compareText', 'sort-criterion' => 'sort-by-name'}}
|
||||
= t '.article'
|
||||
%th= t '.price'
|
||||
%th= t '.unit'
|
||||
%th= t '.quantity'
|
||||
%th= t '.actions'
|
||||
%tbody
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
- css_class = ( @delivery and @delivery.includes_article? article ) ? ( 'unavailable' ) : ( false )
|
||||
%tr{:id => "stock_article_#{article.id}", :class => css_class}
|
||||
%td.sort-by-name= article.name
|
||||
%td{:data => {:toggle => :tooltip, :title => render(:partial => 'shared/article_price_info', :locals => {:article => article})}} #{number_to_currency article.price}/#{article.unit}
|
||||
%td{:data => {:toggle => :tooltip, :title => render(:partial => 'shared/article_price_info', :locals => {:article => article})}}= number_to_currency article.price
|
||||
%td= article.unit
|
||||
%td.sort-by-category= article.article_category.name
|
||||
%td
|
||||
= link_to t('.action_edit'), edit_stock_article_supplier_deliveries_path(@supplier, :stock_article_id => article.id), remote: true, class: 'btn btn-mini'
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
%td.sort-by-name
|
||||
%span.stock_article_name= stock_change.stock_article.name
|
||||
= f.association :stock_article, :as => :hidden
|
||||
%td.price-per-unit{:data => {:toggle => :tooltip, :title => render(:partial => 'shared/article_price_info', :locals => {:article => stock_article})}} #{number_to_currency stock_article.price}/#{stock_change.stock_article.unit}
|
||||
%td.price{:data => {:toggle => :tooltip, :title => render(:partial => 'shared/article_price_info', :locals => {:article => stock_article})}}= number_to_currency stock_article.price
|
||||
%td.unit= stock_change.stock_article.unit
|
||||
%td= f.input :quantity, :wrapper => :intable, :input_html => {:class => 'stock-change-quantity', :autocomplete => :off}
|
||||
%td= stock_change_remove_link f
|
||||
|
|
|
@ -23,9 +23,7 @@ $('div.container-fluid').prepend(
|
|||
|
||||
var stock_change_entry = $('#stock_change_stock_article_<%= @stock_article.id %>');
|
||||
$('.stock_article_name', stock_change_entry).text('<%= j(@stock_article.name) %>');
|
||||
$('.price-per-unit', stock_change_entry).text(
|
||||
'<%= "#{j(number_to_currency(@stock_article.price))}/#{j(number_to_currency(@stock_article.unit))}" %>'
|
||||
);
|
||||
$('.unit', stock_change_entry).text('<%= j(number_to_currency(@stock_article.unit)) %>');
|
||||
|
||||
stock_change_entry.addClass('success');
|
||||
|
||||
|
|
|
@ -434,11 +434,12 @@ de:
|
|||
category: Kategorie
|
||||
create_from_blank: Ohne Vorlage anlegen
|
||||
create_stock_article: Lagerartikel anlegen
|
||||
price: Preis (netto)
|
||||
price: Nettopreis
|
||||
quantity: Menge
|
||||
title_fill_quantities: 2. Liefermenge angeben
|
||||
title_finish_delivery: 3. Lieferung abschließen
|
||||
title_select_stock_articles: 1. Lagerartikel auswählen
|
||||
unit: Einheit
|
||||
index:
|
||||
confirm_delete: Bist Du sicher?
|
||||
new_delivery: Neue Lieferung für %{supplier} anlegen
|
||||
|
|
|
@ -441,6 +441,7 @@ en:
|
|||
title_fill_quantities: 2. Set delivery quantities
|
||||
title_finish_delivery: 3. Finish delivery
|
||||
title_select_stock_articles: 1. Select stock articles
|
||||
unit: Unit
|
||||
index:
|
||||
confirm_delete: Are you sure?
|
||||
new_delivery: ! 'Create new delivery for %{supplier} '
|
||||
|
|
Loading…
Reference in a new issue