add invoice_date to revenue and expense forms and templates
This commit is contained in:
parent
e8edb24233
commit
864a7e6673
|
@ -36,23 +36,23 @@ class CleanInvoiceForm(forms.ModelForm):
|
||||||
class ExpenseCreateForm(CleanInvoiceForm):
|
class ExpenseCreateForm(CleanInvoiceForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Expense
|
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 ExpenseUpdateForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Expense
|
model = Expense
|
||||||
fields = ['description', 'amount', 'paid_by_bornhack', 'responsible_team']
|
fields = ['description', 'amount', 'invoice_date', 'paid_by_bornhack', 'responsible_team']
|
||||||
|
|
||||||
|
|
||||||
class RevenueCreateForm(CleanInvoiceForm):
|
class RevenueCreateForm(CleanInvoiceForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Revenue
|
model = Revenue
|
||||||
fields = ['description', 'amount', 'invoice', 'responsible_team']
|
fields = ['description', 'amount', 'invoice', 'invoice_date', 'responsible_team']
|
||||||
|
|
||||||
|
|
||||||
class RevenueUpdateForm(forms.ModelForm):
|
class RevenueUpdateForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Revenue
|
model = Revenue
|
||||||
fields = ['description', 'amount', 'responsible_team']
|
fields = ['description', 'amount', 'invoice_date', 'responsible_team']
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
<th>Amount</th>
|
<th>Amount</th>
|
||||||
<td>{{ expense.amount }} DKK</td>
|
<td>{{ expense.amount }} DKK</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Invoice Date</th>
|
||||||
|
<td>{{ expense.invoice_date }}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<td>{{ expense.description }}</td>
|
<td>{{ expense.description }}</td>
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<th>Paid by</th>
|
<th>Paid by</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<th>Amount</th>
|
<th>Amount</th>
|
||||||
|
<th>Invoice Date</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th>Responsible Team</th>
|
<th>Responsible Team</th>
|
||||||
{% if not reimbursement %}
|
{% if not reimbursement %}
|
||||||
|
@ -22,6 +23,7 @@
|
||||||
<td>{% if expense.paid_by_bornhack %}BornHack{% else %}{{ expense.user }}{% endif %}</td>
|
<td>{% if expense.paid_by_bornhack %}BornHack{% else %}{{ expense.user }}{% endif %}</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td>{{ expense.amount }} DKK</td>
|
<td>{{ expense.amount }} DKK</td>
|
||||||
|
<td>{{ expense.invoice_date }}</td>
|
||||||
<td>{{ expense.description }}</td>
|
<td>{{ expense.description }}</td>
|
||||||
<td>{{ expense.responsible_team.name }} Team</td>
|
<td>{{ expense.responsible_team.name }} Team</td>
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
<th>Amount</th>
|
<th>Amount</th>
|
||||||
<td>{{ revenue.amount }} DKK</td>
|
<td>{{ revenue.amount }} DKK</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Invoice Date</th>
|
||||||
|
<td>{{ revenue.invoice_date }}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<td>{{ revenue.description }}</td>
|
<td>{{ revenue.description }}</td>
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Amaount</th>
|
<th>Amount</th>
|
||||||
|
<th>Invoice Date</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th>Responsible Team</th>
|
<th>Responsible Team</th>
|
||||||
<th>Approved</th>
|
<th>Approved</th>
|
||||||
|
@ -13,6 +14,7 @@
|
||||||
{% for revenue in revenue_list %}
|
{% for revenue in revenue_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ revenue.amount }} DKK</td>
|
<td>{{ revenue.amount }} DKK</td>
|
||||||
|
<td>{{ revenue.invoice_date }}</td>
|
||||||
<td>{{ revenue.description }}</td>
|
<td>{{ revenue.description }}</td>
|
||||||
<td>{{ revenue.responsible_team.name }} Team</td>
|
<td>{{ revenue.responsible_team.name }} Team</td>
|
||||||
<td>{{ revenue.approval_status }}</td>
|
<td>{{ revenue.approval_status }}</td>
|
||||||
|
|
Loading…
Reference in a new issue