Fixed bug when distuingish between finished and closed orders.
This commit is contained in:
parent
20d4177990
commit
1791243b25
3 changed files with 3 additions and 3 deletions
|
@ -27,7 +27,7 @@ class GroupOrder < ActiveRecord::Base
|
|||
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 :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.
|
||||
# This will be the maximum value of an open order or
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
.box_title
|
||||
%h2 Nicht abgerechnete Bestellungen
|
||||
.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
|
||||
%p
|
||||
Gesamtsumme:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
.box_title
|
||||
%h2 beendet/nicht abgerechnet
|
||||
.column_content
|
||||
= render :partial => "orders", :locals => {:orders => Order.finished}
|
||||
= render :partial => "orders", :locals => {:orders => Order.finished_not_closed}
|
||||
|
||||
.single_column{:style => "width:50em"}
|
||||
.box_title
|
||||
|
|
Loading…
Reference in a new issue