Adopt model to reference GroupOrder in generated FinancialTransaction

This commit is contained in:
Patrick Gansterer 2019-11-04 04:33:43 +01:00
parent b6542fb711
commit 17059a8104
7 changed files with 17 additions and 5 deletions

View file

@ -244,7 +244,7 @@ class Order < ApplicationRecord
for group_order in gos
if group_order.ordergroup
price = group_order.price * -1 # decrease! account balance
group_order.ordergroup.add_financial_transaction!(price, transaction_note, user, transaction_type)
group_order.ordergroup.add_financial_transaction!(price, transaction_note, user, transaction_type, nil, group_order)
end
end