2012-10-06 17:14:57 +02:00
|
|
|
%section
|
2013-02-08 19:16:06 +01:00
|
|
|
%h2= t '.title'
|
2012-09-29 17:52:25 +02:00
|
|
|
- if ordergroup.not_enough_apples?
|
2013-02-08 19:16:06 +01:00
|
|
|
.alert
|
2013-10-17 16:35:50 +02:00
|
|
|
= t '.not_enough_apples'
|
2020-02-25 00:38:06 +01:00
|
|
|
- orders = Order.open.started
|
|
|
|
- unless orders.empty?
|
2012-10-06 17:14:57 +02:00
|
|
|
%table.table.table-striped
|
2009-01-29 01:57:51 +01:00
|
|
|
%thead
|
|
|
|
%tr
|
2013-11-23 17:28:21 +01:00
|
|
|
%th= heading_helper Order, :name
|
2023-02-20 18:52:13 +01:00
|
|
|
%th
|
2016-04-29 15:28:05 +02:00
|
|
|
%th= heading_helper Order, :pickup
|
2013-11-23 17:28:21 +01:00
|
|
|
%th= heading_helper Order, :ends
|
2013-02-08 19:16:06 +01:00
|
|
|
%th= t '.who_ordered'
|
2013-12-11 22:39:37 +01:00
|
|
|
%th.numeric= heading_helper GroupOrder, :price
|
2009-01-29 01:57:51 +01:00
|
|
|
%tbody
|
|
|
|
- total = 0
|
2020-02-25 00:38:06 +01:00
|
|
|
- orders.each do |order|
|
2012-10-06 17:14:57 +02:00
|
|
|
%tr
|
2023-02-20 18:52:13 +01:00
|
|
|
%td
|
|
|
|
= link_to_ordering(order, show: true)
|
|
|
|
%td
|
|
|
|
.btn-small= link_to_ordering(order){ t 'ui.edit' }
|
2016-04-29 15:28:05 +02:00
|
|
|
%td= format_date(order.pickup) unless order.pickup.nil?
|
2012-10-15 21:19:17 +02:00
|
|
|
%td= 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
|
2013-09-20 22:40:13 +02:00
|
|
|
%td= "#{show_user group_order.updated_by} (#{format_time(group_order.updated_on)})"
|
2013-11-25 10:04:44 +01:00
|
|
|
%td.numeric
|
2023-02-20 18:52:13 +01:00
|
|
|
= number_to_currency(group_order.price)
|
2009-01-29 01:57:51 +01:00
|
|
|
- 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
|
2023-02-20 18:52:13 +01:00
|
|
|
%th(colspan="4")
|
2013-02-08 19:16:06 +01:00
|
|
|
%th= t('.total_sum') + ':'
|
2012-10-15 21:19:17 +02:00
|
|
|
%th.numeric= number_to_currency(total)
|
2009-01-29 01:57:51 +01:00
|
|
|
- else
|
2013-02-08 19:16:06 +01:00
|
|
|
%i= t '.no_open_orders'
|