1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 23:59:40 +02:00

Fix unable to create Deposit entries in investment portfolio (#1125)

* Fix unable to create Deposit entries in investment portfolio

* Add system test for deposit transaction
This commit is contained in:
Tony Vincent 2024-08-25 23:48:46 +02:00 committed by GitHub
parent 52c729dc33
commit e1efe97e6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 1 deletions

View file

@ -21,7 +21,7 @@ class Account::TransactionBuilder
end
def create_transfer
return create_unlinked_transfer(account.id, signed_amount) unless transfer_account_id
return create_unlinked_transfer(account.id, signed_amount) if transfer_account_id.blank?
from_account_id = type == "transfer_in" ? transfer_account_id : account.id
to_account_id = type == "transfer_in" ? account.id : transfer_account_id