Improve delivery workflow; introduce sortable tables; use js.erb for deliveries
This commit is contained in:
parent
49cfa9aded
commit
65f61e09d5
18 changed files with 357 additions and 105 deletions
|
|
@ -1,6 +1,9 @@
|
|||
%p
|
||||
= fields_for "delivery[new_stock_changes][]", stock_change do |form|
|
||||
= form.select :stock_article_id, stock_articles_for_select(supplier)
|
||||
Menge
|
||||
= form.text_field :quantity, :size => 5, :autocomplete => 'off'
|
||||
= link_to t('.remove_article'), "#", :class => 'remove_new_stock_change btn btn-small'
|
||||
= fields_for "delivery[new_stock_changes][]", stock_change, validate: true do |f|
|
||||
- f.object.quantity = '' if 0 == f.object.quantity
|
||||
%tr{:id => "stock_change_stock_article_#{stock_change.stock_article.id}", :data => {:id => stock_change.stock_article.id}}
|
||||
%td.sort-by-name
|
||||
= f.hidden_field :stock_article_id
|
||||
%span.stock_article_name= stock_change.stock_article.name
|
||||
%td.numeric.price-per-unit #{number_to_currency stock_change.stock_article.price}/#{stock_change.stock_article.unit}
|
||||
%td= f.text_field :quantity, :size => 4, :autocomplete => 'off', :required => true, :class => 'stock-change-quantity'
|
||||
%td= link_to t('.remove_article'), "#", :class => 'remove_new_stock_change btn btn-small'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue