Added payment field to transaction
This commit is contained in:
parent
215787e204
commit
b45150d4ff
3 changed files with 32 additions and 4 deletions
|
@ -33,6 +33,7 @@ class Transaction(models.Model):
|
|||
date = models.DateField(default=date.today)
|
||||
real_date = models.DateField(blank=True, null=True)
|
||||
trader = models.CharField(max_length=128, blank=True, null=True)
|
||||
payment = models.CharField(max_length=128, blank=True, null=True)
|
||||
category = models.ForeignKey(
|
||||
Category, on_delete=models.SET_NULL, blank=True, null=True
|
||||
)
|
||||
|
@ -50,7 +51,16 @@ class Transaction(models.Model):
|
|||
class TransactionForm(ModelForm):
|
||||
class Meta:
|
||||
model = Transaction
|
||||
fields = ["date", "name", "value", "trader", "category", "real_date", "description"]
|
||||
fields = [
|
||||
"date",
|
||||
"name",
|
||||
"value",
|
||||
"trader",
|
||||
"category",
|
||||
"real_date",
|
||||
"payment",
|
||||
"description",
|
||||
]
|
||||
|
||||
|
||||
class Invoice(models.Model):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue