Skip to content

Commit

Permalink
Match on amount when creating a rule from a transaction (#2786)
Browse files Browse the repository at this point in the history
* Use amount when creating a rule from a transaction

* Add release notes
  • Loading branch information
jfdoming authored May 22, 2024
1 parent 8415e7c commit b803731
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/desktop-client/src/components/accounts/Account.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1093,11 +1093,17 @@ class AccountInternal extends PureComponent {
value: ruleTransaction.payee,
type: 'id',
};
const amountCondition = {
field: 'amount',
op: 'isapprox',
value: ruleTransaction.amount,
type: 'number',
};

const rule = {
stage: null,
conditionsOp: 'and',
conditions: [payeeCondition],
conditions: [payeeCondition, amountCondition],
actions: [
...(childTransactions.length === 0
? [
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/2786.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [jfdoming]
---

Match on `amount` when creating a rule from a transaction

0 comments on commit b803731

Please sign in to comment.