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
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