Fixed wrong price value of GroupOrder when finishing an order.
This commit is contained in:
parent
dd940fb414
commit
37c9e2aeaf
2 changed files with 11 additions and 3 deletions
|
|
@ -170,6 +170,9 @@ class Order < ActiveRecord::Base
|
|||
oa.update_attribute(:article_price, oa.article.article_prices.first)
|
||||
oa.group_order_articles.each { |goa| goa.save_results! }
|
||||
end
|
||||
# Update GroupOrder prices
|
||||
group_orders.each { |go| go.update_price! }
|
||||
|
||||
# set new order state (needed by notify_order_finished)
|
||||
update_attributes(:state => 'finished', :ends => Time.now, :updated_by => user)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue