Fix: Auto-clear money transfers between categories

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2024-03-10 12:54:31 +01:00
parent 4e255c2740
commit 777eceafb7
Signed by: luzifer
SSH Key Fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E

View File

@ -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},
},
}