From 777eceafb7dc159b6db8db0d0ca69e455d5a7e81 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sun, 10 Mar 2024 12:54:31 +0100 Subject: [PATCH] Fix: Auto-clear money transfers between categories Signed-off-by: Knut Ahlers --- pkg/database/database.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/database/database.go b/pkg/database/database.go index dcebb5e..eb9531b 100644 --- a/pkg/database/database.go +++ b/pkg/database/database.go @@ -341,7 +341,7 @@ func (c *Client) TransferMoney(from, to uuid.UUID, amount float64, description s Amount: -amount, Account: uuid.NullUUID{}, Category: uuid.NullUUID{UUID: from, Valid: true}, - Cleared: false, + Cleared: true, PairKey: uuid.NullUUID{UUID: pairKey, Valid: true}, }, { @@ -351,7 +351,7 @@ func (c *Client) TransferMoney(from, to uuid.UUID, amount float64, description s Amount: amount, Account: uuid.NullUUID{}, Category: uuid.NullUUID{UUID: to, Valid: true}, - Cleared: false, + Cleared: true, PairKey: uuid.NullUUID{UUID: pairKey, Valid: true}, }, }