2009-01-29 21:28:22 +01:00
|
|
|
%td{:colspan => "7"}
|
2012-11-10 16:44:05 +01:00
|
|
|
%table.table.table-striped
|
2009-01-29 21:28:22 +01:00
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%td
|
2013-12-12 00:13:19 +01:00
|
|
|
%td{:style => "width:8em"}= Ordergroup.model_name.human
|
2013-02-10 09:05:20 +01:00
|
|
|
%td= t('.units')
|
|
|
|
%td= t('.total')
|
2009-01-29 21:28:22 +01:00
|
|
|
%td{:colspan => "3",:style => "width:14em"}
|
2013-02-10 09:05:20 +01:00
|
|
|
= link_to t('.add_group'), new_finance_group_order_article_path(order_article_id: order_article.id),
|
2012-11-10 16:44:05 +01:00
|
|
|
remote: true, class: 'btn btn-mini'
|
2009-01-29 21:28:22 +01:00
|
|
|
%tbody
|
2013-03-12 12:34:05 +01:00
|
|
|
- for group_order_article in order_article.group_order_articles.select { |goa| goa.result > 0 }
|
2012-11-10 16:44:05 +01:00
|
|
|
%tr[group_order_article]
|
2009-01-29 21:28:22 +01:00
|
|
|
%td
|
|
|
|
%td{:style=>"width:50%"}
|
|
|
|
= group_order_article.group_order.ordergroup.name
|
2009-03-20 18:56:17 +01:00
|
|
|
%td{:id => "group_order_article_#{group_order_article.id}_quantity", :style => "white-space:nowrap"}
|
2009-02-04 16:41:01 +01:00
|
|
|
= group_order_article.result
|
2012-11-10 16:44:05 +01:00
|
|
|
= link_to "+", update_result_finance_group_order_article_path(group_order_article, modifier: '+'),
|
|
|
|
method: :put, remote: true, class: 'btn btn-mini'
|
|
|
|
= link_to "-", update_result_finance_group_order_article_path(group_order_article, modifier: '-'),
|
|
|
|
method: :put, remote: true, class: 'btn btn-mini'
|
|
|
|
%td.numeric
|
2013-06-21 13:49:34 +02:00
|
|
|
= number_to_currency(group_order_article.order_article.price.fc_price * group_order_article.result)
|
2009-01-29 21:28:22 +01:00
|
|
|
%td.actions{:style=>"width:1em"}
|
2013-06-21 13:49:34 +02:00
|
|
|
= link_to t('ui.edit'), edit_finance_group_order_article_path(group_order_article), remote: true,
|
2012-11-10 16:44:05 +01:00
|
|
|
class: 'btn btn-mini'
|
2009-01-29 21:28:22 +01:00
|
|
|
%td.actions{:style=>"width:1em"}
|
2013-06-21 13:49:34 +02:00
|
|
|
= link_to t('ui.delete'), finance_group_order_article_path(group_order_article), method: :delete,
|
2012-11-10 16:44:05 +01:00
|
|
|
remote: true, class: 'btn btn-mini btn-danger'
|
2009-01-29 21:28:22 +01:00
|
|
|
%td
|
|
|
|
%tfoot
|
2012-11-10 16:44:05 +01:00
|
|
|
%tr
|
2009-01-29 21:28:22 +01:00
|
|
|
%td
|
2013-06-21 13:49:34 +02:00
|
|
|
%td{:style => "width:8em"}= t('.total_fc')
|
2009-01-29 21:28:22 +01:00
|
|
|
%td{:id => "group_orders_sum_quantity_#{order_article.id}"}
|
|
|
|
= order_article.group_orders_sum[:quantity]
|
2012-11-10 16:44:05 +01:00
|
|
|
%td.numeric{:id => "group_orders_sum_price_#{order_article.id}"}
|
2013-06-21 13:49:34 +02:00
|
|
|
= number_to_currency(order_article.group_orders_sum[:price])
|
|
|
|
%td{:colspan => "3"}
|