Add real date field to transactions
This commit is contained in:
parent
83aefe1f84
commit
215787e204
2 changed files with 20 additions and 1 deletions
|
@ -31,6 +31,7 @@ class Transaction(models.Model):
|
|||
description = models.TextField(null=True, blank=True)
|
||||
value = models.DecimalField(max_digits=12, decimal_places=2, default=0)
|
||||
date = models.DateField(default=date.today)
|
||||
real_date = models.DateField(blank=True, null=True)
|
||||
trader = models.CharField(max_length=128, blank=True, null=True)
|
||||
category = models.ForeignKey(
|
||||
Category, on_delete=models.SET_NULL, blank=True, null=True
|
||||
|
@ -49,7 +50,7 @@ class Transaction(models.Model):
|
|||
class TransactionForm(ModelForm):
|
||||
class Meta:
|
||||
model = Transaction
|
||||
fields = ["date", "name", "value", "trader", "category", "description"]
|
||||
fields = ["date", "name", "value", "trader", "category", "real_date", "description"]
|
||||
|
||||
|
||||
class Invoice(models.Model):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue