Fixed bug when distuingish between finished and closed orders.

This commit is contained in:
Benjamin Meichsner 2009-03-13 00:06:20 +01:00
parent 20d4177990
commit 1791243b25
3 changed files with 3 additions and 3 deletions

View file

@ -27,7 +27,7 @@ class GroupOrder < ActiveRecord::Base
validates_uniqueness_of :ordergroup_id, :scope => :order_id # order groups can only order once per order validates_uniqueness_of :ordergroup_id, :scope => :order_id # order groups can only order once per order
named_scope :open, lambda { {:conditions => ["order_id IN (?)", Order.open.collect(&:id)]} } named_scope :open, lambda { {:conditions => ["order_id IN (?)", Order.open.collect(&:id)]} }
named_scope :finished, lambda { {:conditions => ["order_id IN (?)", Order.finished.collect(&:id)]} } named_scope :finished, lambda { {:conditions => ["order_id IN (?)", Order.finished_not_closed.collect(&:id)]} }
# Updates the "price" attribute. # Updates the "price" attribute.
# This will be the maximum value of an open order or # This will be the maximum value of an open order or

View file

@ -28,7 +28,7 @@
.box_title .box_title
%h2 Nicht abgerechnete Bestellungen %h2 Nicht abgerechnete Bestellungen
.column_content .column_content
= render :partial => "orders", :locals => {:orders => Order.finished} = render :partial => "orders", :locals => {:orders => Order.finished_not_closed}
- if @ordergroup.value_of_finished_orders > 0 - if @ordergroup.value_of_finished_orders > 0
%p %p
Gesamtsumme: Gesamtsumme:

View file

@ -7,7 +7,7 @@
.box_title .box_title
%h2 beendet/nicht abgerechnet %h2 beendet/nicht abgerechnet
.column_content .column_content
= render :partial => "orders", :locals => {:orders => Order.finished} = render :partial => "orders", :locals => {:orders => Order.finished_not_closed}
.single_column{:style => "width:50em"} .single_column{:style => "width:50em"}
.box_title .box_title