Removed the transaction type from the template variables of the transactions, because they are not necessary at all in the accounting application.
This commit is contained in:
parent
99fb99b160
commit
760c739864
@ -71,7 +71,7 @@ First written: 2020/7/23
|
||||
<i class="fas fa-chevron-circle-left"></i>
|
||||
{% trans "Back" context "Navigation|" as text %}{{ text|force_escape }}
|
||||
</a>
|
||||
<a class="btn btn-primary" role="button" href="{% url_keep_return "accounting:transactions.edit" transaction_type item %}">
|
||||
<a class="btn btn-primary" role="button" href="{% url_keep_return "accounting:transactions.edit" "expense" item %}">
|
||||
<i class="fas fa-edit"></i>
|
||||
{% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }}
|
||||
</a>
|
||||
|
@ -71,7 +71,7 @@ First written: 2020/7/23
|
||||
<i class="fas fa-chevron-circle-left"></i>
|
||||
{% trans "Back" context "Navigation|" as text %}{{ text|force_escape }}
|
||||
</a>
|
||||
<a class="btn btn-primary" role="button" href="{% url_keep_return "accounting:transactions.edit" transaction_type item %}">
|
||||
<a class="btn btn-primary" role="button" href="{% url_keep_return "accounting:transactions.edit" "income" item %}">
|
||||
<i class="fas fa-edit"></i>
|
||||
{% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }}
|
||||
</a>
|
||||
|
@ -71,7 +71,7 @@ First written: 2020/7/23
|
||||
<i class="fas fa-chevron-circle-left"></i>
|
||||
{% trans "Back" context "Navigation|" as text %}{{ text|force_escape }}
|
||||
</a>
|
||||
<a class="btn btn-primary" role="button" href="{% url_keep_return "accounting:transactions.edit" transaction_type item %}">
|
||||
<a class="btn btn-primary" role="button" href="{% url_keep_return "accounting:transactions.edit" "transfer" item %}">
|
||||
<i class="fas fa-edit"></i>
|
||||
{% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }}
|
||||
</a>
|
||||
|
@ -856,7 +856,6 @@ def transaction_show(request, type, transaction):
|
||||
HttpResponse: The response.
|
||||
"""
|
||||
return render(request, F"accounting/transactions/{type}/show.html", {
|
||||
"transaction_type": type,
|
||||
"item": transaction,
|
||||
})
|
||||
|
||||
@ -879,6 +878,5 @@ def transaction_create(request, type):
|
||||
if len(transaction.credit_records) == 0:
|
||||
transaction.records.append(Record(ord=1, is_credit=True))
|
||||
return render(request, F"accounting/transactions/{type}/edit.html", {
|
||||
"transaction_type": type,
|
||||
"item": transaction,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user