feat(dca): limit create-transaction accounts to the strategy currencies

This commit is contained in:
Herculino Trotta committed 2026-11-10 21:57:39 -03:00
1 parent 750b86394e
commit 3468b10e94
2 files changed
+16

No files matched your search

+2
View File
@@ -250,6 +250,7 @@ class DCAEntryForm(forms.ModelForm):
self.fields["from_account"].queryset = Account.objects.filter(
is_archived=False,
currency=self.strategy.payment_currency,
)
self.fields["from_category"].queryset = TransactionCategory.objects.filter(
@@ -259,6 +260,7 @@ class DCAEntryForm(forms.ModelForm):
self.fields["to_account"].queryset = Account.objects.filter(
is_archived=False,
currency=self.strategy.target_currency,
)
self.fields["to_category"].queryset = TransactionCategory.objects.filter(