Skip to content

Commit

Permalink
charge transport cost as well when accounting order (fix foodcoops#861
Browse files Browse the repository at this point in the history
…after f7c7b56)
  • Loading branch information
twothreenine authored and paroga committed Oct 19, 2021
1 parent 552e12e commit 6deec10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def charge_group_orders!(user, transaction_type = nil)
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
Expand Down

0 comments on commit 6deec10

Please sign in to comment.