foodsoft/app/views/shared/_open_orders.html.haml
wvengen 1f08ee4759 Merge remote-tracking branch 'foodcoops/master' into feature-link_to_group_order
Conflicts:
	app/views/shared/_open_orders.html.haml
2013-11-25 10:11:56 +01:00

35 lines
1.1 KiB
Text

%section
%h2= t '.title'
- if ordergroup.not_enough_apples?
.alert
= t '.not_enough_apples'
- unless Order.open.empty?
%table.table.table-striped
%thead
%tr
%th= t '.supplier'
%th= t '.ending'
%th= t '.who_ordered'
%th.numeric= t '.total'
%tbody
- total = 0
- Order.open.each do |order|
%tr
%td= link_to_ordering(order)
%td= format_time(order.ends) unless order.ends.nil?
- if group_order = order.group_order(ordergroup)
- total += group_order.price
%td= "#{show_user group_order.updated_by} (#{format_time(group_order.updated_on)})"
%td.numeric
= link_to_ordering(order, show: true) do
- number_to_currency(group_order.price)
- else
%td{:colspan => 2}
- if total > 0
%tfooter
%tr
%th(colspan="2")
%th= t('.total_sum') + ':'
%th.numeric= number_to_currency(total)
- else
%i= t '.no_open_orders'