foodsoft/app/views/group_orders/index.html.haml

39 lines
No EOL
1.3 KiB
Text

- title "Bestellüberblick", false
- content_for :sidebar do
.well.well-small
// Ordergroups Account Balance
%h2 Guthaben
%table.table.table-striped
%tr
%td Kontostand:
%td.numeric{:style => "width:5em"}= number_to_currency(@ordergroup.account_balance)
%tr
%td - laufende Bestellungen:
%td.numeric= number_to_currency(@ordergroup.value_of_open_orders)
%tr
%td= "- nicht abgerechnete Bestellungen:"
%td.numeric= number_to_currency(@ordergroup.value_of_finished_orders)
%tr
%th verfügbares Guthaben:
%th.numeric= number_to_currency(@ordergroup.get_available_funds)
= render :partial => "shared/open_orders", :locals => {:ordergroup => @ordergroup}
// finished orders
- unless Order.finished.empty?
%section
%h2 Nicht abgerechnete Bestellungen
= render :partial => "orders", :locals => {:orders => Order.finished_not_closed, :pagination => false}
- if @ordergroup.value_of_finished_orders > 0
%p
Gesamtsumme:
%b= number_to_currency(@ordergroup.value_of_finished_orders)
// closed orders
- unless Order.closed.empty?
%section
%h2 Abgerechnete Bestellungen
= render :partial => "orders", :locals => {:orders => Order.closed.all(:limit => 5), :pagination => false}
%br/
= link_to "mehr...", archive_group_orders_path