foodsoft/app/views/ordering/index.haml

44 lines
1.4 KiB
Text
Raw Normal View History

- title "Bestellüberblick"
2009-01-06 11:49:19 +01:00
// Ordergroups Account Balance
2009-01-06 11:49:19 +01:00
.left_column{:style => "width:26%"}
.box_title
%h2=h @ordergroup.name
2009-01-06 11:49:19 +01:00
.column_content
%table
%tr
%td Kontostand:
%td{:class => "currency", :style => "width:5em"}= number_to_currency(@ordergroup.account_balance)
2009-01-06 11:49:19 +01:00
%tr
%td - laufende Bestellungen:
%td{:class => "currency"}= number_to_currency(@ordergroup.value_of_open_orders)
2009-01-06 11:49:19 +01:00
%tr
%td - nicht abgerechnete Bestellungen:
%td{:class => "currency"}= number_to_currency(@ordergroup.value_of_finished_orders)
2009-01-06 11:49:19 +01:00
%tr
%th verfügbares Guthaben:
%th{:class => "currency"}= number_to_currency(@ordergroup.get_available_funds)
2009-01-06 11:49:19 +01:00
.right_column{:style => "width:70%"}
// open orders
= render :partial => "shared/open_orders"
2009-01-06 11:49:19 +01:00
// finished orders
- unless Order.finished.empty?
2009-01-06 11:49:19 +01:00
.box_title
%h2 Nicht abgerechnete Bestellungen
2009-01-06 11:49:19 +01:00
.column_content
= render :partial => "orders", :locals => {:orders => Order.finished_not_closed}
- if @ordergroup.value_of_finished_orders > 0
2009-01-06 11:49:19 +01:00
%p
Gesamtsumme:
%b= number_to_currency(@ordergroup.value_of_finished_orders)
2009-01-06 11:49:19 +01:00
// closed orders
- unless Order.closed.empty?
2009-01-06 11:49:19 +01:00
.box_title
%h2 Abgerechnete Bestellungen
2009-01-06 11:49:19 +01:00
.column_content
= render :partial => "orders", :locals => {:orders => Order.closed.all(:limit => 5)}
2009-01-06 11:49:19 +01:00
%br/
= link_to "mehr...", :action => "myOrders"