Skip to content

Commit

Permalink
Show primary and secondary cost centre, not secondary twice
Browse files Browse the repository at this point in the history
  • Loading branch information
foodelevator committed Jul 8, 2024
1 parent 809fc90 commit 597dfcc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 58 deletions.
40 changes: 11 additions & 29 deletions templates/expenses/show.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,41 +26,23 @@ <h2>Kvittodelar</h2>
<table>
<thead>
<tr>
<th>
Belopp
</th>
<th>
Resultatställe
</th>
<th>
Sekundärt resultatställe
</th>
<th>
Budgetpost
</th>
<th>
Attesterad av
</th>
<th>Belopp</th>
<th>Resultatställe</th>
<th>Sekundärt resultatställe</th>
<th>Budgetpost</th>
<th>Attesterad av</th>
</tr>
</thead>
<tbody>
{% for expense_part in expense.expensepart_set.all %}
<tr>
<td>
<span class="value">{{ expense_part.amount|intcomma }} kr</span>
</td>
<td>
{{ expense_part.secondary_cost_centre }}
</td>
<td>
<span class="value">{{ expense_part.secondary_cost_centre }}</span>
</td>
<td>
<span class="value">{{ expense_part.budget_line }}</span>
</td>
<td>{{ expense_part.amount|intcomma }} kr</td>
<td>{{ expense_part.cost_centre }}</td>
<td>{{ expense_part.secondary_cost_centre }}</td>
<td>{{ expense_part.budget_line }}</td>
<td>
{% if expense_part.attested_by %}
<a class="value" href="{% url 'user-show' expense_part.attested_by.user.username %}">
<a href="{% url 'user-show' expense_part.attested_by.user.username %}">
{{ expense_part.attested_by.user.get_full_name }} ({{ expense_part.attest_date }})
</a>
{% else %}
Expand All @@ -73,7 +55,7 @@ <h2>Kvittodelar</h2>
</form>
</span>
{% else %}
<span class="value">Ej attesterad</span>
Ej attesterad
{% endif %}
{% endif %}
</td>
Expand Down
40 changes: 11 additions & 29 deletions templates/invoices/show.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,41 +35,23 @@ <h2>Fakturadelar</h2>
<table>
<thead>
<tr>
<th>
Belopp
</th>
<th>
Resultatställe
</th>
<th>
Sekundärt resultatställe
</th>
<th>
Budgetpost
</th>
<th>
Attesterad av
</th>
<th>Belopp</th>
<th>Resultatställe</th>
<th>Sekundärt resultatställe</th>
<th>Budgetpost</th>
<th>Attesterad av</th>
</tr>
</thead>
<tbody>
{% for invoice_part in invoice.invoicepart_set.all %}
<tr>
<td>
<span class="value">{{ invoice_part.amount|intcomma }} kr</span>
</td>
<td>
{{ invoice_part.secondary_cost_centre }}
</td>
<td>
<span class="value">{{ invoice_part.secondary_cost_centre }}</span>
</td>
<td>
<span class="value">{{ invoice_part.budget_line }}</span>
</td>
<td>{{ invoice_part.amount|intcomma }} kr</td>
<td>{{ invoice_part.cost_centre }}</td>
<td>{{ invoice_part.secondary_cost_centre }}</td>
<td>{{ invoice_part.budget_line }}</td>
<td>
{% if invoice_part.attested_by %}
<a class="value" href="{% url 'user-show' invoice_part.attested_by.user.username %}">
<a href="{% url 'user-show' invoice_part.attested_by.user.username %}">
{{ invoice_part.attested_by.user.get_full_name }} ({{ invoice_part.attest_date }})
</a>
{% else %}
Expand All @@ -82,7 +64,7 @@ <h2>Fakturadelar</h2>
</form>
</span>
{% else %}
<span class="value">Ej attesterad</span>
Ej attesterad
{% endif %}
{% endif %}
</td>
Expand Down

0 comments on commit 597dfcc

Please sign in to comment.