mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-12-01 12:44:15 +01:00
feat(rules): add, change and remove sub-transactions in rules
Adds a Sub-transactions field to edit actions and update-or-create
actions. Expressions get a sub_transactions variable and return a list of
{name, amount}; an empty list removes the parts. Rules skip transfers, and
setting the amount of a split transaction is skipped.
This commit is contained in:
1 parent
5459865366
commit
188876fdf0
6 files changed
+236
-8
No files matched your search
@@ -39,6 +39,7 @@ class TransactionRuleAction(models.Model):
|
||||
reference_date = "reference_date", _("Reference Date")
|
||||
mute = "mute", _("Mute")
|
||||
amount = "amount", _("Amount")
|
||||
sub_transactions = "sub_transactions", _("Sub-transactions")
|
||||
description = "description", _("Description")
|
||||
notes = "notes", _("Notes")
|
||||
category = "category", _("Category")
|
||||
@@ -315,6 +316,10 @@ class UpdateOrCreateTransactionRuleAction(models.Model):
|
||||
verbose_name=_("Tags"),
|
||||
blank=True,
|
||||
)
|
||||
set_sub_transactions = models.TextField(
|
||||
verbose_name=_("Sub-transactions"),
|
||||
blank=True,
|
||||
)
|
||||
set_mute = models.TextField(
|
||||
verbose_name=_("Mute"),
|
||||
blank=True,
|
||||
|
||||
Reference in new issue
Block a user