Added CashAccountConverter and LedgerAccountConverter and applied them in the URL patterns of the accounting application.
This commit is contained in:
@ -72,13 +72,13 @@ First written: 2020/7/15
|
||||
<div class="dropdown-menu account-picker">
|
||||
<div class="dropdown-header">{% trans "Shortcuts" context "Accounting|Account|" as text %}{{ text|force_escape }}</div>
|
||||
{% for account in shortcut_accounts %}
|
||||
<a class="dropdown-item {% if account.code == current_account.code %} active {% endif %}>" href="{% url "accounting:cash-summary" account.code %}">
|
||||
<a class="dropdown-item {% if account.code == current_account.code %} active {% endif %}>" href="{% url "accounting:cash-summary" account %}">
|
||||
{{ account.title|title }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
<div class="dropdown-header">{% trans "All" context "Accounting|Account|" as text %}{{ text|force_escape }}</div>
|
||||
{% for account in all_accounts %}
|
||||
<a class="dropdown-item {% if account.code == current_account.code %} active {% endif %}>" href="{% url "accounting:cash-summary" account.code %}">
|
||||
<a class="dropdown-item {% if account.code == current_account.code %} active {% endif %}>" href="{% url "accounting:cash-summary" account %}">
|
||||
{{ account.code }} {{ account.title|title }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
@ -111,7 +111,7 @@ First written: 2020/7/15
|
||||
<td class="amount {% if item.cumulative_balance < 0 %} text-danger {% endif %}">{{ item.cumulative_balance|accounting_amount }}</td>
|
||||
<td class="actions">
|
||||
{% if item.month is not None %}
|
||||
<a class="btn btn-info" role="button" href="{% url "accounting:cash" current_account.code item.month|date:"Y-m" %}">
|
||||
<a class="btn btn-info" role="button" href="{% url "accounting:cash" current_account item.month|date:"Y-m" %}">
|
||||
<i class="fas fa-eye"></i>
|
||||
<span class="d-none d-lg-inline">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</span>
|
||||
</a>
|
||||
@ -127,7 +127,7 @@ First written: 2020/7/15
|
||||
{% for item in item_list %}
|
||||
<li class="list-group-item {% if item.balance < 0 %} list-group-item-danger {% endif %}">
|
||||
{% if item.month is not None %}
|
||||
<a class="list-group-item-action d-flex justify-content-between align-items-center" href="{% url "accounting:cash" current_account.code item.month|date:"Y-m" %}">
|
||||
<a class="list-group-item-action d-flex justify-content-between align-items-center" href="{% url "accounting:cash" current_account item.month|date:"Y-m" %}">
|
||||
{{ item.label }}
|
||||
<div>
|
||||
<span class="badge badge-success badge-pill">
|
||||
|
@ -73,13 +73,13 @@ First written: 2020/7/1
|
||||
<div class="dropdown-menu account-picker">
|
||||
<div class="dropdown-header">{% trans "Shortcuts" context "Accounting|Account|" as text %}{{ text|force_escape }}</div>
|
||||
{% for account in shortcut_accounts %}
|
||||
<a class="dropdown-item {% if account.code == current_account.code %} active {% endif %}>" href="{% url "accounting:cash" account.code period %}">
|
||||
<a class="dropdown-item {% if account.code == current_account.code %} active {% endif %}>" href="{% url "accounting:cash" account period %}">
|
||||
{{ account.title|title }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
<div class="dropdown-header">{% trans "All" context "Accounting|Account|" as text %}{{ text|force_escape }}</div>
|
||||
{% for account in all_accounts %}
|
||||
<a class="dropdown-item {% if account.code == current_account.code %} active {% endif %}>" href="{% url "accounting:cash" account.code period %}">
|
||||
<a class="dropdown-item {% if account.code == current_account.code %} active {% endif %}>" href="{% url "accounting:cash" account period %}">
|
||||
{{ account.code }} {{ account.title|title }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
@ -112,7 +112,7 @@ First written: 2020/7/19
|
||||
<td class="amount {% if item.balance < 0 %} text-danger {% endif %}">{{ item.balance|accounting_amount }}</td>
|
||||
<td class="amount"></td>
|
||||
<td class="actions">
|
||||
<a href="{% url "accounting:ledger" item.code period %}" class="btn btn-info" role="button">
|
||||
<a href="{% url "accounting:ledger" item period %}" 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>
|
||||
</a>
|
||||
@ -172,7 +172,7 @@ First written: 2020/7/19
|
||||
</li>
|
||||
{% for item in group.details %}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center account">
|
||||
<a class="list-group-item-action" href="{% url "accounting:ledger" item.code period %}">
|
||||
<a class="list-group-item-action" href="{% url "accounting:ledger" item period %}">
|
||||
{{ item.title|title }}
|
||||
<div class="float-right">
|
||||
<span class="badge {% if item.balance < 0 %} badge-warning {% else %} badge-secondary {% endif %} badge-pill">
|
||||
|
@ -71,7 +71,7 @@ First written: 2020/7/16
|
||||
</button>
|
||||
<div class="dropdown-menu account-picker">
|
||||
{% for account in accounts %}
|
||||
<a class="dropdown-item {% if account.code == current_account.code %} active {% endif %}>" href="{% url "accounting:ledger-summary" account.code %}">
|
||||
<a class="dropdown-item {% if account.code == current_account.code %} active {% endif %}>" href="{% url "accounting:ledger-summary" account %}">
|
||||
{{ account.title|title }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
@ -104,7 +104,7 @@ First written: 2020/7/16
|
||||
<td class="amount {% if item.cumulative_balance < 0 %} text-danger {% endif %}">{{ item.cumulative_balance|accounting_amount }}</td>
|
||||
<td class="actions">
|
||||
{% if item.month is not None %}
|
||||
<a class="btn btn-info" role="button" href="{% url "accounting:ledger" current_account.code item.month|date:"Y-m" %}">
|
||||
<a class="btn btn-info" role="button" href="{% url "accounting:ledger" current_account item.month|date:"Y-m" %}">
|
||||
<i class="fas fa-eye"></i>
|
||||
<span class="d-none d-lg-inline">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</span>
|
||||
</a>
|
||||
@ -120,7 +120,7 @@ First written: 2020/7/16
|
||||
{% for item in item_list %}
|
||||
<li class="list-group-item {% if current_account.code|first in "12" and item.balance < 0 %} list-group-item-danger {% endif %}">
|
||||
{% if item.month is not None %}
|
||||
<a class="list-group-item-action d-flex justify-content-between align-items-center" href="{% url "accounting:ledger" current_account.code item.month|date:"Y-m" %}">
|
||||
<a class="list-group-item-action d-flex justify-content-between align-items-center" href="{% url "accounting:ledger" current_account item.month|date:"Y-m" %}">
|
||||
{{ item.label }}
|
||||
<div>
|
||||
<span class="badge badge-success badge-pill">
|
||||
|
@ -72,7 +72,7 @@ First written: 2020/7/16
|
||||
</button>
|
||||
<div class="dropdown-menu account-picker">
|
||||
{% for account in accounts %}
|
||||
<a class="dropdown-item {% if account.code == current_account.code %} active {% endif %}" href="{% url "accounting:ledger" account.code period %}">
|
||||
<a class="dropdown-item {% if account.code == current_account.code %} active {% endif %}" href="{% url "accounting:ledger" account period %}">
|
||||
{{ account.code }} {{ account.title|title }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
@ -101,7 +101,7 @@ First written: 2020/7/19
|
||||
<td class="amount">{{ item.debit|accounting_amount }}</td>
|
||||
<td class="amount">{{ item.credit|accounting_amount }}</td>
|
||||
<td class="actions">
|
||||
<a href="{% url "accounting:ledger" item.code period %}" class="btn btn-info" role="button">
|
||||
<a href="{% url "accounting:ledger" item period %}" 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>
|
||||
</a>
|
||||
@ -133,7 +133,7 @@ First written: 2020/7/19
|
||||
<ul class="list-group d-lg-none trial-balance-list">
|
||||
{% for item in item_list %}
|
||||
<li class="list-group-item">
|
||||
<a class="list-group-item-action d-flex justify-content-between align-items-center" href="{% url "accounting:ledger" item.code period.spec %}">
|
||||
<a class="list-group-item-action d-flex justify-content-between align-items-center" href="{% url "accounting:ledger" item period.spec %}">
|
||||
{{ item.title }}
|
||||
<div>
|
||||
{% if item.debit is not None %}
|
||||
|
Reference in New Issue
Block a user