From 04dec4aa8fcc956aa98a88d6687789e5ea6396f5 Mon Sep 17 00:00:00 2001 From: Joel Jeremy Marquez Date: Fri, 6 Oct 2023 15:06:55 -0700 Subject: [PATCH] Prevent parent transaction from being added to transfer account (#1751) * Prevent parent transaction from being added to transfer account * Release notes --- packages/loot-core/src/server/accounts/transfer.ts | 4 ++++ upcoming-release-notes/1751.md | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 upcoming-release-notes/1751.md diff --git a/packages/loot-core/src/server/accounts/transfer.ts b/packages/loot-core/src/server/accounts/transfer.ts index 36e666c3469..8d4e0d84f8d 100644 --- a/packages/loot-core/src/server/accounts/transfer.ts +++ b/packages/loot-core/src/server/accounts/transfer.ts @@ -154,6 +154,10 @@ export async function onDelete(transaction) { export async function onUpdate(transaction) { const transferredAccount = await getTransferredAccount(transaction); + if (transaction.is_parent) { + return removeTransfer(transaction); + } + if (transferredAccount && !transaction.transfer_id) { return addTransfer(transaction, transferredAccount); } diff --git a/upcoming-release-notes/1751.md b/upcoming-release-notes/1751.md new file mode 100644 index 00000000000..8ff15646aeb --- /dev/null +++ b/upcoming-release-notes/1751.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [joel-jeremy] +--- + +Prevent parent transaction being added to transfer account when splitting an existing transaction.