2013-12-31 09:58:58 +01:00
|
|
|
-# NOTE: if you modify tiny details here you must also change them in `receive_on_order_article_update.js.erb`
|
2013-11-25 13:48:54 +01:00
|
|
|
= fields_for 'order_articles', order_article, index: order_article.id do |form|
|
2013-12-30 14:34:26 +01:00
|
|
|
%tr{id: "order_article_#{order_article.id}", class: "#{cycle('even', 'odd', name: 'articles')} order-article", valign: "top"}
|
2013-11-25 13:48:54 +01:00
|
|
|
- order_title = []
|
2013-11-25 15:24:20 +01:00
|
|
|
- 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?
|
2013-11-25 13:48:54 +01:00
|
|
|
%td= order_article.article.order_number
|
|
|
|
%td.name{title: order_title.join("\n")}= order_article.article.name
|
2013-12-30 14:34:26 +01:00
|
|
|
%td.unit= order_article.article.unit
|
2014-01-02 21:59:08 +01:00
|
|
|
%td.article_price
|
2014-01-03 10:44:57 +01:00
|
|
|
= number_to_currency order_article.article_price.price
|
2014-01-02 21:59:08 +01:00
|
|
|
= article_price_change_hint(order_article)
|
2013-11-25 13:48:54 +01:00
|
|
|
%td #{order_article.quantity} + #{order_article.tolerance}
|
2013-12-19 00:45:14 +01:00
|
|
|
%td
|
2013-11-25 15:13:54 +01:00
|
|
|
= order_article.units_to_order
|
2014-01-02 22:30:04 +01:00
|
|
|
= pkg_helper order_article.article
|
2013-12-19 00:45:14 +01:00
|
|
|
-#%td # TODO implement invoice screen
|
2013-11-25 15:13:54 +01:00
|
|
|
- unless order_article.units_billed.nil?
|
|
|
|
= order_article.units_billed
|
2014-01-02 22:30:04 +01:00
|
|
|
= pkg_helper order_article.article
|
2014-01-02 21:59:08 +01:00
|
|
|
%td.units_received_cell
|
2014-01-03 10:33:09 +01:00
|
|
|
= receive_input_field(form)
|
2014-01-02 22:30:04 +01:00
|
|
|
= pkg_helper order_article.article_price, false
|
2014-01-03 10:33:09 +01:00
|
|
|
- if order_article.result_manually_changed?
|
|
|
|
%input{type: :button, value: t('.override', default: 'Override'), class: 'btn btn-small unlocker'}
|
2013-11-25 13:48:54 +01:00
|
|
|
/ TODO add almost invisible text_field for entering single units
|
|
|
|
%td.units_delta
|
2013-12-30 14:34:26 +01:00
|
|
|
%td
|
2013-12-31 11:41:14 +01:00
|
|
|
= link_to t('ui.edit'), edit_order_order_article_path(order_article.order, order_article), remote: true, class: 'btn btn-mini'
|