add invoice_date field to Expense and Revenue models

This commit is contained in:
Thomas Steen Rasmussen 2019-01-20 15:33:05 +01:00
parent 29c468ab4a
commit e8edb24233
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,23 @@
# Generated by Django 2.1.3 on 2019-01-20 14:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('economy', '0004_auto_20181120_1835'),
]
operations = [
migrations.AddField(
model_name='expense',
name='invoice_date',
field=models.DateTimeField(blank=True, help_text='The invoice date for this Expense. This must match the invoice date on the documentation uploaded below.', null=True),
),
migrations.AddField(
model_name='revenue',
name='invoice_date',
field=models.DateTimeField(blank=True, help_text='The invoice date for this Revenue. This must match the invoice date on the documentation uploaded below.', null=True),
),
]

View File

@ -45,6 +45,12 @@ class Revenue(CampRelatedModel, UUIDModel):
upload_to='revenues/',
)
invoice_date = models.DateTimeField(
help_text='The invoice date for this Revenue. This must match the invoice date on the documentation uploaded below.',
blank=True,
null=True,
)
invoice_fk = models.ForeignKey(
'shop.Invoice',
on_delete=models.PROTECT,
@ -162,6 +168,12 @@ class Expense(CampRelatedModel, UUIDModel):
upload_to='expenses/',
)
invoice_date = models.DateTimeField(
help_text='The invoice date for this Expense. This must match the invoice date on the documentation uploaded below.',
blank=True,
null=True,
)
responsible_team = models.ForeignKey(
'teams.Team',
on_delete=models.PROTECT,