move receive screen to orders
This commit is contained in:
parent
94b4454a1b
commit
d299fa4870
10 changed files with 75 additions and 79 deletions
21
app/views/orders/_edit_amount.html.haml
Normal file
21
app/views/orders/_edit_amount.html.haml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
= fields_for 'order_articles', order_article, index: order_article.id do |form|
|
||||
%tr{class: "#{cycle('even', 'odd', name: 'articles')} order-article", valign: "top"}
|
||||
- order_title = []
|
||||
- order_title.append Article.human_attribute_name(:manufacturer)+': ' + order_article.article.manufacturer unless order_article.article.manufacturer.to_s.empty?
|
||||
- order_title.append Article.human_attribute_name(:note)+': ' + order_article.article.note unless order_article.article.note.to_s.empty?
|
||||
- units_expected = (order_article.units_billed or order_article.units_to_order)
|
||||
%td= order_article.article.order_number
|
||||
%td.name{title: order_title.join("\n")}= order_article.article.name
|
||||
%td #{order_article.article.unit_quantity} × #{order_article.article.unit}
|
||||
%td #{order_article.quantity} + #{order_article.tolerance}
|
||||
%td
|
||||
= order_article.units_to_order
|
||||
%i.package pkg
|
||||
%td
|
||||
- unless order_article.units_billed.nil?
|
||||
= order_article.units_billed
|
||||
%i.package pkg
|
||||
%td
|
||||
= form.text_field :units_received, class: 'input-nano package', data: {'units-expected' => units_expected}
|
||||
/ TODO add almost invisible text_field for entering single units
|
||||
%td.units_delta
|
||||
Loading…
Add table
Add a link
Reference in a new issue