2012-10-06 17:14:57 +02:00
|
|
|
%section
|
2009-01-29 01:57:51 +01:00
|
|
|
%h2 Laufende Bestellungen
|
2012-09-29 17:52:25 +02:00
|
|
|
- if ordergroup.not_enough_apples?
|
2012-10-06 17:14:57 +02:00
|
|
|
.alert Achtung, Deine Bestellgruppe hat zu wenig Äpfel um Bestellen zu können!
|
2009-01-29 01:57:51 +01:00
|
|
|
- unless Order.open.empty?
|
2012-10-06 17:14:57 +02:00
|
|
|
%table.table.table-striped
|
2009-01-29 01:57:51 +01:00
|
|
|
%thead
|
|
|
|
%tr
|
2009-03-22 13:56:54 +01:00
|
|
|
%th Lieferantin
|
2009-01-29 01:57:51 +01:00
|
|
|
%th Ende
|
|
|
|
%th Wer hat bestellt?
|
|
|
|
%th Summe
|
|
|
|
%tbody
|
|
|
|
- total = 0
|
|
|
|
- Order.open.each do |order|
|
2012-10-06 17:14:57 +02:00
|
|
|
%tr
|
2011-06-19 15:30:33 +02:00
|
|
|
%td= link_to_ordering(order)
|
2009-01-29 01:57:51 +01:00
|
|
|
%td=h format_time(order.ends) unless order.ends.nil?
|
2011-06-13 15:26:06 +02:00
|
|
|
- if group_order = order.group_order(ordergroup)
|
2009-01-29 01:57:51 +01:00
|
|
|
- total += group_order.price
|
2011-06-13 15:26:06 +02:00
|
|
|
%td= "#{group_order.updated_by.nick} (#{format_time(group_order.updated_on)})"
|
2009-01-29 01:57:51 +01:00
|
|
|
%td= number_to_currency(group_order.price)
|
|
|
|
- else
|
2011-06-13 15:26:06 +02:00
|
|
|
%td{:colspan => 2}
|
2012-10-06 17:14:57 +02:00
|
|
|
- if total > 0
|
|
|
|
%tfooter
|
|
|
|
%tr
|
|
|
|
%th(colspan="2")
|
|
|
|
%th Gesamtsumme:
|
|
|
|
%th= number_to_currency(total)
|
2009-01-29 01:57:51 +01:00
|
|
|
- else
|
|
|
|
%i Derzeit gibt es keine laufenden Bestellungen
|