Replaced the use of the sn field with pk, for compatibility in the future.
This commit is contained in:
@ -127,7 +127,7 @@ First written: 2020/7/1
|
||||
<td class="amount">{{ item.debit_amount|accounting_amount }}</td>
|
||||
<td class="amount {% if item.balance < 0 %} text-danger {% endif %}">{{ item.balance|accounting_amount }}</td>
|
||||
<td class="actions">
|
||||
{% if item.sn is not None %}
|
||||
{% if item.pk is not None %}
|
||||
<a href="{% url_with_return "accounting:transactions.show" item.transaction.type item.transaction %}" class="btn btn-info" role="button">
|
||||
<i class="fas fa-eye"></i>
|
||||
<span class="d-none d-lg-inline">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</span>
|
||||
@ -143,7 +143,7 @@ First written: 2020/7/1
|
||||
<ul class="list-group d-md-none">
|
||||
{% for item in item_list %}
|
||||
<li class="list-group-item {% if not item.is_balanced or item.has_order_hole %} list-group-item-danger {% endif %}">
|
||||
{% if item.sn is not None %}
|
||||
{% if item.pk is not None %}
|
||||
<a class="list-group-item-action" href="{% url_with_return "accounting:transactions.show" item.transaction.type item.transaction %}">
|
||||
<div class="date-account-line d-flex justify-content-between align-items-center">
|
||||
{{ item.transaction.date|smart_date }} {{ item.account.title|title }}
|
||||
|
@ -107,7 +107,7 @@ First written: 2020/7/17
|
||||
<td class="amount">{{ item.credit_amount|accounting_amount }}</td>
|
||||
<td>{{ item.transaction.note|default:"" }}</td>
|
||||
<td class="actions">
|
||||
{% if item.sn is not None %}
|
||||
{% if item.pk is not None %}
|
||||
<a href="{% url_with_return "accounting:transactions.show" item.transaction.type item.transaction %}" class="btn btn-info" role="button">
|
||||
<i class="fas fa-eye"></i>
|
||||
{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
@ -123,7 +123,7 @@ First written: 2020/7/17
|
||||
<ul class="list-group d-lg-none">
|
||||
{% for item in item_list %}
|
||||
<li class="list-group-item {% if not item.is_balanced or item.has_order_hole %} list-group-item-danger {% endif %}">
|
||||
{% if item.sn is not None %}
|
||||
{% if item.pk is not None %}
|
||||
<a class="list-group-item-action" href="{% url_with_return "accounting:transactions.show" item.transaction.type item.transaction %}">
|
||||
<div class="{% if item.is_credit %} journal-credit {% else %} journal-debit {% endif %}">
|
||||
<div class="date-account-line">
|
||||
|
@ -130,7 +130,7 @@ First written: 2020/7/16
|
||||
<td class="amount">{{ item.credit_amount|accounting_amount }}</td>
|
||||
<td class="amount {% if item.balance < 0 %} text-danger {% endif %}">{{ item.balance|accounting_amount }}</td>
|
||||
<td class="actions">
|
||||
{% if item.sn is not None %}
|
||||
{% if item.pk is not None %}
|
||||
<a href="{% url_with_return "accounting:transactions.show" item.transaction.type item.transaction %}" class="btn btn-info" role="button">
|
||||
<i class="fas fa-eye"></i>
|
||||
<span class="d-none d-lg-inline">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</span>
|
||||
@ -146,7 +146,7 @@ First written: 2020/7/16
|
||||
<ul class="list-group d-md-none">
|
||||
{% for item in item_list %}
|
||||
<li class="list-group-item {% if not item.is_balanced or item.has_order_hole or not item.is_credit_card_paid %} list-group-item-danger {% endif %}{% if item.is_existing_equipment %} list-group-item-info {% endif %}">
|
||||
{% if item.sn is not None %}
|
||||
{% if item.pk is not None %}
|
||||
<a class="list-group-item-action" href="{% url_with_return "accounting:transactions.show" item.transaction.type item.transaction %}">
|
||||
<div class="date-account-line">
|
||||
{{ item.transaction.date|smart_date }} {{ item.account.title|title }}
|
||||
|
Reference in New Issue
Block a user