refactor: move some fields and widgets around

This commit is contained in:
Herculino Trotta
2024-10-10 22:37:10 -03:00
parent d2cd115751
commit 5b66ac7fac
8 changed files with 110 additions and 69 deletions

View File

@@ -6,9 +6,9 @@ from django.utils.functional import cached_property
from django.utils.translation import gettext_lazy as _
from apps.common.functions.decimals import truncate_decimal
from apps.transactions.fields import MonthYearField
from apps.transactions.validators import validate_decimal_places, validate_non_negative
from apps.currencies.utils.convert import convert
from apps.common.fields.month_year import MonthYearModelField
class TransactionCategory(models.Model):
@@ -76,7 +76,7 @@ class Transaction(models.Model):
)
is_paid = models.BooleanField(default=True, verbose_name=_("Paid"))
date = models.DateField(verbose_name=_("Date"))
reference_date = MonthYearField(verbose_name=_("Reference Date"))
reference_date = MonthYearModelField(verbose_name=_("Reference Date"))
amount = models.DecimalField(
max_digits=42,