From 11d5d58bc791bf54e14caa2fa89c1b99a4630bf9 Mon Sep 17 00:00:00 2001 From: Vishwa Raghavendra K S Date: Sun, 7 Apr 2024 08:46:59 +0530 Subject: [PATCH] [IVY-2910] Fix Incorrect Balance Transfer --- .../ivy/legacy/domain/pure/transaction/AccountValueFunctions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/temp/legacy-code/src/main/java/com/ivy/legacy/domain/pure/transaction/AccountValueFunctions.kt b/temp/legacy-code/src/main/java/com/ivy/legacy/domain/pure/transaction/AccountValueFunctions.kt index 92cecdc4ce..f23e94c5db 100644 --- a/temp/legacy-code/src/main/java/com/ivy/legacy/domain/pure/transaction/AccountValueFunctions.kt +++ b/temp/legacy-code/src/main/java/com/ivy/legacy/domain/pure/transaction/AccountValueFunctions.kt @@ -52,7 +52,7 @@ object AccountValueFunctions { transaction: Transaction, accountId: UUID ): BigDecimal = with(transaction) { - if (this.getAccountId() == accountId && this is Transfer) { + if (this is Transfer && this.toAccount.value == accountId) { this.toValue.amount.value.toBigDecimal() } else { BigDecimal.ZERO