add invoice_date to revenue and expense forms and templates

This commit is contained in:
Thomas Steen Rasmussen 2019-01-20 15:39:59 +01:00
parent e8edb24233
commit 864a7e6673
5 changed files with 17 additions and 5 deletions

View file

@ -36,23 +36,23 @@ class CleanInvoiceForm(forms.ModelForm):
class ExpenseCreateForm(CleanInvoiceForm):
class Meta:
model = Expense
fields = ['description', 'amount', 'invoice', 'paid_by_bornhack', 'responsible_team']
fields = ['description', 'amount', 'invoice', 'invoice_date', 'paid_by_bornhack', 'responsible_team']
class ExpenseUpdateForm(forms.ModelForm):
class Meta:
model = Expense
fields = ['description', 'amount', 'paid_by_bornhack', 'responsible_team']
fields = ['description', 'amount', 'invoice_date', 'paid_by_bornhack', 'responsible_team']
class RevenueCreateForm(CleanInvoiceForm):
class Meta:
model = Revenue
fields = ['description', 'amount', 'invoice', 'responsible_team']
fields = ['description', 'amount', 'invoice', 'invoice_date', 'responsible_team']
class RevenueUpdateForm(forms.ModelForm):
class Meta:
model = Revenue
fields = ['description', 'amount', 'responsible_team']
fields = ['description', 'amount', 'invoice_date', 'responsible_team']

View file

@ -6,6 +6,10 @@
<th>Amount</th>
<td>{{ expense.amount }} DKK</td>
</tr>
<tr>
<th>Invoice Date</th>
<td>{{ expense.invoice_date }}</td>
</tr>
<tr>
<th>Description</th>
<td>{{ expense.description }}</td>

View file

@ -6,6 +6,7 @@
<th>Paid by</th>
{% endif %}
<th>Amount</th>
<th>Invoice Date</th>
<th>Description</th>
<th>Responsible Team</th>
{% if not reimbursement %}
@ -22,6 +23,7 @@
<td>{% if expense.paid_by_bornhack %}BornHack{% else %}{{ expense.user }}{% endif %}</td>
{% endif %}
<td>{{ expense.amount }} DKK</td>
<td>{{ expense.invoice_date }}</td>
<td>{{ expense.description }}</td>
<td>{{ expense.responsible_team.name }} Team</td>

View file

@ -6,6 +6,10 @@
<th>Amount</th>
<td>{{ revenue.amount }} DKK</td>
</tr>
<tr>
<th>Invoice Date</th>
<td>{{ revenue.invoice_date }}</td>
</tr>
<tr>
<th>Description</th>
<td>{{ revenue.description }}</td>

View file

@ -2,7 +2,8 @@
<table class="table table-hover">
<thead>
<tr>
<th>Amaount</th>
<th>Amount</th>
<th>Invoice Date</th>
<th>Description</th>
<th>Responsible Team</th>
<th>Approved</th>
@ -13,6 +14,7 @@
{% for revenue in revenue_list %}
<tr>
<td>{{ revenue.amount }} DKK</td>
<td>{{ revenue.invoice_date }}</td>
<td>{{ revenue.description }}</td>
<td>{{ revenue.responsible_team.name }} Team</td>
<td>{{ revenue.approval_status }}</td>