Big feactoring and bug fixing, Mailer, Tasks, GroupOrders

This commit is contained in:
benni 2012-08-24 11:11:40 +02:00
parent c936813967
commit 5fb0bc2444
43 changed files with 95 additions and 118 deletions

View file

@ -0,0 +1,43 @@
- title "Bestellüberblick"
// Ordergroups Account Balance
.left_column{:style => "width:26%"}
.box_title
%h2=h @ordergroup.name
.column_content
%table
%tr
%td Kontostand:
%td{:class => "currency", :style => "width:5em"}= number_to_currency(@ordergroup.account_balance)
%tr
%td= "- laufende Bestellungen:"
%td{:class => "currency"}= number_to_currency(@ordergroup.value_of_open_orders)
%tr
%td= "- nicht abgerechnete Bestellungen:"
%td{:class => "currency"}= number_to_currency(@ordergroup.value_of_finished_orders)
%tr
%th verfügbares Guthaben:
%th{:class => "currency"}= number_to_currency(@ordergroup.get_available_funds)
.right_column{:style => "width:70%"}
= render :partial => "shared/open_orders", :locals => {:ordergroup => @ordergroup}
// finished orders
- unless Order.finished.empty?
.box_title
%h2 Nicht abgerechnete Bestellungen
.column_content
= 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?
.box_title
%h2 Abgerechnete Bestellungen
.column_content
= render :partial => "orders", :locals => {:orders => Order.closed.all(:limit => 5), :pagination => false}
%br/
= link_to "mehr...", archive_group_orders_path