mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-30 10:14:53 -05:00
Fix scheduled transfers not linking when payee account is imported first (#6025)
This commit is contained in:
committed by
GitHub
parent
e786bdc398
commit
1a845583ef
@@ -68,14 +68,21 @@ export async function addTransfer(transaction, transferredAccount) {
|
||||
schedule: transaction.schedule,
|
||||
cleared: false,
|
||||
};
|
||||
const { notes, cleared } = await runRules(transferTransaction);
|
||||
const { notes, cleared, schedule } = await runRules(transferTransaction);
|
||||
const matchedSchedule = schedule ?? transaction.schedule;
|
||||
|
||||
const id = await db.insertTransaction({
|
||||
...transferTransaction,
|
||||
notes,
|
||||
cleared,
|
||||
schedule: matchedSchedule,
|
||||
});
|
||||
|
||||
await db.updateTransaction({ id: transaction.id, transfer_id: id });
|
||||
await db.updateTransaction({
|
||||
id: transaction.id,
|
||||
transfer_id: id,
|
||||
...(matchedSchedule ? { schedule: matchedSchedule } : {}),
|
||||
});
|
||||
const categoryCleared = await clearCategory(transaction, transferredAccount);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user