Refactored finance/ordergroups|transactions module.
This commit is contained in:
parent
fc1d130113
commit
ea6348bc5c
38 changed files with 967 additions and 443 deletions
|
|
@ -178,7 +178,7 @@ class Order < ActiveRecord::Base
|
|||
transaction do # Start updating account balances
|
||||
for group_order in gos
|
||||
price = group_order.price * -1 # decrease! account balance
|
||||
group_order.ordergroup.add_financial_transaction(price, transaction_note, user)
|
||||
group_order.ordergroup.add_financial_transaction!(price, transaction_note, user)
|
||||
end
|
||||
|
||||
if stockit? # Decreases the quantity of stock_articles
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue