charge transport cost as well when accounting order (fix #861 after f7c7b56)

This commit is contained in:
twothreenine 2021-03-19 03:36:36 +01:00 committed by Patrick Gansterer
parent 052d297bff
commit f3493b3242
2 changed files with 27 additions and 1 deletions

View file

@ -391,7 +391,7 @@ class Order < ApplicationRecord
note = transaction_note
group_orders.includes(:ordergroup).each do |group_order|
if group_order.ordergroup
price = group_order.price * -1 # decrease! account balance
price = group_order.total * -1 # decrease! account balance
group_order.ordergroup.add_financial_transaction!(price, note, user, transaction_type, nil, group_order)
end
end