foodsoft/app/views/finance/balancing/_group_order_articles.html.haml

42 lines
2 KiB
Text
Raw Normal View History

%td{:colspan => "7"}
%table.table.table-striped
%thead
%tr
%td
2013-02-10 09:05:20 +01:00
%td{:style => "width:8em"}= t('.group')
%td= t('.units')
%td= t('.total')
%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),
remote: true, class: 'btn btn-mini'
%tbody
- for group_order_article in order_article.group_order_articles.select { |goa| goa.result > 0 }
%tr[group_order_article]
%td
%td{:style=>"width:50%"}
= group_order_article.group_order.ordergroup.name
%td{:id => "group_order_article_#{group_order_article.id}_quantity", :style => "white-space:nowrap"}
= group_order_article.result
= 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)
%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,
class: 'btn btn-mini'
%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,
remote: true, class: 'btn btn-mini btn-danger'
%td
%tfoot
%tr
%td
2013-06-21 13:49:34 +02:00
%td{:style => "width:8em"}= t('.total_fc')
%td{:id => "group_orders_sum_quantity_#{order_article.id}"}
= order_article.group_orders_sum[:quantity]
%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"}