foodsoft/app/views/orders/_edit_amount.html.haml
wvengen 98f59a3de3 Readonly receive input if GroupOrderArticle result has manually been changed
Conflicts:
	app/helpers/orders_helper.rb
	app/views/orders/_edit_amount.html.haml
2014-01-03 10:33:09 +01:00

27 lines
1.6 KiB
Text

-# NOTE: if you modify tiny details here you must also change them in `receive_on_order_article_update.js.erb`
= fields_for 'order_articles', order_article, index: order_article.id do |form|
%tr{id: "order_article_#{order_article.id}", 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?
%td= order_article.article.order_number
%td.name{title: order_title.join("\n")}= order_article.article.name
%td.unit= order_article.article.unit
%td.article_price= number_to_currency order_article.article.price
%td #{order_article.quantity} + #{order_article.tolerance}
%td
= order_article.units_to_order
= pkg_helper order_article.article
-#%td # TODO implement invoice screen
- unless order_article.units_billed.nil?
= order_article.units_billed
= pkg_helper order_article.article
%td
= receive_input_field(form)
= pkg_helper order_article.article_price, false
- if order_article.result_manually_changed?
%input{type: :button, value: t('.override', default: 'Override'), class: 'btn btn-small unlocker'}
/ TODO add almost invisible text_field for entering single units
%td.units_delta
%td
= link_to t('ui.edit'), edit_order_order_article_path(order_article.order, order_article), remote: true, class: 'btn btn-mini'