diff --git a/app/apps/common/fields/forms/dynamic_select.py b/app/apps/common/fields/forms/dynamic_select.py index 6e0a8c6..e7ce943 100644 --- a/app/apps/common/fields/forms/dynamic_select.py +++ b/app/apps/common/fields/forms/dynamic_select.py @@ -12,15 +12,14 @@ class DynamicModelChoiceField(forms.ModelChoiceField): self.to_field_name = kwargs.pop("to_field_name", "pk") self.create_field = kwargs.pop("create_field", None) - if not self.create_field: - raise ValueError("The 'create_field' parameter is required.") self.queryset = kwargs.pop("queryset", model.objects.all()) - super().__init__(queryset=self.queryset, *args, **kwargs) - self._created_instance = None self.widget = TomSelect(clear_button=True, create=True) + super().__init__(queryset=self.queryset, *args, **kwargs) + self._created_instance = None + def to_python(self, value): if value in self.empty_values: return None @@ -53,14 +52,19 @@ class DynamicModelChoiceField(forms.ModelChoiceField): else: raise self.model.DoesNotExist except self.model.DoesNotExist: - try: - with transaction.atomic(): - instance, _ = self.model.objects.update_or_create( - **{self.create_field: value} + if self.create_field: + try: + with transaction.atomic(): + instance, _ = self.model.objects.update_or_create( + **{self.create_field: value} + ) + self._created_instance = instance + return instance + except Exception as e: + raise ValidationError( + self.error_messages["invalid_choice"], code="invalid_choice" ) - self._created_instance = instance - return instance - except Exception as e: + else: raise ValidationError( self.error_messages["invalid_choice"], code="invalid_choice" ) diff --git a/app/apps/common/widgets/tom_select.py b/app/apps/common/widgets/tom_select.py index 6de3a73..125610a 100644 --- a/app/apps/common/widgets/tom_select.py +++ b/app/apps/common/widgets/tom_select.py @@ -1,4 +1,5 @@ from django.forms import widgets, SelectMultiple +from django.urls import reverse from django.utils.translation import gettext_lazy as _ @@ -129,3 +130,28 @@ class TomSelect(widgets.Select): class TomSelectMultiple(SelectMultiple, TomSelect): pass + + +class TransactionSelect(TomSelect): + def __init__(self, income: bool = True, expense: bool = True, *args, **kwargs): + super().__init__(*args, **kwargs) + + self.load_income = income + self.load_expense = expense + self.create = False + + def build_attrs(self, base_attrs, extra_attrs=None): + attrs = super().build_attrs(base_attrs, extra_attrs) + + if self.load_income and self.load_expense: + attrs["data-load"] = reverse("transactions_search") + elif self.load_income and not self.load_expense: + attrs["data-load"] = reverse( + "transactions_search", kwargs={"filter_type": "income"} + ) + elif self.load_expense and not self.load_income: + attrs["data-load"] = reverse( + "transactions_search", kwargs={"filter_type": "expenses"} + ) + + return attrs diff --git a/app/apps/dca/forms.py b/app/apps/dca/forms.py index a4e052e..a0a25c3 100644 --- a/app/apps/dca/forms.py +++ b/app/apps/dca/forms.py @@ -1,14 +1,22 @@ -from crispy_forms.bootstrap import FormActions +from crispy_bootstrap5.bootstrap5 import Switch, BS5Accordion +from crispy_forms.bootstrap import FormActions, AccordionGroup from crispy_forms.helper import FormHelper -from crispy_forms.layout import Layout, Row, Column +from crispy_forms.layout import Layout, Row, Column, HTML from django import forms from django.utils.translation import gettext_lazy as _ +from apps.accounts.models import Account from apps.common.widgets.crispy.submit import NoClassSubmit from apps.common.widgets.datepicker import AirDatePickerInput from apps.common.widgets.decimal import ArbitraryDecimalDisplayNumberInput from apps.common.widgets.tom_select import TomSelect from apps.dca.models import DCAStrategy, DCAEntry +from apps.common.widgets.tom_select import TransactionSelect +from apps.transactions.models import Transaction, TransactionTag, TransactionCategory +from apps.common.fields.forms.dynamic_select import ( + DynamicModelChoiceField, + DynamicModelMultipleChoiceField, +) class DCAStrategyForm(forms.ModelForm): @@ -53,6 +61,75 @@ class DCAStrategyForm(forms.ModelForm): class DCAEntryForm(forms.ModelForm): + create_transaction = forms.BooleanField( + label=_("Create transaction"), initial=False, required=False + ) + + from_account = forms.ModelChoiceField( + queryset=Account.objects.filter(is_archived=False), + label=_("From Account"), + widget=TomSelect(clear_button=False, group_by="group"), + required=False, + ) + to_account = forms.ModelChoiceField( + queryset=Account.objects.filter(is_archived=False), + label=_("To Account"), + widget=TomSelect(clear_button=False, group_by="group"), + required=False, + ) + + from_category = DynamicModelChoiceField( + create_field="name", + model=TransactionCategory, + required=False, + label=_("Category"), + queryset=TransactionCategory.objects.filter(active=True), + ) + to_category = DynamicModelChoiceField( + create_field="name", + model=TransactionCategory, + required=False, + label=_("Category"), + queryset=TransactionCategory.objects.filter(active=True), + ) + + from_tags = DynamicModelMultipleChoiceField( + model=TransactionTag, + to_field_name="name", + create_field="name", + required=False, + label=_("Tags"), + queryset=TransactionTag.objects.filter(active=True), + ) + to_tags = DynamicModelMultipleChoiceField( + model=TransactionTag, + to_field_name="name", + create_field="name", + required=False, + label=_("Tags"), + queryset=TransactionTag.objects.filter(active=True), + ) + + expense_transaction = DynamicModelChoiceField( + model=Transaction, + to_field_name="id", + label=_("Expense Transaction"), + required=False, + queryset=Transaction.objects.none(), + widget=TransactionSelect(clear_button=True, income=False, expense=True), + help_text=_("Type to search for a transaction to link to this entry"), + ) + + income_transaction = DynamicModelChoiceField( + model=Transaction, + to_field_name="id", + label=_("Income Transaction"), + required=False, + queryset=Transaction.objects.none(), + widget=TransactionSelect(clear_button=True, income=True, expense=False), + help_text=_("Type to search for a transaction to link to this entry"), + ) + class Meta: model = DCAEntry fields = [ @@ -60,13 +137,19 @@ class DCAEntryForm(forms.ModelForm): "amount_paid", "amount_received", "notes", + "expense_transaction", + "income_transaction", ] widgets = { "notes": forms.Textarea(attrs={"rows": 3}), } def __init__(self, *args, **kwargs): + strategy = kwargs.pop("strategy", None) super().__init__(*args, **kwargs) + + self.strategy = strategy if strategy else self.instance.strategy + self.helper = FormHelper() self.helper.form_tag = False self.helper.layout = Layout( @@ -75,18 +158,66 @@ class DCAEntryForm(forms.ModelForm): Column("amount_paid", css_class="form-group col-md-6"), Column("amount_received", css_class="form-group col-md-6"), ), - Row( - Column("expense_transaction", css_class="form-group col-md-6"), - Column("income_transaction", css_class="form-group col-md-6"), - ), "notes", + BS5Accordion( + AccordionGroup( + _("Create transaction"), + Switch("create_transaction"), + Row( + Column( + Row( + Column( + "from_account", + css_class="form-group col-md-6 mb-0", + ), + css_class="form-row", + ), + Row( + Column( + "from_category", + css_class="form-group col-md-6 mb-0", + ), + Column( + "from_tags", css_class="form-group col-md-6 mb-0" + ), + css_class="form-row", + ), + ), + css_class="p-1 mx-1 my-3 border rounded-3", + ), + Row( + Column( + Row( + Column( + "to_account", + css_class="form-group col-md-6 mb-0", + ), + css_class="form-row", + ), + Row( + Column( + "to_category", css_class="form-group col-md-6 mb-0" + ), + Column("to_tags", css_class="form-group col-md-6 mb-0"), + css_class="form-row", + ), + ), + css_class="p-1 mx-1 my-3 border rounded-3", + ), + active=False, + ), + AccordionGroup( + _("Link transaction"), + "income_transaction", + "expense_transaction", + ), + flush=False, + always_open=False, + css_class="mb-3", + ), ) if self.instance and self.instance.pk: - # decimal_places = self.instance.account.currency.decimal_places - # self.fields["amount"].widget = ArbitraryDecimalDisplayNumberInput( - # decimal_places=decimal_places - # ) self.helper.layout.append( FormActions( NoClassSubmit( @@ -95,7 +226,6 @@ class DCAEntryForm(forms.ModelForm): ), ) else: - # self.fields["amount"].widget = ArbitraryDecimalDisplayNumberInput() self.helper.layout.append( FormActions( NoClassSubmit( @@ -107,3 +237,118 @@ class DCAEntryForm(forms.ModelForm): self.fields["amount_paid"].widget = ArbitraryDecimalDisplayNumberInput() self.fields["amount_received"].widget = ArbitraryDecimalDisplayNumberInput() self.fields["date"].widget = AirDatePickerInput(clear_button=False) + + expense_transaction = None + income_transaction = None + if self.instance and self.instance.pk: + # Edit mode - get from instance + expense_transaction = self.instance.expense_transaction + income_transaction = self.instance.income_transaction + elif self.data.get("expense_transaction"): + # Form validation - get from submitted data + try: + expense_transaction = Transaction.objects.get( + id=self.data["expense_transaction"] + ) + income_transaction = Transaction.objects.get( + id=self.data["income_transaction"] + ) + except Transaction.DoesNotExist: + pass + + # If we have a current transaction, ensure it's in the queryset + if income_transaction: + self.fields["income_transaction"].queryset = Transaction.objects.filter( + id=income_transaction.id + ) + if expense_transaction: + self.fields["expense_transaction"].queryset = Transaction.objects.filter( + id=expense_transaction.id + ) + + def clean(self): + cleaned_data = super().clean() + + if cleaned_data.get("create_transaction"): + from_account = cleaned_data.get("from_account") + to_account = cleaned_data.get("to_account") + + if not from_account and not to_account: + raise forms.ValidationError( + { + "from_account": _("You must provide an account."), + "to_account": _("You must provide an account."), + } + ) + elif not from_account and to_account: + raise forms.ValidationError( + {"from_account": _("You must provide an account.")} + ) + elif not to_account and from_account: + raise forms.ValidationError( + {"to_account": _("You must provide an account.")} + ) + + if from_account == to_account: + raise forms.ValidationError( + _("From and To accounts must be different.") + ) + + return cleaned_data + + def save(self, **kwargs): + instance = super().save(commit=False) + + if self.cleaned_data.get("create_transaction"): + from_account = self.cleaned_data["from_account"] + to_account = self.cleaned_data["to_account"] + from_amount = instance.amount_paid + to_amount = instance.amount_received + date = instance.date + description = _("DCA for %(strategy_name)s") % { + "strategy_name": self.strategy.name + } + from_category = self.cleaned_data.get("from_category") + to_category = self.cleaned_data.get("to_category") + notes = self.cleaned_data.get("notes") + + # Create "From" transaction + from_transaction = Transaction.objects.create( + account=from_account, + type=Transaction.Type.EXPENSE, + is_paid=True, + date=date, + amount=from_amount, + description=description, + category=from_category, + notes=notes, + ) + from_transaction.tags.set(self.cleaned_data.get("from_tags", [])) + + # Create "To" transaction + to_transaction = Transaction.objects.create( + account=to_account, + type=Transaction.Type.INCOME, + is_paid=True, + date=date, + amount=to_amount, + description=description, + category=to_category, + notes=notes, + ) + to_transaction.tags.set(self.cleaned_data.get("to_tags", [])) + + instance.expense_transaction = from_transaction + instance.income_transaction = to_transaction + else: + if instance.expense_transaction: + instance.expense_transaction.amount = instance.amount_paid + instance.expense_transaction.save() + if instance.income_transaction: + instance.income_transaction.amount = instance.amount_received + instance.income_transaction.save() + + instance.strategy = self.strategy + instance.save() + + return instance diff --git a/app/apps/dca/views.py b/app/apps/dca/views.py index 22f718d..c1bb56b 100644 --- a/app/apps/dca/views.py +++ b/app/apps/dca/views.py @@ -155,11 +155,9 @@ def strategy_detail(request, strategy_id): def strategy_entry_add(request, strategy_id): strategy = get_object_or_404(DCAStrategy, id=strategy_id) if request.method == "POST": - form = DCAEntryForm(request.POST) + form = DCAEntryForm(request.POST, strategy=strategy) if form.is_valid(): - entry = form.save(commit=False) - entry.strategy = strategy - entry.save() + entry = form.save() messages.success(request, _("Entry added successfully")) return HttpResponse( @@ -169,7 +167,7 @@ def strategy_entry_add(request, strategy_id): }, ) else: - form = DCAEntryForm() + form = DCAEntryForm(strategy=strategy) return render( request, diff --git a/app/apps/monthly_overview/views.py b/app/apps/monthly_overview/views.py index 09215dc..4ae4165 100644 --- a/app/apps/monthly_overview/views.py +++ b/app/apps/monthly_overview/views.py @@ -92,6 +92,8 @@ def transactions_list(request, month: int, year: int): "account__currency", "installment_plan", "entities", + "dca_expense_entries", + "dca_income_entries", ) ) diff --git a/app/apps/rules/signals.py b/app/apps/rules/signals.py index 88d0980..1004ee4 100644 --- a/app/apps/rules/signals.py +++ b/app/apps/rules/signals.py @@ -11,6 +11,13 @@ from apps.rules.tasks import check_for_transaction_rules @receiver(transaction_created) @receiver(transaction_updated) def transaction_changed_receiver(sender: Transaction, signal, **kwargs): + for dca_entry in sender.dca_expense_entries.all(): + dca_entry.amount_paid = sender.amount + dca_entry.save() + for dca_entry in sender.dca_income_entries.all(): + dca_entry.amount_received = sender.amount + dca_entry.save() + check_for_transaction_rules.defer( instance_id=sender.id, signal=( diff --git a/app/apps/transactions/models.py b/app/apps/transactions/models.py index 2d0bb41..2141fb8 100644 --- a/app/apps/transactions/models.py +++ b/app/apps/transactions/models.py @@ -320,10 +320,10 @@ class Transaction(models.Model): type_display = self.get_type_display() frmt_date = date(self.date, "SHORT_DATE_FORMAT") account = self.account - tags = ", ".join([x.name for x in self.tags.all()]) or _("No Tags") - category = self.category or _("No Category") + tags = ", ".join([x.name for x in self.tags.all()]) or _("No tags") + category = self.category or _("No category") amount = localize_number(drop_trailing_zeros(self.amount)) - description = self.description or _("No Description") + description = self.description or _("No description") return f"[{frmt_date}][{type_display}][{account}] {description} • {category} • {tags} • {amount}" diff --git a/app/apps/transactions/urls.py b/app/apps/transactions/urls.py index 00fbe73..bcd2712 100644 --- a/app/apps/transactions/urls.py +++ b/app/apps/transactions/urls.py @@ -86,6 +86,16 @@ urlpatterns = [ views.transactions_bulk_edit, name="transactions_bulk_edit", ), + path( + "transactions/json/search/", + views.get_recent_transactions, + name="transactions_search", + ), + path( + "transactions/json/search//", + views.get_recent_transactions, + name="transactions_search", + ), path( "transaction//clone/", views.transaction_clone, diff --git a/app/apps/transactions/views/transactions.py b/app/apps/transactions/views/transactions.py index 2da2871..4494877 100644 --- a/app/apps/transactions/views/transactions.py +++ b/app/apps/transactions/views/transactions.py @@ -4,14 +4,14 @@ from copy import deepcopy from django.contrib import messages from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator -from django.http import HttpResponse +from django.db.models import Q +from django.http import HttpResponse, JsonResponse from django.shortcuts import render, get_object_or_404 from django.utils import timezone from django.utils.translation import gettext_lazy as _, ngettext_lazy from django.views.decorators.http import require_http_methods from apps.common.decorators.htmx import only_htmx -from apps.common.utils.dicts import remove_falsey_entries from apps.rules.signals import transaction_created, transaction_updated from apps.transactions.filters import TransactionsFilter from apps.transactions.forms import ( @@ -363,6 +363,8 @@ def transaction_all_list(request): "account__currency", "installment_plan", "entities", + "dca_expense_entries", + "dca_income_entries", ).all() transactions = default_order(transactions, order=order) @@ -395,6 +397,9 @@ def transaction_all_summary(request): "account__exchange_currency", "account__currency", "installment_plan", + "entities", + "dca_expense_entries", + "dca_income_entries", ).all() f = TransactionsFilter(request.GET, queryset=transactions) @@ -426,6 +431,9 @@ def transaction_all_account_summary(request): "account__exchange_currency", "account__currency", "installment_plan", + "entities", + "dca_expense_entries", + "dca_income_entries", ).all() f = TransactionsFilter(request.GET, queryset=transactions) @@ -453,6 +461,9 @@ def transaction_all_currency_summary(request): "account__exchange_currency", "account__currency", "installment_plan", + "entities", + "dca_expense_entries", + "dca_income_entries", ).all() f = TransactionsFilter(request.GET, queryset=transactions) @@ -484,6 +495,9 @@ def transactions_trash_can_index(request): return render(request, "transactions/pages/trash.html") +@only_htmx +@login_required +@require_http_methods(["GET"]) def transactions_trash_can_list(request): transactions = Transaction.deleted_objects.prefetch_related( "account", @@ -493,6 +507,10 @@ def transactions_trash_can_list(request): "account__exchange_currency", "account__currency", "installment_plan", + "entities", + "entities", + "dca_expense_entries", + "dca_income_entries", ).all() return render( @@ -500,3 +518,43 @@ def transactions_trash_can_list(request): "transactions/fragments/trash_list.html", {"transactions": transactions}, ) + + +@login_required +@require_http_methods(["GET"]) +def get_recent_transactions(request, filter_type=None): + """Return the 100 most recent non-deleted transactions with optional search.""" + # Get search term from query params + search_term = request.GET.get("q", "").strip() + + # Base queryset with selected fields + queryset = ( + Transaction.objects.filter(deleted=False) + .select_related("account", "category") + .order_by("-created_at") + ) + + if filter_type: + if filter_type == "expenses": + queryset = queryset.filter(type=Transaction.Type.EXPENSE) + elif filter_type == "income": + queryset = queryset.filter(type=Transaction.Type.INCOME) + + # Apply search if provided + if search_term: + queryset = queryset.filter( + Q(description__icontains=search_term) + | Q(notes__icontains=search_term) + | Q(internal_note__icontains=search_term) + | Q(tags__name__icontains=search_term) + | Q(category__name__icontains=search_term) + ) + + # Prepare data for JSON response + data = [] + for t in queryset: + data.append({"text": str(t), "value": str(t.id)}) + + print(data) + + return JsonResponse(data, safe=False) diff --git a/app/locale/de/LC_MESSAGES/django.po b/app/locale/de/LC_MESSAGES/django.po index 51d4156..cd7d84c 100644 --- a/app/locale/de/LC_MESSAGES/django.po +++ b/app/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-09 17:27-0300\n" +"POT-Creation-Date: 2025-02-15 00:38-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -24,7 +24,7 @@ msgstr "" #: apps/accounts/forms.py:40 apps/accounts/forms.py:96 #: apps/currencies/forms.py:53 apps/currencies/forms.py:91 -#: apps/currencies/forms.py:142 apps/dca/forms.py:41 apps/dca/forms.py:93 +#: apps/currencies/forms.py:142 apps/dca/forms.py:49 apps/dca/forms.py:224 #: apps/import_app/forms.py:34 apps/rules/forms.py:45 apps/rules/forms.py:87 #: apps/rules/forms.py:359 apps/transactions/forms.py:190 #: apps/transactions/forms.py:257 apps/transactions/forms.py:581 @@ -34,9 +34,9 @@ msgid "Update" msgstr "" #: apps/accounts/forms.py:48 apps/accounts/forms.py:104 -#: apps/common/widgets/tom_select.py:12 apps/currencies/forms.py:61 +#: apps/common/widgets/tom_select.py:13 apps/currencies/forms.py:61 #: apps/currencies/forms.py:99 apps/currencies/forms.py:150 -#: apps/dca/forms.py:49 apps/dca/forms.py:102 apps/import_app/forms.py:42 +#: apps/dca/forms.py:57 apps/dca/forms.py:232 apps/import_app/forms.py:42 #: apps/rules/forms.py:53 apps/rules/forms.py:95 apps/rules/forms.py:367 #: apps/transactions/forms.py:174 apps/transactions/forms.py:199 #: apps/transactions/forms.py:589 apps/transactions/forms.py:632 @@ -68,30 +68,32 @@ msgstr "" msgid "New balance" msgstr "" -#: apps/accounts/forms.py:119 apps/rules/forms.py:168 apps/rules/forms.py:183 -#: apps/rules/models.py:32 apps/rules/models.py:280 -#: apps/transactions/forms.py:39 apps/transactions/forms.py:291 -#: apps/transactions/forms.py:298 apps/transactions/forms.py:478 -#: apps/transactions/forms.py:723 apps/transactions/models.py:159 -#: apps/transactions/models.py:328 apps/transactions/models.py:508 +#: apps/accounts/forms.py:119 apps/dca/forms.py:85 apps/dca/forms.py:92 +#: apps/rules/forms.py:168 apps/rules/forms.py:183 apps/rules/models.py:32 +#: apps/rules/models.py:280 apps/transactions/forms.py:39 +#: apps/transactions/forms.py:291 apps/transactions/forms.py:298 +#: apps/transactions/forms.py:478 apps/transactions/forms.py:723 +#: apps/transactions/models.py:203 apps/transactions/models.py:378 +#: apps/transactions/models.py:558 msgid "Category" msgstr "" -#: apps/accounts/forms.py:126 apps/rules/forms.py:171 apps/rules/forms.py:180 -#: apps/rules/models.py:33 apps/rules/models.py:284 -#: apps/transactions/filters.py:74 apps/transactions/forms.py:47 -#: apps/transactions/forms.py:307 apps/transactions/forms.py:315 -#: apps/transactions/forms.py:471 apps/transactions/forms.py:716 -#: apps/transactions/models.py:165 apps/transactions/models.py:330 -#: apps/transactions/models.py:512 templates/includes/navbar.html:105 -#: templates/tags/fragments/list.html:5 templates/tags/pages/index.html:4 +#: apps/accounts/forms.py:126 apps/dca/forms.py:101 apps/dca/forms.py:109 +#: apps/rules/forms.py:171 apps/rules/forms.py:180 apps/rules/models.py:33 +#: apps/rules/models.py:284 apps/transactions/filters.py:74 +#: apps/transactions/forms.py:47 apps/transactions/forms.py:307 +#: apps/transactions/forms.py:315 apps/transactions/forms.py:471 +#: apps/transactions/forms.py:716 apps/transactions/models.py:209 +#: apps/transactions/models.py:380 apps/transactions/models.py:562 +#: templates/includes/navbar.html:105 templates/tags/fragments/list.html:5 +#: templates/tags/pages/index.html:4 msgid "Tags" msgstr "" #: apps/accounts/models.py:9 apps/accounts/models.py:21 apps/dca/models.py:14 #: apps/import_app/models.py:14 apps/rules/models.py:10 -#: apps/transactions/models.py:67 apps/transactions/models.py:87 -#: apps/transactions/models.py:106 +#: apps/transactions/models.py:111 apps/transactions/models.py:131 +#: apps/transactions/models.py:150 #: templates/account_groups/fragments/list.html:25 #: templates/accounts/fragments/list.html:25 #: templates/categories/fragments/table.html:16 @@ -153,8 +155,8 @@ msgstr "" #: apps/accounts/models.py:59 apps/rules/forms.py:160 apps/rules/forms.py:173 #: apps/rules/models.py:24 apps/rules/models.py:236 #: apps/transactions/forms.py:59 apps/transactions/forms.py:463 -#: apps/transactions/forms.py:708 apps/transactions/models.py:132 -#: apps/transactions/models.py:288 apps/transactions/models.py:490 +#: apps/transactions/forms.py:708 apps/transactions/models.py:176 +#: apps/transactions/models.py:338 apps/transactions/models.py:540 msgid "Account" msgstr "" @@ -232,13 +234,13 @@ msgstr "" msgid "Either 'date' or 'reference_date' must be provided." msgstr "" -#: apps/common/fields/forms/dynamic_select.py:127 -#: apps/common/fields/forms/dynamic_select.py:163 +#: apps/common/fields/forms/dynamic_select.py:131 +#: apps/common/fields/forms/dynamic_select.py:167 msgid "Error creating new instance" msgstr "" #: apps/common/fields/forms/grouped_select.py:24 -#: apps/common/widgets/tom_select.py:91 apps/common/widgets/tom_select.py:94 +#: apps/common/widgets/tom_select.py:92 apps/common/widgets/tom_select.py:95 msgid "Ungrouped" msgstr "" @@ -337,18 +339,18 @@ msgstr "" msgid "Now" msgstr "" -#: apps/common/widgets/tom_select.py:10 +#: apps/common/widgets/tom_select.py:11 msgid "Remove" msgstr "" -#: apps/common/widgets/tom_select.py:14 +#: apps/common/widgets/tom_select.py:15 #: templates/mini_tools/unit_price_calculator.html:174 #: templates/monthly_overview/pages/overview.html:172 #: templates/transactions/pages/transactions.html:17 msgid "Clear" msgstr "" -#: apps/common/widgets/tom_select.py:15 +#: apps/common/widgets/tom_select.py:16 msgid "No results..." msgstr "" @@ -363,7 +365,7 @@ msgstr "" #: apps/currencies/forms.py:69 apps/dca/models.py:156 apps/rules/forms.py:163 #: apps/rules/forms.py:176 apps/rules/models.py:27 apps/rules/models.py:248 #: apps/transactions/forms.py:63 apps/transactions/forms.py:319 -#: apps/transactions/models.py:142 +#: apps/transactions/models.py:186 #: templates/dca/fragments/strategy/details.html:52 #: templates/exchange_rates/fragments/table.html:10 #: templates/exchange_rates_services/fragments/table.html:10 @@ -442,8 +444,8 @@ msgstr "" msgid "Service Type" msgstr "" -#: apps/currencies/models.py:107 apps/transactions/models.py:71 -#: apps/transactions/models.py:90 apps/transactions/models.py:109 +#: apps/currencies/models.py:107 apps/transactions/models.py:115 +#: apps/transactions/models.py:134 apps/transactions/models.py:153 #: templates/categories/fragments/list.html:21 #: templates/entities/fragments/list.html:21 #: templates/recurring_transactions/fragments/list.html:21 @@ -559,6 +561,48 @@ msgstr "" msgid "Services queued successfully" msgstr "" +#: apps/dca/forms.py:65 apps/dca/forms.py:164 +msgid "Create transaction" +msgstr "" + +#: apps/dca/forms.py:70 apps/transactions/forms.py:266 +msgid "From Account" +msgstr "" + +#: apps/dca/forms.py:76 apps/transactions/forms.py:271 +msgid "To Account" +msgstr "" + +#: apps/dca/forms.py:116 apps/dca/models.py:169 +msgid "Expense Transaction" +msgstr "" + +#: apps/dca/forms.py:120 apps/dca/forms.py:130 +msgid "Type to search for a transaction to link to this entry" +msgstr "" + +#: apps/dca/forms.py:126 apps/dca/models.py:177 +msgid "Income Transaction" +msgstr "" + +#: apps/dca/forms.py:210 +msgid "Link transaction" +msgstr "" + +#: apps/dca/forms.py:279 apps/dca/forms.py:280 apps/dca/forms.py:285 +#: apps/dca/forms.py:289 +msgid "You must provide an account." +msgstr "" + +#: apps/dca/forms.py:294 apps/transactions/forms.py:413 +msgid "From and To accounts must be different." +msgstr "" + +#: apps/dca/forms.py:308 +#, python-format +msgid "DCA for %(strategy_name)s" +msgstr "" + #: apps/dca/models.py:17 msgid "Target Currency" msgstr "" @@ -569,8 +613,8 @@ msgstr "" #: apps/dca/models.py:27 apps/dca/models.py:179 apps/rules/forms.py:167 #: apps/rules/forms.py:182 apps/rules/models.py:31 apps/rules/models.py:264 -#: apps/transactions/forms.py:333 apps/transactions/models.py:155 -#: apps/transactions/models.py:337 apps/transactions/models.py:518 +#: apps/transactions/forms.py:333 apps/transactions/models.py:199 +#: apps/transactions/models.py:387 apps/transactions/models.py:568 msgid "Notes" msgstr "" @@ -594,14 +638,6 @@ msgstr "" msgid "Amount Received" msgstr "" -#: apps/dca/models.py:169 -msgid "Expense Transaction" -msgstr "" - -#: apps/dca/models.py:177 -msgid "Income Transaction" -msgstr "" - #: apps/dca/models.py:184 msgid "DCA Entry" msgstr "" @@ -622,15 +658,15 @@ msgstr "" msgid "DCA strategy deleted successfully" msgstr "" -#: apps/dca/views.py:163 +#: apps/dca/views.py:161 msgid "Entry added successfully" msgstr "" -#: apps/dca/views.py:190 +#: apps/dca/views.py:188 msgid "Entry updated successfully" msgstr "" -#: apps/dca/views.py:216 +#: apps/dca/views.py:214 msgid "Entry deleted successfully" msgstr "" @@ -741,14 +777,14 @@ msgid "Operator" msgstr "" #: apps/rules/forms.py:161 apps/rules/forms.py:174 apps/rules/models.py:25 -#: apps/rules/models.py:240 apps/transactions/models.py:139 -#: apps/transactions/models.py:293 apps/transactions/models.py:496 +#: apps/rules/models.py:240 apps/transactions/models.py:183 +#: apps/transactions/models.py:343 apps/transactions/models.py:546 msgid "Type" msgstr "" #: apps/rules/forms.py:162 apps/rules/forms.py:175 apps/rules/models.py:26 #: apps/rules/models.py:244 apps/transactions/filters.py:23 -#: apps/transactions/models.py:141 templates/cotton/transaction/item.html:21 +#: apps/transactions/models.py:185 templates/cotton/transaction/item.html:21 #: templates/cotton/transaction/item.html:31 #: templates/transactions/widgets/paid_toggle_button.html:12 #: templates/transactions/widgets/unselectable_paid_toggle_button.html:16 @@ -758,40 +794,40 @@ msgstr "" #: apps/rules/forms.py:164 apps/rules/forms.py:177 apps/rules/models.py:28 #: apps/rules/models.py:252 apps/transactions/forms.py:66 #: apps/transactions/forms.py:322 apps/transactions/forms.py:492 -#: apps/transactions/models.py:143 apps/transactions/models.py:311 -#: apps/transactions/models.py:520 +#: apps/transactions/models.py:187 apps/transactions/models.py:361 +#: apps/transactions/models.py:570 msgid "Reference Date" msgstr "" #: apps/rules/forms.py:165 apps/rules/forms.py:178 apps/rules/models.py:29 -#: apps/rules/models.py:256 apps/transactions/models.py:148 -#: apps/transactions/models.py:501 +#: apps/rules/models.py:256 apps/transactions/models.py:192 +#: apps/transactions/models.py:551 msgid "Amount" msgstr "" #: apps/rules/forms.py:166 apps/rules/forms.py:179 apps/rules/models.py:11 #: apps/rules/models.py:30 apps/rules/models.py:260 -#: apps/transactions/forms.py:325 apps/transactions/models.py:153 -#: apps/transactions/models.py:295 apps/transactions/models.py:504 +#: apps/transactions/forms.py:325 apps/transactions/models.py:197 +#: apps/transactions/models.py:345 apps/transactions/models.py:554 msgid "Description" msgstr "" #: apps/rules/forms.py:169 apps/rules/forms.py:184 apps/rules/models.py:268 -#: apps/transactions/models.py:192 +#: apps/transactions/models.py:236 msgid "Internal Note" msgstr "" #: apps/rules/forms.py:170 apps/rules/forms.py:185 apps/rules/models.py:272 -#: apps/transactions/models.py:194 +#: apps/transactions/models.py:238 msgid "Internal ID" msgstr "" #: apps/rules/forms.py:172 apps/rules/forms.py:181 apps/rules/models.py:34 #: apps/rules/models.py:276 apps/transactions/filters.py:81 #: apps/transactions/forms.py:55 apps/transactions/forms.py:486 -#: apps/transactions/forms.py:731 apps/transactions/models.py:117 -#: apps/transactions/models.py:170 apps/transactions/models.py:333 -#: apps/transactions/models.py:515 templates/entities/fragments/list.html:5 +#: apps/transactions/forms.py:731 apps/transactions/models.py:161 +#: apps/transactions/models.py:214 apps/transactions/models.py:383 +#: apps/transactions/models.py:565 templates/entities/fragments/list.html:5 #: templates/entities/pages/index.html:4 templates/includes/navbar.html:107 msgid "Entities" msgstr "" @@ -974,14 +1010,6 @@ msgstr "" msgid "More" msgstr "" -#: apps/transactions/forms.py:266 -msgid "From Account" -msgstr "" - -#: apps/transactions/forms.py:271 -msgid "To Account" -msgstr "" - #: apps/transactions/forms.py:278 msgid "From Amount" msgstr "" @@ -995,10 +1023,6 @@ msgstr "" msgid "Transfer" msgstr "" -#: apps/transactions/forms.py:413 -msgid "From and To accounts must be different." -msgstr "" - #: apps/transactions/forms.py:610 msgid "Tag name" msgstr "" @@ -1019,44 +1043,44 @@ msgstr "" msgid "End date should be after the start date" msgstr "" -#: apps/transactions/models.py:68 +#: apps/transactions/models.py:112 msgid "Mute" msgstr "" -#: apps/transactions/models.py:73 +#: apps/transactions/models.py:117 msgid "" "Deactivated categories won't be able to be selected when creating new " "transactions" msgstr "" -#: apps/transactions/models.py:78 +#: apps/transactions/models.py:122 msgid "Transaction Category" msgstr "" -#: apps/transactions/models.py:79 +#: apps/transactions/models.py:123 msgid "Transaction Categories" msgstr "" -#: apps/transactions/models.py:92 +#: apps/transactions/models.py:136 msgid "" "Deactivated tags won't be able to be selected when creating new transactions" msgstr "" -#: apps/transactions/models.py:97 apps/transactions/models.py:98 +#: apps/transactions/models.py:141 apps/transactions/models.py:142 msgid "Transaction Tags" msgstr "" -#: apps/transactions/models.py:111 +#: apps/transactions/models.py:155 msgid "" "Deactivated entities won't be able to be selected when creating new " "transactions" msgstr "" -#: apps/transactions/models.py:116 +#: apps/transactions/models.py:160 msgid "Entity" msgstr "" -#: apps/transactions/models.py:126 +#: apps/transactions/models.py:170 #: templates/calendar_view/fragments/list.html:42 #: templates/calendar_view/fragments/list.html:44 #: templates/calendar_view/fragments/list.html:52 @@ -1066,7 +1090,7 @@ msgstr "" msgid "Income" msgstr "" -#: apps/transactions/models.py:127 +#: apps/transactions/models.py:171 #: templates/calendar_view/fragments/list.html:46 #: templates/calendar_view/fragments/list.html:48 #: templates/calendar_view/fragments/list.html:56 @@ -1075,27 +1099,27 @@ msgstr "" msgid "Expense" msgstr "" -#: apps/transactions/models.py:181 apps/transactions/models.py:340 +#: apps/transactions/models.py:225 apps/transactions/models.py:390 msgid "Installment Plan" msgstr "" -#: apps/transactions/models.py:190 apps/transactions/models.py:541 +#: apps/transactions/models.py:234 apps/transactions/models.py:591 msgid "Recurring Transaction" msgstr "" -#: apps/transactions/models.py:198 +#: apps/transactions/models.py:242 msgid "Deleted" msgstr "" -#: apps/transactions/models.py:203 +#: apps/transactions/models.py:247 msgid "Deleted At" msgstr "" -#: apps/transactions/models.py:211 +#: apps/transactions/models.py:255 msgid "Transaction" msgstr "" -#: apps/transactions/models.py:212 templates/includes/navbar.html:54 +#: apps/transactions/models.py:256 templates/includes/navbar.html:54 #: templates/includes/navbar.html:101 #: templates/recurring_transactions/fragments/list_transactions.html:5 #: templates/recurring_transactions/fragments/table.html:37 @@ -1103,95 +1127,107 @@ msgstr "" msgid "Transactions" msgstr "" -#: apps/transactions/models.py:282 +#: apps/transactions/models.py:323 templates/tags/fragments/table.html:53 +msgid "No tags" +msgstr "" + +#: apps/transactions/models.py:324 +msgid "No category" +msgstr "" + +#: apps/transactions/models.py:326 +msgid "No description" +msgstr "" + +#: apps/transactions/models.py:332 msgid "Yearly" msgstr "" -#: apps/transactions/models.py:283 apps/users/models.py:26 +#: apps/transactions/models.py:333 apps/users/models.py:26 #: templates/includes/navbar.html:26 msgid "Monthly" msgstr "" -#: apps/transactions/models.py:284 +#: apps/transactions/models.py:334 msgid "Weekly" msgstr "" -#: apps/transactions/models.py:285 +#: apps/transactions/models.py:335 msgid "Daily" msgstr "" -#: apps/transactions/models.py:298 +#: apps/transactions/models.py:348 msgid "Number of Installments" msgstr "" -#: apps/transactions/models.py:303 +#: apps/transactions/models.py:353 msgid "Installment Start" msgstr "" -#: apps/transactions/models.py:304 +#: apps/transactions/models.py:354 msgid "The installment number to start counting from" msgstr "" -#: apps/transactions/models.py:309 apps/transactions/models.py:524 +#: apps/transactions/models.py:359 apps/transactions/models.py:574 msgid "Start Date" msgstr "" -#: apps/transactions/models.py:313 apps/transactions/models.py:525 +#: apps/transactions/models.py:363 apps/transactions/models.py:575 msgid "End Date" msgstr "" -#: apps/transactions/models.py:318 +#: apps/transactions/models.py:368 msgid "Recurrence" msgstr "" -#: apps/transactions/models.py:321 +#: apps/transactions/models.py:371 msgid "Installment Amount" msgstr "" -#: apps/transactions/models.py:341 templates/includes/navbar.html:69 +#: apps/transactions/models.py:391 templates/includes/navbar.html:69 #: templates/installment_plans/fragments/list.html:5 #: templates/installment_plans/pages/index.html:4 msgid "Installment Plans" msgstr "" -#: apps/transactions/models.py:483 +#: apps/transactions/models.py:533 msgid "day(s)" msgstr "" -#: apps/transactions/models.py:484 +#: apps/transactions/models.py:534 msgid "week(s)" msgstr "" -#: apps/transactions/models.py:485 +#: apps/transactions/models.py:535 msgid "month(s)" msgstr "" -#: apps/transactions/models.py:486 +#: apps/transactions/models.py:536 msgid "year(s)" msgstr "" -#: apps/transactions/models.py:488 +#: apps/transactions/models.py:538 #: templates/recurring_transactions/fragments/list.html:24 msgid "Paused" msgstr "" -#: apps/transactions/models.py:527 +#: apps/transactions/models.py:577 msgid "Recurrence Type" msgstr "" -#: apps/transactions/models.py:530 +#: apps/transactions/models.py:580 msgid "Recurrence Interval" msgstr "" -#: apps/transactions/models.py:534 +#: apps/transactions/models.py:584 msgid "Last Generated Date" msgstr "" -#: apps/transactions/models.py:537 +#: apps/transactions/models.py:587 msgid "Last Generated Reference Date" msgstr "" -#: apps/transactions/models.py:542 templates/includes/navbar.html:71 +#: apps/transactions/models.py:592 templates/includes/navbar.html:71 #: templates/recurring_transactions/fragments/list.html:5 #: templates/recurring_transactions/pages/index.html:4 msgid "Recurring Transactions" @@ -1207,35 +1243,35 @@ msgstr "" msgid "%(value)s is not a non-negative number" msgstr "" -#: apps/transactions/views/actions.py:23 +#: apps/transactions/views/actions.py:24 #, python-format msgid "%(count)s transaction marked as paid" msgid_plural "%(count)s transactions marked as paid" msgstr[0] "" msgstr[1] "" -#: apps/transactions/views/actions.py:47 +#: apps/transactions/views/actions.py:48 #, python-format msgid "%(count)s transaction marked as not paid" msgid_plural "%(count)s transactions marked as not paid" msgstr[0] "" msgstr[1] "" -#: apps/transactions/views/actions.py:71 +#: apps/transactions/views/actions.py:72 #, python-format msgid "%(count)s transaction deleted successfully" msgid_plural "%(count)s transactions deleted successfully" msgstr[0] "" msgstr[1] "" -#: apps/transactions/views/actions.py:95 +#: apps/transactions/views/actions.py:96 #, python-format msgid "%(count)s transaction restored successfully" msgid_plural "%(count)s transactions restored successfully" msgstr[0] "" msgstr[1] "" -#: apps/transactions/views/actions.py:130 +#: apps/transactions/views/actions.py:131 #, python-format msgid "%(count)s transaction duplicated successfully" msgid_plural "%(count)s transactions duplicated successfully" @@ -1496,7 +1532,7 @@ msgstr "" #: templates/account_groups/fragments/list.html:36 #: templates/accounts/fragments/list.html:41 #: templates/categories/fragments/table.html:29 -#: templates/cotton/transaction/item.html:127 +#: templates/cotton/transaction/item.html:130 #: templates/cotton/ui/transactions_action_bar.html:49 #: templates/currencies/fragments/list.html:37 #: templates/dca/fragments/strategy/details.html:67 @@ -1518,8 +1554,8 @@ msgstr "" #: templates/account_groups/fragments/list.html:43 #: templates/accounts/fragments/list.html:48 #: templates/categories/fragments/table.html:36 -#: templates/cotton/transaction/item.html:142 -#: templates/cotton/transaction/item.html:161 +#: templates/cotton/transaction/item.html:145 +#: templates/cotton/transaction/item.html:164 #: templates/cotton/ui/deleted_transactions_action_bar.html:55 #: templates/cotton/ui/transactions_action_bar.html:86 #: templates/currencies/fragments/list.html:44 @@ -1544,8 +1580,8 @@ msgstr "" #: templates/account_groups/fragments/list.html:47 #: templates/accounts/fragments/list.html:52 #: templates/categories/fragments/table.html:41 -#: templates/cotton/transaction/item.html:146 -#: templates/cotton/transaction/item.html:165 +#: templates/cotton/transaction/item.html:149 +#: templates/cotton/transaction/item.html:168 #: templates/cotton/ui/deleted_transactions_action_bar.html:57 #: templates/cotton/ui/transactions_action_bar.html:88 #: templates/currencies/fragments/list.html:48 @@ -1573,8 +1609,8 @@ msgstr "" #: templates/account_groups/fragments/list.html:48 #: templates/accounts/fragments/list.html:53 #: templates/categories/fragments/table.html:42 -#: templates/cotton/transaction/item.html:147 -#: templates/cotton/transaction/item.html:166 +#: templates/cotton/transaction/item.html:150 +#: templates/cotton/transaction/item.html:169 #: templates/cotton/ui/deleted_transactions_action_bar.html:58 #: templates/cotton/ui/transactions_action_bar.html:89 #: templates/currencies/fragments/list.html:49 @@ -1595,8 +1631,8 @@ msgstr "" #: templates/account_groups/fragments/list.html:49 #: templates/accounts/fragments/list.html:54 #: templates/categories/fragments/table.html:43 -#: templates/cotton/transaction/item.html:148 -#: templates/cotton/transaction/item.html:167 +#: templates/cotton/transaction/item.html:151 +#: templates/cotton/transaction/item.html:170 #: templates/currencies/fragments/list.html:50 #: templates/dca/fragments/strategy/details.html:82 #: templates/dca/fragments/strategy/list.html:48 @@ -1647,7 +1683,7 @@ msgstr "" msgid "Is Asset" msgstr "" -#: templates/accounts/fragments/list.html:70 +#: templates/accounts/fragments/list.html:69 msgid "No accounts" msgstr "" @@ -1725,12 +1761,16 @@ msgstr "" msgid "Select" msgstr "" -#: templates/cotton/transaction/item.html:134 +#: templates/cotton/transaction/item.html:56 +msgid "DCA" +msgstr "" + +#: templates/cotton/transaction/item.html:137 #: templates/cotton/ui/transactions_action_bar.html:78 msgid "Duplicate" msgstr "" -#: templates/cotton/transaction/item.html:155 +#: templates/cotton/transaction/item.html:158 #: templates/cotton/ui/deleted_transactions_action_bar.html:47 msgid "Restore" msgstr "" @@ -2575,10 +2615,6 @@ msgstr "" msgid "Edit tag" msgstr "" -#: templates/tags/fragments/table.html:53 -msgid "No tags" -msgstr "" - #: templates/transactions/fragments/add.html:5 #: templates/transactions/pages/add.html:5 msgid "New transaction" diff --git a/app/locale/nl/LC_MESSAGES/django.po b/app/locale/nl/LC_MESSAGES/django.po index 6c8fbee..b5c329e 100644 --- a/app/locale/nl/LC_MESSAGES/django.po +++ b/app/locale/nl/LC_MESSAGES/django.po @@ -2,13 +2,13 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. -# +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-09 17:27-0300\n" +"POT-Creation-Date: 2025-02-15 00:42-0300\n" "PO-Revision-Date: 2025-02-12 06:58+0100\n" "Last-Translator: Dimitri Decrock \n" "Language-Team: \n" @@ -25,7 +25,7 @@ msgstr "Groepsnaam" #: apps/accounts/forms.py:40 apps/accounts/forms.py:96 #: apps/currencies/forms.py:53 apps/currencies/forms.py:91 -#: apps/currencies/forms.py:142 apps/dca/forms.py:41 apps/dca/forms.py:93 +#: apps/currencies/forms.py:142 apps/dca/forms.py:49 apps/dca/forms.py:224 #: apps/import_app/forms.py:34 apps/rules/forms.py:45 apps/rules/forms.py:87 #: apps/rules/forms.py:359 apps/transactions/forms.py:190 #: apps/transactions/forms.py:257 apps/transactions/forms.py:581 @@ -35,9 +35,9 @@ msgid "Update" msgstr "Bijwerken" #: apps/accounts/forms.py:48 apps/accounts/forms.py:104 -#: apps/common/widgets/tom_select.py:12 apps/currencies/forms.py:61 +#: apps/common/widgets/tom_select.py:13 apps/currencies/forms.py:61 #: apps/currencies/forms.py:99 apps/currencies/forms.py:150 -#: apps/dca/forms.py:49 apps/dca/forms.py:102 apps/import_app/forms.py:42 +#: apps/dca/forms.py:57 apps/dca/forms.py:232 apps/import_app/forms.py:42 #: apps/rules/forms.py:53 apps/rules/forms.py:95 apps/rules/forms.py:367 #: apps/transactions/forms.py:174 apps/transactions/forms.py:199 #: apps/transactions/forms.py:589 apps/transactions/forms.py:632 @@ -69,30 +69,32 @@ msgstr "Groep" msgid "New balance" msgstr "Nieuw saldo" -#: apps/accounts/forms.py:119 apps/rules/forms.py:168 apps/rules/forms.py:183 -#: apps/rules/models.py:32 apps/rules/models.py:280 -#: apps/transactions/forms.py:39 apps/transactions/forms.py:291 -#: apps/transactions/forms.py:298 apps/transactions/forms.py:478 -#: apps/transactions/forms.py:723 apps/transactions/models.py:159 -#: apps/transactions/models.py:328 apps/transactions/models.py:508 +#: apps/accounts/forms.py:119 apps/dca/forms.py:85 apps/dca/forms.py:92 +#: apps/rules/forms.py:168 apps/rules/forms.py:183 apps/rules/models.py:32 +#: apps/rules/models.py:280 apps/transactions/forms.py:39 +#: apps/transactions/forms.py:291 apps/transactions/forms.py:298 +#: apps/transactions/forms.py:478 apps/transactions/forms.py:723 +#: apps/transactions/models.py:203 apps/transactions/models.py:378 +#: apps/transactions/models.py:558 msgid "Category" msgstr "Categorie" -#: apps/accounts/forms.py:126 apps/rules/forms.py:171 apps/rules/forms.py:180 -#: apps/rules/models.py:33 apps/rules/models.py:284 -#: apps/transactions/filters.py:74 apps/transactions/forms.py:47 -#: apps/transactions/forms.py:307 apps/transactions/forms.py:315 -#: apps/transactions/forms.py:471 apps/transactions/forms.py:716 -#: apps/transactions/models.py:165 apps/transactions/models.py:330 -#: apps/transactions/models.py:512 templates/includes/navbar.html:105 -#: templates/tags/fragments/list.html:5 templates/tags/pages/index.html:4 +#: apps/accounts/forms.py:126 apps/dca/forms.py:101 apps/dca/forms.py:109 +#: apps/rules/forms.py:171 apps/rules/forms.py:180 apps/rules/models.py:33 +#: apps/rules/models.py:284 apps/transactions/filters.py:74 +#: apps/transactions/forms.py:47 apps/transactions/forms.py:307 +#: apps/transactions/forms.py:315 apps/transactions/forms.py:471 +#: apps/transactions/forms.py:716 apps/transactions/models.py:209 +#: apps/transactions/models.py:380 apps/transactions/models.py:562 +#: templates/includes/navbar.html:105 templates/tags/fragments/list.html:5 +#: templates/tags/pages/index.html:4 msgid "Tags" msgstr "Labels" #: apps/accounts/models.py:9 apps/accounts/models.py:21 apps/dca/models.py:14 #: apps/import_app/models.py:14 apps/rules/models.py:10 -#: apps/transactions/models.py:67 apps/transactions/models.py:87 -#: apps/transactions/models.py:106 +#: apps/transactions/models.py:111 apps/transactions/models.py:131 +#: apps/transactions/models.py:150 #: templates/account_groups/fragments/list.html:25 #: templates/accounts/fragments/list.html:25 #: templates/categories/fragments/table.html:16 @@ -158,8 +160,8 @@ msgstr "" #: apps/accounts/models.py:59 apps/rules/forms.py:160 apps/rules/forms.py:173 #: apps/rules/models.py:24 apps/rules/models.py:236 #: apps/transactions/forms.py:59 apps/transactions/forms.py:463 -#: apps/transactions/forms.py:708 apps/transactions/models.py:132 -#: apps/transactions/models.py:288 apps/transactions/models.py:490 +#: apps/transactions/forms.py:708 apps/transactions/models.py:176 +#: apps/transactions/models.py:338 apps/transactions/models.py:540 msgid "Account" msgstr "Rekening" @@ -238,13 +240,13 @@ msgstr "Ongeldige bedrijfsgegevens. Geef een ID of naam op." msgid "Either 'date' or 'reference_date' must be provided." msgstr "'datum' of 'referentiedatum' moet worden opgegeven." -#: apps/common/fields/forms/dynamic_select.py:127 -#: apps/common/fields/forms/dynamic_select.py:163 +#: apps/common/fields/forms/dynamic_select.py:131 +#: apps/common/fields/forms/dynamic_select.py:167 msgid "Error creating new instance" msgstr "Fout bij het aanmaken van een nieuwe instantie" #: apps/common/fields/forms/grouped_select.py:24 -#: apps/common/widgets/tom_select.py:91 apps/common/widgets/tom_select.py:94 +#: apps/common/widgets/tom_select.py:92 apps/common/widgets/tom_select.py:95 msgid "Ungrouped" msgstr "Niet gegroepeerd" @@ -343,18 +345,18 @@ msgstr "Vandaag" msgid "Now" msgstr "Nu" -#: apps/common/widgets/tom_select.py:10 +#: apps/common/widgets/tom_select.py:11 msgid "Remove" msgstr "Verwijder" -#: apps/common/widgets/tom_select.py:14 +#: apps/common/widgets/tom_select.py:15 #: templates/mini_tools/unit_price_calculator.html:174 #: templates/monthly_overview/pages/overview.html:172 #: templates/transactions/pages/transactions.html:17 msgid "Clear" msgstr "Leegmaken" -#: apps/common/widgets/tom_select.py:15 +#: apps/common/widgets/tom_select.py:16 msgid "No results..." msgstr "Geen resultaten..." @@ -369,7 +371,7 @@ msgstr "Achtervoegsel" #: apps/currencies/forms.py:69 apps/dca/models.py:156 apps/rules/forms.py:163 #: apps/rules/forms.py:176 apps/rules/models.py:27 apps/rules/models.py:248 #: apps/transactions/forms.py:63 apps/transactions/forms.py:319 -#: apps/transactions/models.py:142 +#: apps/transactions/models.py:186 #: templates/dca/fragments/strategy/details.html:52 #: templates/exchange_rates/fragments/table.html:10 #: templates/exchange_rates_services/fragments/table.html:10 @@ -448,8 +450,8 @@ msgstr "Dienstnaam" msgid "Service Type" msgstr "Soort Dienst" -#: apps/currencies/models.py:107 apps/transactions/models.py:71 -#: apps/transactions/models.py:90 apps/transactions/models.py:109 +#: apps/currencies/models.py:107 apps/transactions/models.py:115 +#: apps/transactions/models.py:134 apps/transactions/models.py:153 #: templates/categories/fragments/list.html:21 #: templates/entities/fragments/list.html:21 #: templates/recurring_transactions/fragments/list.html:21 @@ -574,6 +576,53 @@ msgstr "Dienst succesvol verwijderd" msgid "Services queued successfully" msgstr "Diensten succesvol in de wachtrij geplaatst" +#: apps/dca/forms.py:65 apps/dca/forms.py:164 +#, fuzzy +#| msgid "Deleted transactions" +msgid "Create transaction" +msgstr "Verwijderde verrichtingen" + +#: apps/dca/forms.py:70 apps/transactions/forms.py:266 +msgid "From Account" +msgstr "Van rekening" + +#: apps/dca/forms.py:76 apps/transactions/forms.py:271 +msgid "To Account" +msgstr "Naar rekening" + +#: apps/dca/forms.py:116 apps/dca/models.py:169 +msgid "Expense Transaction" +msgstr "Uitgave Transactie" + +#: apps/dca/forms.py:120 apps/dca/forms.py:130 +msgid "Type to search for a transaction to link to this entry" +msgstr "" + +#: apps/dca/forms.py:126 apps/dca/models.py:177 +msgid "Income Transaction" +msgstr "Ontvangsten Transactie" + +#: apps/dca/forms.py:210 +#, fuzzy +#| msgid "Edit transaction" +msgid "Link transaction" +msgstr "Bewerk verrichting" + +#: apps/dca/forms.py:279 apps/dca/forms.py:280 apps/dca/forms.py:285 +#: apps/dca/forms.py:289 +msgid "You must provide an account." +msgstr "" + +#: apps/dca/forms.py:294 apps/transactions/forms.py:413 +msgid "From and To accounts must be different." +msgstr "Van en Naar rekening moeten verschillend zijn." + +#: apps/dca/forms.py:308 +#, fuzzy, python-format +#| msgid "DCA Strategies" +msgid "DCA for %(strategy_name)s" +msgstr "DCA Strategieën" + #: apps/dca/models.py:17 msgid "Target Currency" msgstr "Doel Munteenheid" @@ -584,8 +633,8 @@ msgstr "Betaal Munteenheid" #: apps/dca/models.py:27 apps/dca/models.py:179 apps/rules/forms.py:167 #: apps/rules/forms.py:182 apps/rules/models.py:31 apps/rules/models.py:264 -#: apps/transactions/forms.py:333 apps/transactions/models.py:155 -#: apps/transactions/models.py:337 apps/transactions/models.py:518 +#: apps/transactions/forms.py:333 apps/transactions/models.py:199 +#: apps/transactions/models.py:387 apps/transactions/models.py:568 msgid "Notes" msgstr "Opmerkingen" @@ -609,14 +658,6 @@ msgstr "Betaald bedrag" msgid "Amount Received" msgstr "Ontvangen bedrag" -#: apps/dca/models.py:169 -msgid "Expense Transaction" -msgstr "Uitgave Transactie" - -#: apps/dca/models.py:177 -msgid "Income Transaction" -msgstr "Ontvangsten Transactie" - #: apps/dca/models.py:184 msgid "DCA Entry" msgstr "DCA Instap" @@ -637,15 +678,15 @@ msgstr "Strategie voor DCA succesvol bijgewerkt" msgid "DCA strategy deleted successfully" msgstr "Strategie voor DCA succesvol verwijderd" -#: apps/dca/views.py:163 +#: apps/dca/views.py:161 msgid "Entry added successfully" msgstr "Item succesvol toegevoegd" -#: apps/dca/views.py:190 +#: apps/dca/views.py:188 msgid "Entry updated successfully" msgstr "Item succesvol bijgewerkt" -#: apps/dca/views.py:216 +#: apps/dca/views.py:214 msgid "Entry deleted successfully" msgstr "Item succesvol verwijderd" @@ -756,14 +797,14 @@ msgid "Operator" msgstr "Operator" #: apps/rules/forms.py:161 apps/rules/forms.py:174 apps/rules/models.py:25 -#: apps/rules/models.py:240 apps/transactions/models.py:139 -#: apps/transactions/models.py:293 apps/transactions/models.py:496 +#: apps/rules/models.py:240 apps/transactions/models.py:183 +#: apps/transactions/models.py:343 apps/transactions/models.py:546 msgid "Type" msgstr "Soort" #: apps/rules/forms.py:162 apps/rules/forms.py:175 apps/rules/models.py:26 #: apps/rules/models.py:244 apps/transactions/filters.py:23 -#: apps/transactions/models.py:141 templates/cotton/transaction/item.html:21 +#: apps/transactions/models.py:185 templates/cotton/transaction/item.html:21 #: templates/cotton/transaction/item.html:31 #: templates/transactions/widgets/paid_toggle_button.html:12 #: templates/transactions/widgets/unselectable_paid_toggle_button.html:16 @@ -773,40 +814,40 @@ msgstr "Betaald" #: apps/rules/forms.py:164 apps/rules/forms.py:177 apps/rules/models.py:28 #: apps/rules/models.py:252 apps/transactions/forms.py:66 #: apps/transactions/forms.py:322 apps/transactions/forms.py:492 -#: apps/transactions/models.py:143 apps/transactions/models.py:311 -#: apps/transactions/models.py:520 +#: apps/transactions/models.py:187 apps/transactions/models.py:361 +#: apps/transactions/models.py:570 msgid "Reference Date" msgstr "Referentiedatum" #: apps/rules/forms.py:165 apps/rules/forms.py:178 apps/rules/models.py:29 -#: apps/rules/models.py:256 apps/transactions/models.py:148 -#: apps/transactions/models.py:501 +#: apps/rules/models.py:256 apps/transactions/models.py:192 +#: apps/transactions/models.py:551 msgid "Amount" msgstr "Bedrag" #: apps/rules/forms.py:166 apps/rules/forms.py:179 apps/rules/models.py:11 #: apps/rules/models.py:30 apps/rules/models.py:260 -#: apps/transactions/forms.py:325 apps/transactions/models.py:153 -#: apps/transactions/models.py:295 apps/transactions/models.py:504 +#: apps/transactions/forms.py:325 apps/transactions/models.py:197 +#: apps/transactions/models.py:345 apps/transactions/models.py:554 msgid "Description" msgstr "Beschrijving" #: apps/rules/forms.py:169 apps/rules/forms.py:184 apps/rules/models.py:268 -#: apps/transactions/models.py:192 +#: apps/transactions/models.py:236 msgid "Internal Note" msgstr "Interne opmerking" #: apps/rules/forms.py:170 apps/rules/forms.py:185 apps/rules/models.py:272 -#: apps/transactions/models.py:194 +#: apps/transactions/models.py:238 msgid "Internal ID" msgstr "Interne ID" #: apps/rules/forms.py:172 apps/rules/forms.py:181 apps/rules/models.py:34 #: apps/rules/models.py:276 apps/transactions/filters.py:81 #: apps/transactions/forms.py:55 apps/transactions/forms.py:486 -#: apps/transactions/forms.py:731 apps/transactions/models.py:117 -#: apps/transactions/models.py:170 apps/transactions/models.py:333 -#: apps/transactions/models.py:515 templates/entities/fragments/list.html:5 +#: apps/transactions/forms.py:731 apps/transactions/models.py:161 +#: apps/transactions/models.py:214 apps/transactions/models.py:383 +#: apps/transactions/models.py:565 templates/entities/fragments/list.html:5 #: templates/entities/pages/index.html:4 templates/includes/navbar.html:107 msgid "Entities" msgstr "Bedrijven" @@ -992,14 +1033,6 @@ msgstr "Maximaal bedrag" msgid "More" msgstr "Meer" -#: apps/transactions/forms.py:266 -msgid "From Account" -msgstr "Van rekening" - -#: apps/transactions/forms.py:271 -msgid "To Account" -msgstr "Naar rekening" - #: apps/transactions/forms.py:278 msgid "From Amount" msgstr "Van Bedrag" @@ -1013,10 +1046,6 @@ msgstr "Naar Bedrag" msgid "Transfer" msgstr "Overschrijving" -#: apps/transactions/forms.py:413 -msgid "From and To accounts must be different." -msgstr "Van en Naar rekening moeten verschillend zijn." - #: apps/transactions/forms.py:610 msgid "Tag name" msgstr "Labelnaam" @@ -1037,11 +1066,11 @@ msgstr "Gedempte categorieën tellen niet mee voor je maandtotaal" msgid "End date should be after the start date" msgstr "De einddatum moet na de begindatum vallen" -#: apps/transactions/models.py:68 +#: apps/transactions/models.py:112 msgid "Mute" msgstr "Gedempt" -#: apps/transactions/models.py:73 +#: apps/transactions/models.py:117 msgid "" "Deactivated categories won't be able to be selected when creating new " "transactions" @@ -1049,26 +1078,26 @@ msgstr "" "Gedeactiveerde categorieën kunnen niet worden geselecteerd bij het maken van " "nieuwe transacties" -#: apps/transactions/models.py:78 +#: apps/transactions/models.py:122 msgid "Transaction Category" msgstr "Transactie categorie" -#: apps/transactions/models.py:79 +#: apps/transactions/models.py:123 msgid "Transaction Categories" msgstr "Transactie categorieën" -#: apps/transactions/models.py:92 +#: apps/transactions/models.py:136 msgid "" "Deactivated tags won't be able to be selected when creating new transactions" msgstr "" "Gedeactiveerde labels kunnen niet worden geselecteerd bij het maken van " "nieuwe verrichtingen" -#: apps/transactions/models.py:97 apps/transactions/models.py:98 +#: apps/transactions/models.py:141 apps/transactions/models.py:142 msgid "Transaction Tags" msgstr "Verrichting Labels" -#: apps/transactions/models.py:111 +#: apps/transactions/models.py:155 msgid "" "Deactivated entities won't be able to be selected when creating new " "transactions" @@ -1076,11 +1105,11 @@ msgstr "" "Gedeactiveerde bedrijven kunnen niet worden geselecteerd bij het maken van " "nieuwe verrichtingen" -#: apps/transactions/models.py:116 +#: apps/transactions/models.py:160 msgid "Entity" msgstr "Bedrijf" -#: apps/transactions/models.py:126 +#: apps/transactions/models.py:170 #: templates/calendar_view/fragments/list.html:42 #: templates/calendar_view/fragments/list.html:44 #: templates/calendar_view/fragments/list.html:52 @@ -1090,7 +1119,7 @@ msgstr "Bedrijf" msgid "Income" msgstr "Ontvangsten Transactie" -#: apps/transactions/models.py:127 +#: apps/transactions/models.py:171 #: templates/calendar_view/fragments/list.html:46 #: templates/calendar_view/fragments/list.html:48 #: templates/calendar_view/fragments/list.html:56 @@ -1099,27 +1128,27 @@ msgstr "Ontvangsten Transactie" msgid "Expense" msgstr "Uitgave Transactie" -#: apps/transactions/models.py:181 apps/transactions/models.py:340 +#: apps/transactions/models.py:225 apps/transactions/models.py:390 msgid "Installment Plan" msgstr "Afbetalingsplan" -#: apps/transactions/models.py:190 apps/transactions/models.py:541 +#: apps/transactions/models.py:234 apps/transactions/models.py:591 msgid "Recurring Transaction" msgstr "Terugkerende verrichting" -#: apps/transactions/models.py:198 +#: apps/transactions/models.py:242 msgid "Deleted" msgstr "Verwijderd" -#: apps/transactions/models.py:203 +#: apps/transactions/models.py:247 msgid "Deleted At" msgstr "Verwijderd Op" -#: apps/transactions/models.py:211 +#: apps/transactions/models.py:255 msgid "Transaction" msgstr "Verrichting" -#: apps/transactions/models.py:212 templates/includes/navbar.html:54 +#: apps/transactions/models.py:256 templates/includes/navbar.html:54 #: templates/includes/navbar.html:101 #: templates/recurring_transactions/fragments/list_transactions.html:5 #: templates/recurring_transactions/fragments/table.html:37 @@ -1127,95 +1156,111 @@ msgstr "Verrichting" msgid "Transactions" msgstr "Verrichtingen" -#: apps/transactions/models.py:282 +#: apps/transactions/models.py:323 templates/tags/fragments/table.html:53 +msgid "No tags" +msgstr "Geen labels" + +#: apps/transactions/models.py:324 +#, fuzzy +#| msgid "No categories" +msgid "No category" +msgstr "Geen categorieën" + +#: apps/transactions/models.py:326 +#, fuzzy +#| msgid "Description" +msgid "No description" +msgstr "Beschrijving" + +#: apps/transactions/models.py:332 msgid "Yearly" msgstr "Jaarlijks" -#: apps/transactions/models.py:283 apps/users/models.py:26 +#: apps/transactions/models.py:333 apps/users/models.py:26 #: templates/includes/navbar.html:26 msgid "Monthly" msgstr "Maandelijks" -#: apps/transactions/models.py:284 +#: apps/transactions/models.py:334 msgid "Weekly" msgstr "Wekelijks" -#: apps/transactions/models.py:285 +#: apps/transactions/models.py:335 msgid "Daily" msgstr "Dagelijks" -#: apps/transactions/models.py:298 +#: apps/transactions/models.py:348 msgid "Number of Installments" msgstr "Aantal aflossingen" -#: apps/transactions/models.py:303 +#: apps/transactions/models.py:353 msgid "Installment Start" msgstr "Begin afbetaling" -#: apps/transactions/models.py:304 +#: apps/transactions/models.py:354 msgid "The installment number to start counting from" msgstr "Het nummer van de aflevering om mee te beginnen" -#: apps/transactions/models.py:309 apps/transactions/models.py:524 +#: apps/transactions/models.py:359 apps/transactions/models.py:574 msgid "Start Date" msgstr "Startdatum" -#: apps/transactions/models.py:313 apps/transactions/models.py:525 +#: apps/transactions/models.py:363 apps/transactions/models.py:575 msgid "End Date" msgstr "Einddatum" -#: apps/transactions/models.py:318 +#: apps/transactions/models.py:368 msgid "Recurrence" msgstr "Terugkeerpatroon" -#: apps/transactions/models.py:321 +#: apps/transactions/models.py:371 msgid "Installment Amount" msgstr "Termijnbedrag" -#: apps/transactions/models.py:341 templates/includes/navbar.html:69 +#: apps/transactions/models.py:391 templates/includes/navbar.html:69 #: templates/installment_plans/fragments/list.html:5 #: templates/installment_plans/pages/index.html:4 msgid "Installment Plans" msgstr "Afbetalingsplannen" -#: apps/transactions/models.py:483 +#: apps/transactions/models.py:533 msgid "day(s)" msgstr "dag(en)" -#: apps/transactions/models.py:484 +#: apps/transactions/models.py:534 msgid "week(s)" msgstr "we(e)k(en)" -#: apps/transactions/models.py:485 +#: apps/transactions/models.py:535 msgid "month(s)" msgstr "maand(en)" -#: apps/transactions/models.py:486 +#: apps/transactions/models.py:536 msgid "year(s)" msgstr "ja(a)r(en)" -#: apps/transactions/models.py:488 +#: apps/transactions/models.py:538 #: templates/recurring_transactions/fragments/list.html:24 msgid "Paused" msgstr "Gepauzeerd" -#: apps/transactions/models.py:527 +#: apps/transactions/models.py:577 msgid "Recurrence Type" msgstr "Type Terugkeerpatroon" -#: apps/transactions/models.py:530 +#: apps/transactions/models.py:580 msgid "Recurrence Interval" msgstr "Terugkeer Interval" -#: apps/transactions/models.py:534 +#: apps/transactions/models.py:584 msgid "Last Generated Date" msgstr "Laatste Gegenereerde Datum" -#: apps/transactions/models.py:537 +#: apps/transactions/models.py:587 msgid "Last Generated Reference Date" msgstr "Laatste Gegenereerde Referentiedatum" -#: apps/transactions/models.py:542 templates/includes/navbar.html:71 +#: apps/transactions/models.py:592 templates/includes/navbar.html:71 #: templates/recurring_transactions/fragments/list.html:5 #: templates/recurring_transactions/pages/index.html:4 msgid "Recurring Transactions" @@ -1231,35 +1276,35 @@ msgstr "%(value)s heeft te veel decimalen. Het maximum is 30." msgid "%(value)s is not a non-negative number" msgstr "%(value)s is geen niet-negatief getal" -#: apps/transactions/views/actions.py:23 +#: apps/transactions/views/actions.py:24 #, python-format msgid "%(count)s transaction marked as paid" msgid_plural "%(count)s transactions marked as paid" msgstr[0] "%(count)s verrichting gemarkeerd als betaald" msgstr[1] "%(count)s verrichtingen gemarkeerd als betaald" -#: apps/transactions/views/actions.py:47 +#: apps/transactions/views/actions.py:48 #, python-format msgid "%(count)s transaction marked as not paid" msgid_plural "%(count)s transactions marked as not paid" msgstr[0] "%(count)s verrichting gemarkeerd als niet betaald" msgstr[1] "%(count)s verrichtingen gemarkeerd als niet betaald" -#: apps/transactions/views/actions.py:71 +#: apps/transactions/views/actions.py:72 #, python-format msgid "%(count)s transaction deleted successfully" msgid_plural "%(count)s transactions deleted successfully" msgstr[0] "%(count)s verrichting succesvol verwijderd" msgstr[1] "%(count)s verrichtingen succesvol verwijderd" -#: apps/transactions/views/actions.py:95 +#: apps/transactions/views/actions.py:96 #, python-format msgid "%(count)s transaction restored successfully" msgid_plural "%(count)s transactions restored successfully" msgstr[0] "%(count)s verrichting succesvol hersteld" msgstr[1] "%(count)s verrichtingen succesvol hersteld" -#: apps/transactions/views/actions.py:130 +#: apps/transactions/views/actions.py:131 #, python-format msgid "%(count)s transaction duplicated successfully" msgid_plural "%(count)s transactions duplicated successfully" @@ -1520,7 +1565,7 @@ msgstr "Acties" #: templates/account_groups/fragments/list.html:36 #: templates/accounts/fragments/list.html:41 #: templates/categories/fragments/table.html:29 -#: templates/cotton/transaction/item.html:127 +#: templates/cotton/transaction/item.html:130 #: templates/cotton/ui/transactions_action_bar.html:49 #: templates/currencies/fragments/list.html:37 #: templates/dca/fragments/strategy/details.html:67 @@ -1542,8 +1587,8 @@ msgstr "Bijwerken" #: templates/account_groups/fragments/list.html:43 #: templates/accounts/fragments/list.html:48 #: templates/categories/fragments/table.html:36 -#: templates/cotton/transaction/item.html:142 -#: templates/cotton/transaction/item.html:161 +#: templates/cotton/transaction/item.html:145 +#: templates/cotton/transaction/item.html:164 #: templates/cotton/ui/deleted_transactions_action_bar.html:55 #: templates/cotton/ui/transactions_action_bar.html:86 #: templates/currencies/fragments/list.html:44 @@ -1568,8 +1613,8 @@ msgstr "Verwijderen" #: templates/account_groups/fragments/list.html:47 #: templates/accounts/fragments/list.html:52 #: templates/categories/fragments/table.html:41 -#: templates/cotton/transaction/item.html:146 -#: templates/cotton/transaction/item.html:165 +#: templates/cotton/transaction/item.html:149 +#: templates/cotton/transaction/item.html:168 #: templates/cotton/ui/deleted_transactions_action_bar.html:57 #: templates/cotton/ui/transactions_action_bar.html:88 #: templates/currencies/fragments/list.html:48 @@ -1597,8 +1642,8 @@ msgstr "Weet je het zeker?" #: templates/account_groups/fragments/list.html:48 #: templates/accounts/fragments/list.html:53 #: templates/categories/fragments/table.html:42 -#: templates/cotton/transaction/item.html:147 -#: templates/cotton/transaction/item.html:166 +#: templates/cotton/transaction/item.html:150 +#: templates/cotton/transaction/item.html:169 #: templates/cotton/ui/deleted_transactions_action_bar.html:58 #: templates/cotton/ui/transactions_action_bar.html:89 #: templates/currencies/fragments/list.html:49 @@ -1619,8 +1664,8 @@ msgstr "Je kunt dit niet meer terugdraaien!" #: templates/account_groups/fragments/list.html:49 #: templates/accounts/fragments/list.html:54 #: templates/categories/fragments/table.html:43 -#: templates/cotton/transaction/item.html:148 -#: templates/cotton/transaction/item.html:167 +#: templates/cotton/transaction/item.html:151 +#: templates/cotton/transaction/item.html:170 #: templates/currencies/fragments/list.html:50 #: templates/dca/fragments/strategy/details.html:82 #: templates/dca/fragments/strategy/list.html:48 @@ -1671,7 +1716,7 @@ msgstr "Rekening bewerken" msgid "Is Asset" msgstr "Is Vermogen" -#: templates/accounts/fragments/list.html:70 +#: templates/accounts/fragments/list.html:69 msgid "No accounts" msgstr "Geen rekeningen" @@ -1749,12 +1794,16 @@ msgstr "Zoeken" msgid "Select" msgstr "Selecteer" -#: templates/cotton/transaction/item.html:134 +#: templates/cotton/transaction/item.html:56 +msgid "DCA" +msgstr "" + +#: templates/cotton/transaction/item.html:137 #: templates/cotton/ui/transactions_action_bar.html:78 msgid "Duplicate" msgstr "Dupliceren" -#: templates/cotton/transaction/item.html:155 +#: templates/cotton/transaction/item.html:158 #: templates/cotton/ui/deleted_transactions_action_bar.html:47 msgid "Restore" msgstr "Herstel" @@ -2610,10 +2659,6 @@ msgstr "Label toevoegen" msgid "Edit tag" msgstr "Label bewerken" -#: templates/tags/fragments/table.html:53 -msgid "No tags" -msgstr "Geen labels" - #: templates/transactions/fragments/add.html:5 #: templates/transactions/pages/add.html:5 msgid "New transaction" diff --git a/app/locale/pt_BR/LC_MESSAGES/django.po b/app/locale/pt_BR/LC_MESSAGES/django.po index 34dee0a..c15c90f 100644 --- a/app/locale/pt_BR/LC_MESSAGES/django.po +++ b/app/locale/pt_BR/LC_MESSAGES/django.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-09 17:27-0300\n" -"PO-Revision-Date: 2025-02-09 17:30-0300\n" +"POT-Creation-Date: 2025-02-15 00:38-0300\n" +"PO-Revision-Date: 2025-02-15 00:39-0300\n" "Last-Translator: Herculino Trotta\n" "Language-Team: \n" "Language: pt_BR\n" @@ -25,7 +25,7 @@ msgstr "Nome do grupo" #: apps/accounts/forms.py:40 apps/accounts/forms.py:96 #: apps/currencies/forms.py:53 apps/currencies/forms.py:91 -#: apps/currencies/forms.py:142 apps/dca/forms.py:41 apps/dca/forms.py:93 +#: apps/currencies/forms.py:142 apps/dca/forms.py:49 apps/dca/forms.py:224 #: apps/import_app/forms.py:34 apps/rules/forms.py:45 apps/rules/forms.py:87 #: apps/rules/forms.py:359 apps/transactions/forms.py:190 #: apps/transactions/forms.py:257 apps/transactions/forms.py:581 @@ -35,9 +35,9 @@ msgid "Update" msgstr "Atualizar" #: apps/accounts/forms.py:48 apps/accounts/forms.py:104 -#: apps/common/widgets/tom_select.py:12 apps/currencies/forms.py:61 +#: apps/common/widgets/tom_select.py:13 apps/currencies/forms.py:61 #: apps/currencies/forms.py:99 apps/currencies/forms.py:150 -#: apps/dca/forms.py:49 apps/dca/forms.py:102 apps/import_app/forms.py:42 +#: apps/dca/forms.py:57 apps/dca/forms.py:232 apps/import_app/forms.py:42 #: apps/rules/forms.py:53 apps/rules/forms.py:95 apps/rules/forms.py:367 #: apps/transactions/forms.py:174 apps/transactions/forms.py:199 #: apps/transactions/forms.py:589 apps/transactions/forms.py:632 @@ -69,30 +69,32 @@ msgstr "Grupo da Conta" msgid "New balance" msgstr "Novo saldo" -#: apps/accounts/forms.py:119 apps/rules/forms.py:168 apps/rules/forms.py:183 -#: apps/rules/models.py:32 apps/rules/models.py:280 -#: apps/transactions/forms.py:39 apps/transactions/forms.py:291 -#: apps/transactions/forms.py:298 apps/transactions/forms.py:478 -#: apps/transactions/forms.py:723 apps/transactions/models.py:159 -#: apps/transactions/models.py:328 apps/transactions/models.py:508 +#: apps/accounts/forms.py:119 apps/dca/forms.py:85 apps/dca/forms.py:92 +#: apps/rules/forms.py:168 apps/rules/forms.py:183 apps/rules/models.py:32 +#: apps/rules/models.py:280 apps/transactions/forms.py:39 +#: apps/transactions/forms.py:291 apps/transactions/forms.py:298 +#: apps/transactions/forms.py:478 apps/transactions/forms.py:723 +#: apps/transactions/models.py:203 apps/transactions/models.py:378 +#: apps/transactions/models.py:558 msgid "Category" msgstr "Categoria" -#: apps/accounts/forms.py:126 apps/rules/forms.py:171 apps/rules/forms.py:180 -#: apps/rules/models.py:33 apps/rules/models.py:284 -#: apps/transactions/filters.py:74 apps/transactions/forms.py:47 -#: apps/transactions/forms.py:307 apps/transactions/forms.py:315 -#: apps/transactions/forms.py:471 apps/transactions/forms.py:716 -#: apps/transactions/models.py:165 apps/transactions/models.py:330 -#: apps/transactions/models.py:512 templates/includes/navbar.html:105 -#: templates/tags/fragments/list.html:5 templates/tags/pages/index.html:4 +#: apps/accounts/forms.py:126 apps/dca/forms.py:101 apps/dca/forms.py:109 +#: apps/rules/forms.py:171 apps/rules/forms.py:180 apps/rules/models.py:33 +#: apps/rules/models.py:284 apps/transactions/filters.py:74 +#: apps/transactions/forms.py:47 apps/transactions/forms.py:307 +#: apps/transactions/forms.py:315 apps/transactions/forms.py:471 +#: apps/transactions/forms.py:716 apps/transactions/models.py:209 +#: apps/transactions/models.py:380 apps/transactions/models.py:562 +#: templates/includes/navbar.html:105 templates/tags/fragments/list.html:5 +#: templates/tags/pages/index.html:4 msgid "Tags" msgstr "Tags" #: apps/accounts/models.py:9 apps/accounts/models.py:21 apps/dca/models.py:14 #: apps/import_app/models.py:14 apps/rules/models.py:10 -#: apps/transactions/models.py:67 apps/transactions/models.py:87 -#: apps/transactions/models.py:106 +#: apps/transactions/models.py:111 apps/transactions/models.py:131 +#: apps/transactions/models.py:150 #: templates/account_groups/fragments/list.html:25 #: templates/accounts/fragments/list.html:25 #: templates/categories/fragments/table.html:16 @@ -157,8 +159,8 @@ msgstr "" #: apps/accounts/models.py:59 apps/rules/forms.py:160 apps/rules/forms.py:173 #: apps/rules/models.py:24 apps/rules/models.py:236 #: apps/transactions/forms.py:59 apps/transactions/forms.py:463 -#: apps/transactions/forms.py:708 apps/transactions/models.py:132 -#: apps/transactions/models.py:288 apps/transactions/models.py:490 +#: apps/transactions/forms.py:708 apps/transactions/models.py:176 +#: apps/transactions/models.py:338 apps/transactions/models.py:540 msgid "Account" msgstr "Conta" @@ -236,13 +238,13 @@ msgstr "Dados da entidade inválidos. Forneça um ID ou nome." msgid "Either 'date' or 'reference_date' must be provided." msgstr "É necessário fornecer “date” ou “reference_date”." -#: apps/common/fields/forms/dynamic_select.py:127 -#: apps/common/fields/forms/dynamic_select.py:163 +#: apps/common/fields/forms/dynamic_select.py:131 +#: apps/common/fields/forms/dynamic_select.py:167 msgid "Error creating new instance" msgstr "Erro criando nova instância" #: apps/common/fields/forms/grouped_select.py:24 -#: apps/common/widgets/tom_select.py:91 apps/common/widgets/tom_select.py:94 +#: apps/common/widgets/tom_select.py:92 apps/common/widgets/tom_select.py:95 msgid "Ungrouped" msgstr "Não agrupado" @@ -341,18 +343,18 @@ msgstr "Hoje" msgid "Now" msgstr "Agora" -#: apps/common/widgets/tom_select.py:10 +#: apps/common/widgets/tom_select.py:11 msgid "Remove" msgstr "Remover" -#: apps/common/widgets/tom_select.py:14 +#: apps/common/widgets/tom_select.py:15 #: templates/mini_tools/unit_price_calculator.html:174 #: templates/monthly_overview/pages/overview.html:172 #: templates/transactions/pages/transactions.html:17 msgid "Clear" msgstr "Limpar" -#: apps/common/widgets/tom_select.py:15 +#: apps/common/widgets/tom_select.py:16 msgid "No results..." msgstr "Sem resultados..." @@ -367,7 +369,7 @@ msgstr "Sufixo" #: apps/currencies/forms.py:69 apps/dca/models.py:156 apps/rules/forms.py:163 #: apps/rules/forms.py:176 apps/rules/models.py:27 apps/rules/models.py:248 #: apps/transactions/forms.py:63 apps/transactions/forms.py:319 -#: apps/transactions/models.py:142 +#: apps/transactions/models.py:186 #: templates/dca/fragments/strategy/details.html:52 #: templates/exchange_rates/fragments/table.html:10 #: templates/exchange_rates_services/fragments/table.html:10 @@ -446,8 +448,8 @@ msgstr "Nome do Serviço" msgid "Service Type" msgstr "Tipo de Serviço" -#: apps/currencies/models.py:107 apps/transactions/models.py:71 -#: apps/transactions/models.py:90 apps/transactions/models.py:109 +#: apps/currencies/models.py:107 apps/transactions/models.py:115 +#: apps/transactions/models.py:134 apps/transactions/models.py:153 #: templates/categories/fragments/list.html:21 #: templates/entities/fragments/list.html:21 #: templates/recurring_transactions/fragments/list.html:21 @@ -573,6 +575,48 @@ msgstr "Serviço apagado com sucesso" msgid "Services queued successfully" msgstr "Serviços marcados para execução com sucesso" +#: apps/dca/forms.py:65 apps/dca/forms.py:164 +msgid "Create transaction" +msgstr "Criar transação" + +#: apps/dca/forms.py:70 apps/transactions/forms.py:266 +msgid "From Account" +msgstr "Conta de origem" + +#: apps/dca/forms.py:76 apps/transactions/forms.py:271 +msgid "To Account" +msgstr "Conta de destino" + +#: apps/dca/forms.py:116 apps/dca/models.py:169 +msgid "Expense Transaction" +msgstr "Transação de saída" + +#: apps/dca/forms.py:120 apps/dca/forms.py:130 +msgid "Type to search for a transaction to link to this entry" +msgstr "Digite para buscar uma transação para conectar à esta entrada" + +#: apps/dca/forms.py:126 apps/dca/models.py:177 +msgid "Income Transaction" +msgstr "Transação de entrada" + +#: apps/dca/forms.py:210 +msgid "Link transaction" +msgstr "Conectar transação" + +#: apps/dca/forms.py:279 apps/dca/forms.py:280 apps/dca/forms.py:285 +#: apps/dca/forms.py:289 +msgid "You must provide an account." +msgstr "Você deve informar uma conta." + +#: apps/dca/forms.py:294 apps/transactions/forms.py:413 +msgid "From and To accounts must be different." +msgstr "As contas De e Para devem ser diferentes." + +#: apps/dca/forms.py:308 +#, python-format +msgid "DCA for %(strategy_name)s" +msgstr "CMP para %(strategy_name)s" + #: apps/dca/models.py:17 msgid "Target Currency" msgstr "Moeda de destino" @@ -583,8 +627,8 @@ msgstr "Moeda de pagamento" #: apps/dca/models.py:27 apps/dca/models.py:179 apps/rules/forms.py:167 #: apps/rules/forms.py:182 apps/rules/models.py:31 apps/rules/models.py:264 -#: apps/transactions/forms.py:333 apps/transactions/models.py:155 -#: apps/transactions/models.py:337 apps/transactions/models.py:518 +#: apps/transactions/forms.py:333 apps/transactions/models.py:199 +#: apps/transactions/models.py:387 apps/transactions/models.py:568 msgid "Notes" msgstr "Notas" @@ -608,14 +652,6 @@ msgstr "Quantia paga" msgid "Amount Received" msgstr "Quantia recebida" -#: apps/dca/models.py:169 -msgid "Expense Transaction" -msgstr "Transação de saída" - -#: apps/dca/models.py:177 -msgid "Income Transaction" -msgstr "Transação de entrada" - #: apps/dca/models.py:184 msgid "DCA Entry" msgstr "Entrada CMP" @@ -636,15 +672,15 @@ msgstr "Estratégia CMP atualizada com sucesso" msgid "DCA strategy deleted successfully" msgstr "Estratégia CMP apagada com sucesso" -#: apps/dca/views.py:163 +#: apps/dca/views.py:161 msgid "Entry added successfully" msgstr "Entrada adicionada com sucesso" -#: apps/dca/views.py:190 +#: apps/dca/views.py:188 msgid "Entry updated successfully" msgstr "Entrada atualizada com sucesso" -#: apps/dca/views.py:216 +#: apps/dca/views.py:214 msgid "Entry deleted successfully" msgstr "Entrada apagada com sucesso" @@ -755,14 +791,14 @@ msgid "Operator" msgstr "Operador" #: apps/rules/forms.py:161 apps/rules/forms.py:174 apps/rules/models.py:25 -#: apps/rules/models.py:240 apps/transactions/models.py:139 -#: apps/transactions/models.py:293 apps/transactions/models.py:496 +#: apps/rules/models.py:240 apps/transactions/models.py:183 +#: apps/transactions/models.py:343 apps/transactions/models.py:546 msgid "Type" msgstr "Tipo" #: apps/rules/forms.py:162 apps/rules/forms.py:175 apps/rules/models.py:26 #: apps/rules/models.py:244 apps/transactions/filters.py:23 -#: apps/transactions/models.py:141 templates/cotton/transaction/item.html:21 +#: apps/transactions/models.py:185 templates/cotton/transaction/item.html:21 #: templates/cotton/transaction/item.html:31 #: templates/transactions/widgets/paid_toggle_button.html:12 #: templates/transactions/widgets/unselectable_paid_toggle_button.html:16 @@ -772,40 +808,40 @@ msgstr "Pago" #: apps/rules/forms.py:164 apps/rules/forms.py:177 apps/rules/models.py:28 #: apps/rules/models.py:252 apps/transactions/forms.py:66 #: apps/transactions/forms.py:322 apps/transactions/forms.py:492 -#: apps/transactions/models.py:143 apps/transactions/models.py:311 -#: apps/transactions/models.py:520 +#: apps/transactions/models.py:187 apps/transactions/models.py:361 +#: apps/transactions/models.py:570 msgid "Reference Date" msgstr "Data de Referência" #: apps/rules/forms.py:165 apps/rules/forms.py:178 apps/rules/models.py:29 -#: apps/rules/models.py:256 apps/transactions/models.py:148 -#: apps/transactions/models.py:501 +#: apps/rules/models.py:256 apps/transactions/models.py:192 +#: apps/transactions/models.py:551 msgid "Amount" msgstr "Quantia" #: apps/rules/forms.py:166 apps/rules/forms.py:179 apps/rules/models.py:11 #: apps/rules/models.py:30 apps/rules/models.py:260 -#: apps/transactions/forms.py:325 apps/transactions/models.py:153 -#: apps/transactions/models.py:295 apps/transactions/models.py:504 +#: apps/transactions/forms.py:325 apps/transactions/models.py:197 +#: apps/transactions/models.py:345 apps/transactions/models.py:554 msgid "Description" msgstr "Descrição" #: apps/rules/forms.py:169 apps/rules/forms.py:184 apps/rules/models.py:268 -#: apps/transactions/models.py:192 +#: apps/transactions/models.py:236 msgid "Internal Note" msgstr "Nota Interna" #: apps/rules/forms.py:170 apps/rules/forms.py:185 apps/rules/models.py:272 -#: apps/transactions/models.py:194 +#: apps/transactions/models.py:238 msgid "Internal ID" msgstr "ID Interna" #: apps/rules/forms.py:172 apps/rules/forms.py:181 apps/rules/models.py:34 #: apps/rules/models.py:276 apps/transactions/filters.py:81 #: apps/transactions/forms.py:55 apps/transactions/forms.py:486 -#: apps/transactions/forms.py:731 apps/transactions/models.py:117 -#: apps/transactions/models.py:170 apps/transactions/models.py:333 -#: apps/transactions/models.py:515 templates/entities/fragments/list.html:5 +#: apps/transactions/forms.py:731 apps/transactions/models.py:161 +#: apps/transactions/models.py:214 apps/transactions/models.py:383 +#: apps/transactions/models.py:565 templates/entities/fragments/list.html:5 #: templates/entities/pages/index.html:4 templates/includes/navbar.html:107 msgid "Entities" msgstr "Entidades" @@ -990,14 +1026,6 @@ msgstr "Quantia máxima" msgid "More" msgstr "Mais" -#: apps/transactions/forms.py:266 -msgid "From Account" -msgstr "Conta de origem" - -#: apps/transactions/forms.py:271 -msgid "To Account" -msgstr "Conta de destino" - #: apps/transactions/forms.py:278 msgid "From Amount" msgstr "Quantia de origem" @@ -1011,10 +1039,6 @@ msgstr "Quantia de destino" msgid "Transfer" msgstr "Transferir" -#: apps/transactions/forms.py:413 -msgid "From and To accounts must be different." -msgstr "As contas De e Para devem ser diferentes." - #: apps/transactions/forms.py:610 msgid "Tag name" msgstr "Nome da Tag" @@ -1035,11 +1059,11 @@ msgstr "As categorias silenciadas não serão contabilizadas em seu total mensal msgid "End date should be after the start date" msgstr "Data final deve ser após data inicial" -#: apps/transactions/models.py:68 +#: apps/transactions/models.py:112 msgid "Mute" msgstr "Silenciada" -#: apps/transactions/models.py:73 +#: apps/transactions/models.py:117 msgid "" "Deactivated categories won't be able to be selected when creating new " "transactions" @@ -1047,25 +1071,25 @@ msgstr "" "As categorias desativadas não poderão ser selecionadas ao criar novas " "transações" -#: apps/transactions/models.py:78 +#: apps/transactions/models.py:122 msgid "Transaction Category" msgstr "Categoria da Transação" -#: apps/transactions/models.py:79 +#: apps/transactions/models.py:123 msgid "Transaction Categories" msgstr "Categorias da Trasanção" -#: apps/transactions/models.py:92 +#: apps/transactions/models.py:136 msgid "" "Deactivated tags won't be able to be selected when creating new transactions" msgstr "" "As tags desativadas não poderão ser selecionadas ao criar novas transações" -#: apps/transactions/models.py:97 apps/transactions/models.py:98 +#: apps/transactions/models.py:141 apps/transactions/models.py:142 msgid "Transaction Tags" msgstr "Tags da Transação" -#: apps/transactions/models.py:111 +#: apps/transactions/models.py:155 msgid "" "Deactivated entities won't be able to be selected when creating new " "transactions" @@ -1073,11 +1097,11 @@ msgstr "" "As entidades desativadas não poderão ser selecionadas ao criar novas " "transações" -#: apps/transactions/models.py:116 +#: apps/transactions/models.py:160 msgid "Entity" msgstr "Entidade" -#: apps/transactions/models.py:126 +#: apps/transactions/models.py:170 #: templates/calendar_view/fragments/list.html:42 #: templates/calendar_view/fragments/list.html:44 #: templates/calendar_view/fragments/list.html:52 @@ -1087,7 +1111,7 @@ msgstr "Entidade" msgid "Income" msgstr "Renda" -#: apps/transactions/models.py:127 +#: apps/transactions/models.py:171 #: templates/calendar_view/fragments/list.html:46 #: templates/calendar_view/fragments/list.html:48 #: templates/calendar_view/fragments/list.html:56 @@ -1096,27 +1120,27 @@ msgstr "Renda" msgid "Expense" msgstr "Despesa" -#: apps/transactions/models.py:181 apps/transactions/models.py:340 +#: apps/transactions/models.py:225 apps/transactions/models.py:390 msgid "Installment Plan" msgstr "Parcelamento" -#: apps/transactions/models.py:190 apps/transactions/models.py:541 +#: apps/transactions/models.py:234 apps/transactions/models.py:591 msgid "Recurring Transaction" msgstr "Transação Recorrente" -#: apps/transactions/models.py:198 +#: apps/transactions/models.py:242 msgid "Deleted" msgstr "Apagado" -#: apps/transactions/models.py:203 +#: apps/transactions/models.py:247 msgid "Deleted At" msgstr "Apagado Em" -#: apps/transactions/models.py:211 +#: apps/transactions/models.py:255 msgid "Transaction" msgstr "Transação" -#: apps/transactions/models.py:212 templates/includes/navbar.html:54 +#: apps/transactions/models.py:256 templates/includes/navbar.html:54 #: templates/includes/navbar.html:101 #: templates/recurring_transactions/fragments/list_transactions.html:5 #: templates/recurring_transactions/fragments/table.html:37 @@ -1124,95 +1148,107 @@ msgstr "Transação" msgid "Transactions" msgstr "Transações" -#: apps/transactions/models.py:282 +#: apps/transactions/models.py:323 templates/tags/fragments/table.html:53 +msgid "No tags" +msgstr "Nenhuma tag" + +#: apps/transactions/models.py:324 +msgid "No category" +msgstr "Sem categoria" + +#: apps/transactions/models.py:326 +msgid "No description" +msgstr "Sem descrição" + +#: apps/transactions/models.py:332 msgid "Yearly" msgstr "Anual" -#: apps/transactions/models.py:283 apps/users/models.py:26 +#: apps/transactions/models.py:333 apps/users/models.py:26 #: templates/includes/navbar.html:26 msgid "Monthly" msgstr "Mensal" -#: apps/transactions/models.py:284 +#: apps/transactions/models.py:334 msgid "Weekly" msgstr "Semanal" -#: apps/transactions/models.py:285 +#: apps/transactions/models.py:335 msgid "Daily" msgstr "Diária" -#: apps/transactions/models.py:298 +#: apps/transactions/models.py:348 msgid "Number of Installments" msgstr "Número de Parcelas" -#: apps/transactions/models.py:303 +#: apps/transactions/models.py:353 msgid "Installment Start" msgstr "Parcela inicial" -#: apps/transactions/models.py:304 +#: apps/transactions/models.py:354 msgid "The installment number to start counting from" msgstr "O número da parcela a partir do qual se inicia a contagem" -#: apps/transactions/models.py:309 apps/transactions/models.py:524 +#: apps/transactions/models.py:359 apps/transactions/models.py:574 msgid "Start Date" msgstr "Data de Início" -#: apps/transactions/models.py:313 apps/transactions/models.py:525 +#: apps/transactions/models.py:363 apps/transactions/models.py:575 msgid "End Date" msgstr "Data Final" -#: apps/transactions/models.py:318 +#: apps/transactions/models.py:368 msgid "Recurrence" msgstr "Recorrência" -#: apps/transactions/models.py:321 +#: apps/transactions/models.py:371 msgid "Installment Amount" msgstr "Valor da Parcela" -#: apps/transactions/models.py:341 templates/includes/navbar.html:69 +#: apps/transactions/models.py:391 templates/includes/navbar.html:69 #: templates/installment_plans/fragments/list.html:5 #: templates/installment_plans/pages/index.html:4 msgid "Installment Plans" msgstr "Parcelamentos" -#: apps/transactions/models.py:483 +#: apps/transactions/models.py:533 msgid "day(s)" msgstr "dia(s)" -#: apps/transactions/models.py:484 +#: apps/transactions/models.py:534 msgid "week(s)" msgstr "semana(s)" -#: apps/transactions/models.py:485 +#: apps/transactions/models.py:535 msgid "month(s)" msgstr "mês(es)" -#: apps/transactions/models.py:486 +#: apps/transactions/models.py:536 msgid "year(s)" msgstr "ano(s)" -#: apps/transactions/models.py:488 +#: apps/transactions/models.py:538 #: templates/recurring_transactions/fragments/list.html:24 msgid "Paused" msgstr "Pausado" -#: apps/transactions/models.py:527 +#: apps/transactions/models.py:577 msgid "Recurrence Type" msgstr "Tipo de recorrência" -#: apps/transactions/models.py:530 +#: apps/transactions/models.py:580 msgid "Recurrence Interval" msgstr "Intervalo de recorrência" -#: apps/transactions/models.py:534 +#: apps/transactions/models.py:584 msgid "Last Generated Date" msgstr "Última data gerada" -#: apps/transactions/models.py:537 +#: apps/transactions/models.py:587 msgid "Last Generated Reference Date" msgstr "Última data de referência gerada" -#: apps/transactions/models.py:542 templates/includes/navbar.html:71 +#: apps/transactions/models.py:592 templates/includes/navbar.html:71 #: templates/recurring_transactions/fragments/list.html:5 #: templates/recurring_transactions/pages/index.html:4 msgid "Recurring Transactions" @@ -1228,35 +1264,35 @@ msgstr "%(value)s tem muitas casas decimais. O máximo é 30." msgid "%(value)s is not a non-negative number" msgstr "%(value)s não é um número positivo" -#: apps/transactions/views/actions.py:23 +#: apps/transactions/views/actions.py:24 #, python-format msgid "%(count)s transaction marked as paid" msgid_plural "%(count)s transactions marked as paid" msgstr[0] "%(count)s transação marcada como paga" msgstr[1] "%(count)s transações marcadas como paga" -#: apps/transactions/views/actions.py:47 +#: apps/transactions/views/actions.py:48 #, python-format msgid "%(count)s transaction marked as not paid" msgid_plural "%(count)s transactions marked as not paid" msgstr[0] "%(count)s transação marcada como não paga" msgstr[1] "%(count)s transações marcadas como não paga" -#: apps/transactions/views/actions.py:71 +#: apps/transactions/views/actions.py:72 #, python-format msgid "%(count)s transaction deleted successfully" msgid_plural "%(count)s transactions deleted successfully" msgstr[0] "%(count)s transação apagada com sucesso" msgstr[1] "%(count)s transações apagadas com sucesso" -#: apps/transactions/views/actions.py:95 +#: apps/transactions/views/actions.py:96 #, python-format msgid "%(count)s transaction restored successfully" msgid_plural "%(count)s transactions restored successfully" msgstr[0] "%(count)s transação restaurada com sucesso" msgstr[1] "%(count)s transações restauradas com sucesso" -#: apps/transactions/views/actions.py:130 +#: apps/transactions/views/actions.py:131 #, python-format msgid "%(count)s transaction duplicated successfully" msgid_plural "%(count)s transactions duplicated successfully" @@ -1517,7 +1553,7 @@ msgstr "Ações" #: templates/account_groups/fragments/list.html:36 #: templates/accounts/fragments/list.html:41 #: templates/categories/fragments/table.html:29 -#: templates/cotton/transaction/item.html:127 +#: templates/cotton/transaction/item.html:130 #: templates/cotton/ui/transactions_action_bar.html:49 #: templates/currencies/fragments/list.html:37 #: templates/dca/fragments/strategy/details.html:67 @@ -1539,8 +1575,8 @@ msgstr "Editar" #: templates/account_groups/fragments/list.html:43 #: templates/accounts/fragments/list.html:48 #: templates/categories/fragments/table.html:36 -#: templates/cotton/transaction/item.html:142 -#: templates/cotton/transaction/item.html:161 +#: templates/cotton/transaction/item.html:145 +#: templates/cotton/transaction/item.html:164 #: templates/cotton/ui/deleted_transactions_action_bar.html:55 #: templates/cotton/ui/transactions_action_bar.html:86 #: templates/currencies/fragments/list.html:44 @@ -1565,8 +1601,8 @@ msgstr "Apagar" #: templates/account_groups/fragments/list.html:47 #: templates/accounts/fragments/list.html:52 #: templates/categories/fragments/table.html:41 -#: templates/cotton/transaction/item.html:146 -#: templates/cotton/transaction/item.html:165 +#: templates/cotton/transaction/item.html:149 +#: templates/cotton/transaction/item.html:168 #: templates/cotton/ui/deleted_transactions_action_bar.html:57 #: templates/cotton/ui/transactions_action_bar.html:88 #: templates/currencies/fragments/list.html:48 @@ -1594,8 +1630,8 @@ msgstr "Tem certeza?" #: templates/account_groups/fragments/list.html:48 #: templates/accounts/fragments/list.html:53 #: templates/categories/fragments/table.html:42 -#: templates/cotton/transaction/item.html:147 -#: templates/cotton/transaction/item.html:166 +#: templates/cotton/transaction/item.html:150 +#: templates/cotton/transaction/item.html:169 #: templates/cotton/ui/deleted_transactions_action_bar.html:58 #: templates/cotton/ui/transactions_action_bar.html:89 #: templates/currencies/fragments/list.html:49 @@ -1616,8 +1652,8 @@ msgstr "Você não será capaz de reverter isso!" #: templates/account_groups/fragments/list.html:49 #: templates/accounts/fragments/list.html:54 #: templates/categories/fragments/table.html:43 -#: templates/cotton/transaction/item.html:148 -#: templates/cotton/transaction/item.html:167 +#: templates/cotton/transaction/item.html:151 +#: templates/cotton/transaction/item.html:170 #: templates/currencies/fragments/list.html:50 #: templates/dca/fragments/strategy/details.html:82 #: templates/dca/fragments/strategy/list.html:48 @@ -1668,7 +1704,7 @@ msgstr "Editar conta" msgid "Is Asset" msgstr "É ativo" -#: templates/accounts/fragments/list.html:70 +#: templates/accounts/fragments/list.html:69 msgid "No accounts" msgstr "Nenhuma conta" @@ -1746,12 +1782,16 @@ msgstr "Buscar" msgid "Select" msgstr "Selecionar" -#: templates/cotton/transaction/item.html:134 +#: templates/cotton/transaction/item.html:56 +msgid "DCA" +msgstr "CMP" + +#: templates/cotton/transaction/item.html:137 #: templates/cotton/ui/transactions_action_bar.html:78 msgid "Duplicate" msgstr "Duplicar" -#: templates/cotton/transaction/item.html:155 +#: templates/cotton/transaction/item.html:158 #: templates/cotton/ui/deleted_transactions_action_bar.html:47 msgid "Restore" msgstr "Restaurar" @@ -2605,10 +2645,6 @@ msgstr "Adicionar tag" msgid "Edit tag" msgstr "Editar tag" -#: templates/tags/fragments/table.html:53 -msgid "No tags" -msgstr "Nenhuma tag" - #: templates/transactions/fragments/add.html:5 #: templates/transactions/pages/add.html:5 msgid "New transaction" @@ -2678,6 +2714,11 @@ msgstr "Visão Anual" msgid "Year" msgstr "Ano" +#, fuzzy +#~| msgid "Tags" +#~ msgid "No Tags" +#~ msgstr "Tags" + #, fuzzy #~| msgid "Start Date" #~ msgid "Search Date" diff --git a/app/templates/cotton/transaction/item.html b/app/templates/cotton/transaction/item.html index b2ddfdf..21f1fda 100644 --- a/app/templates/cotton/transaction/item.html +++ b/app/templates/cotton/transaction/item.html @@ -44,13 +44,16 @@ {# Description#}
{% spaceless %} - {{ transaction.description }} + {{ transaction.description }} {% if transaction.installment_plan and transaction.installment_id %} {{ transaction.installment_id }}/{{ transaction.installment_plan.installment_total_number }} + class="badge text-bg-secondary">{{ transaction.installment_id }}/{{ transaction.installment_plan.installment_total_number }} {% endif %} {% if transaction.recurring_transaction %} - + + {% endif %} + {% if transaction.dca_expense_entries.all or transaction.dca_income_entries.all %} + {% trans 'DCA' %} {% endif %} {% endspaceless %}
diff --git a/frontend/src/application/select.js b/frontend/src/application/select.js index 54ae41a..39a65c1 100644 --- a/frontend/src/application/select.js +++ b/frontend/src/application/select.js @@ -3,71 +3,84 @@ import * as Popper from "@popperjs/core"; window.TomSelect = function createDynamicTomSelect(element) { - // Basic configuration - const config = { - plugins: {}, + // Basic configuration + const config = { + plugins: {}, - // Extract 'create' option from data attribute - create: element.dataset.create === 'true', - copyClassesToDropdown: true, - allowEmptyOption: element.dataset.allowEmptyOption === 'true', - render: { - no_results: function () { - return `
${element.dataset.txtNoResults || 'No results...'}
`; + // Extract 'create' option from data attribute + create: element.dataset.create === 'true', + copyClassesToDropdown: true, + allowEmptyOption: element.dataset.allowEmptyOption === 'true', + render: { + no_results: function () { + return `
${element.dataset.txtNoResults || 'No results...'}
`; + }, + option_create: function (data, escape) { + return `
${element.dataset.txtCreate || 'Add'} ${escape(data.input)}
`; + }, }, - option_create: function(data, escape) { - return `
${element.dataset.txtCreate || 'Add'} ${escape(data.input)}
`; - }, - }, - onInitialize: function () { - this.popper = Popper.createPopper(this.control, this.dropdown, { - placement: "bottom-start", - modifiers: [ - { - name: "sameWidth", - enabled: true, - fn: ({state}) => { - state.styles.popper.width = `${state.rects.reference.width}px`; + onInitialize: function () { + this.popper = Popper.createPopper(this.control, this.dropdown, { + placement: "bottom-start", + modifiers: [ + { + name: "sameWidth", + enabled: true, + fn: ({state}) => { + state.styles.popper.width = `${state.rects.reference.width}px`; + }, + phase: "beforeWrite", + requires: ["computeStyles"], }, - phase: "beforeWrite", - requires: ["computeStyles"], - }, - { - name: 'flip', - options: { - fallbackPlacements: ['top-start'], + { + name: 'flip', + options: { + fallbackPlacements: ['top-start'], + }, }, - }, - ] + ] - }); + }); - }, - onDropdownOpen: function () { - this.popper.update(); - } - }; + }, + onDropdownOpen: function () { + this.popper.update(); + } + }; - if (element.dataset.checkboxes === 'true') { - config.plugins.checkbox_options = { + if (element.dataset.checkboxes === 'true') { + config.plugins.checkbox_options = { 'checkedClassNames': ['ts-checked'], 'uncheckedClassNames': ['ts-unchecked'], }; - } + } - if (element.dataset.clearButton === 'true') { - config.plugins.clear_button = { + if (element.dataset.clearButton === 'true') { + config.plugins.clear_button = { 'title': element.dataset.txtClear || 'Clear', }; - } + } - if (element.dataset.removeButton === 'true') { - config.plugins.remove_button = { + if (element.dataset.removeButton === 'true') { + config.plugins.remove_button = { 'title': element.dataset.txtRemove || 'Remove', }; - } + } - // Create and return the TomSelect instance - return new TomSelect(element, config); + if (element.dataset.load) { + config.load = function (query, callback) { + let url = element.dataset.load + '?q=' + encodeURIComponent(query); + fetch(url) + .then(response => response.json()) + .then(json => { + callback(json); + }).catch(() => { + callback(); + }); + }; + } + + // Create and return the TomSelect instance + return new TomSelect(element, config); };