mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-11 20:44:32 -05:00
fix: balance rule action template variable (#6198)
* fix: balance rule action template variable for transactions without category * added release notes --------- Co-authored-by: Tom Griffin <tom.griffin@citypantry.com> Co-authored-by: Tom Griffin <tomgriffin@Toms-MBP.communityfibre.co.uk>
This commit is contained in:
@@ -959,13 +959,6 @@ export async function prepareTransactionForRules(
|
||||
r._account = await getAccount(trans.account);
|
||||
r._account_name = r._account?.name || '';
|
||||
}
|
||||
}
|
||||
|
||||
if (trans.category) {
|
||||
const category = await getCategory(trans.category);
|
||||
if (category) {
|
||||
r._category_name = category.name;
|
||||
}
|
||||
|
||||
const dateBoundary = trans.date ?? currentDay();
|
||||
let query = q('transactions')
|
||||
@@ -1005,6 +998,13 @@ export async function prepareTransactionForRules(
|
||||
r.balance = balance ?? 0;
|
||||
}
|
||||
|
||||
if (trans.category) {
|
||||
const category = await getCategory(trans.category);
|
||||
if (category) {
|
||||
r._category_name = category.name;
|
||||
}
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
6
upcoming-release-notes/6198.md
Normal file
6
upcoming-release-notes/6198.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfix
|
||||
authors: [sys044]
|
||||
---
|
||||
|
||||
Fixes the balance rule action templating variable for uncategorised transactions
|
||||
Reference in New Issue
Block a user