fix closed group_order totals

This commit is contained in:
wvengen 2013-07-02 12:01:25 +02:00
parent d7540bdd20
commit 497c9e0cf1
3 changed files with 14 additions and 2 deletions

View file

@ -0,0 +1,12 @@
class UpdateGroupOrderTotals < ActiveRecord::Migration
def self.up
# The group_order total was updated to the total ordered amount instead of
# the amount received. Now this is fixed, the totals need to be updated.
GroupOrder.all.each do |go|
go.order.closed? and go.update_price!
end
end
def self.down
end
end