Applied the force_escape filter to the gettext shortcut _("...") in the templates, because it returns SafeString instead of str.

This commit is contained in:
依瑪貓 2020-08-06 23:55:24 +08:00
parent f970974e71
commit f6c6ee7fe4
19 changed files with 225 additions and 225 deletions

View File

@ -93,7 +93,7 @@ First written: 2020/7/20
<td class="actions"> <td class="actions">
<a href="{{ item.url }}" class="btn btn-info" role="button"> <a href="{{ item.url }}" class="btn btn-info" role="button">
<i class="fas fa-eye"></i> <i class="fas fa-eye"></i>
{{ _("View") }} {{ _("View")|force_escape }}
</a> </a>
</td> </td>
</tr> </tr>
@ -124,7 +124,7 @@ First written: 2020/7/20
<td class="actions"> <td class="actions">
<a href="{{ item.url }}" class="btn btn-info" role="button"> <a href="{{ item.url }}" class="btn btn-info" role="button">
<i class="fas fa-eye"></i> <i class="fas fa-eye"></i>
{{ _("View") }} {{ _("View")|force_escape }}
</a> </a>
</td> </td>
</tr> </tr>
@ -133,7 +133,7 @@ First written: 2020/7/20
</tbody> </tbody>
<tfoot> <tfoot>
<tr class="total"> <tr class="total">
<td>{{ _("Total") }}</td> <td>{{ _("Total")|force_escape }}</td>
<td class="amount {% if liabilities.amount < 0 %} text-danger {% endif %}"> <td class="amount {% if liabilities.amount < 0 %} text-danger {% endif %}">
{{ liabilities.amount|accounting_amount }} {{ liabilities.amount|accounting_amount }}
</td> </td>
@ -161,7 +161,7 @@ First written: 2020/7/20
<td class="actions"> <td class="actions">
<a href="{{ item.url }}" class="btn btn-info" role="button"> <a href="{{ item.url }}" class="btn btn-info" role="button">
<i class="fas fa-eye"></i> <i class="fas fa-eye"></i>
{{ _("View") }} {{ _("View")|force_escape }}
</a> </a>
</td> </td>
</tr> </tr>
@ -170,7 +170,7 @@ First written: 2020/7/20
</tbody> </tbody>
<tfoot> <tfoot>
<tr class="total"> <tr class="total">
<td>{{ _("Total") }}</td> <td>{{ _("Total")|force_escape }}</td>
<td class="amount {% if owners_equity.amount < 0 %} text-danger {% endif %}"> <td class="amount {% if owners_equity.amount < 0 %} text-danger {% endif %}">
{{ owners_equity.amount|accounting_amount }} {{ owners_equity.amount|accounting_amount }}
</td> </td>
@ -185,7 +185,7 @@ First written: 2020/7/20
<table class="table table-borderless table-hover table-sm balance-sheet-total-table"> <table class="table table-borderless table-hover table-sm balance-sheet-total-table">
<tfoot> <tfoot>
<tr class="total"> <tr class="total">
<td class="align-middle">{{ _("Total") }}</td> <td class="align-middle">{{ _("Total")|force_escape }}</td>
<td class="text-right align-middle font-italic {% if assets.amount < 0 %} text-danger {% endif %}"> <td class="text-right align-middle font-italic {% if assets.amount < 0 %} text-danger {% endif %}">
{{ assets.amount|accounting_amount }} {{ assets.amount|accounting_amount }}
</td> </td>
@ -198,7 +198,7 @@ First written: 2020/7/20
<table class="table table-borderless table-hover table-sm balance-sheet-total-table"> <table class="table table-borderless table-hover table-sm balance-sheet-total-table">
<tfoot> <tfoot>
<tr class="total"> <tr class="total">
<td class="align-middle">{{ _("Total") }}</td> <td class="align-middle">{{ _("Total")|force_escape }}</td>
<td class="text-right align-middle font-italic {% if liabilities.amount|add:owners_equity.amount < 0 %} text-danger {% endif %}"> <td class="text-right align-middle font-italic {% if liabilities.amount|add:owners_equity.amount < 0 %} text-danger {% endif %}">
{{ liabilities.amount|add:owners_equity.amount|accounting_amount }} {{ liabilities.amount|add:owners_equity.amount|accounting_amount }}
</td> </td>
@ -239,7 +239,7 @@ First written: 2020/7/20
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
<li class="list-group-item d-flex justify-content-between align-items-center grand-total"> <li class="list-group-item d-flex justify-content-between align-items-center grand-total">
{{ _("Total") }} {{ _("Total")|force_escape }}
<span class="badge {% if assets.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill"> <span class="badge {% if assets.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">
{{ assets.amount|accounting_amount }} {{ assets.amount|accounting_amount }}
</span> </span>
@ -270,7 +270,7 @@ First written: 2020/7/20
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
<li class="list-group-item d-flex justify-content-between align-items-center total"> <li class="list-group-item d-flex justify-content-between align-items-center total">
{{ _("Total") }} {{ _("Total")|force_escape }}
<span class="badge {% if liabilities.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill"> <span class="badge {% if liabilities.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">
{{ liabilities.amount|accounting_amount }} {{ liabilities.amount|accounting_amount }}
</span> </span>
@ -299,7 +299,7 @@ First written: 2020/7/20
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
<li class="list-group-item d-flex justify-content-between align-items-center total"> <li class="list-group-item d-flex justify-content-between align-items-center total">
{{ _("Total") }} {{ _("Total")|force_escape }}
<span class="badge {% if owners_equity.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill"> <span class="badge {% if owners_equity.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">
{{ owners_equity.amount|accounting_amount }} {{ owners_equity.amount|accounting_amount }}
</span> </span>
@ -308,7 +308,7 @@ First written: 2020/7/20
<ul class="list-group balance-sheet-list"> <ul class="list-group balance-sheet-list">
<li class="list-group-item d-flex justify-content-between align-items-center grand-total"> <li class="list-group-item d-flex justify-content-between align-items-center grand-total">
{{ _("Total") }} {{ _("Total")|force_escape }}
<span class="badge {% if liabilities.amount|add:owners_equity.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill"> <span class="badge {% if liabilities.amount|add:owners_equity.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">
{{ liabilities.amount|add:owners_equity.amount|accounting_amount }} {{ liabilities.amount|add:owners_equity.amount|accounting_amount }}
</span> </span>

View File

@ -58,16 +58,16 @@ First written: 2020/7/15
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="d-none d-md-inline">{{ account.title|title_case }}</span> <span class="d-none d-md-inline">{{ account.title|title_case }}</span>
<span class="d-md-none">{{ _("Account") }}</span> <span class="d-md-none">{{ _("Account")|force_escape }}</span>
</button> </button>
<div class="dropdown-menu account-picker"> <div class="dropdown-menu account-picker">
<div class="dropdown-header">{{ _("Shortcuts") }}</div> <div class="dropdown-header">{{ _("Shortcuts")|force_escape }}</div>
{% for x in shortcut_accounts %} {% for x in shortcut_accounts %}
<a class="dropdown-item {% if x.code == account.code %} active {% endif %}>" href="{% url "accounting:cash-summary" x %}"> <a class="dropdown-item {% if x.code == account.code %} active {% endif %}>" href="{% url "accounting:cash-summary" x %}">
{{ x.title|title_case }} {{ x.title|title_case }}
</a> </a>
{% endfor %} {% endfor %}
<div class="dropdown-header">{{ _("All") }}</div> <div class="dropdown-header">{{ _("All")|force_escape }}</div>
{% for x in all_accounts %} {% for x in all_accounts %}
<a class="dropdown-item {% if x.code == account.code %} active {% endif %}>" href="{% url "accounting:cash-summary" x %}"> <a class="dropdown-item {% if x.code == account.code %} active {% endif %}>" href="{% url "accounting:cash-summary" x %}">
{{ x.code }} {{ x.title|title_case }} {{ x.code }} {{ x.title|title_case }}
@ -84,12 +84,12 @@ First written: 2020/7/15
<table class="table table-striped table-hover d-none d-sm-table general-journal-table"> <table class="table table-striped table-hover d-none d-sm-table general-journal-table">
<thead> <thead>
<tr> <tr>
<th scope="col">{{ _("Month") }}</th> <th scope="col">{{ _("Month")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Income") }}</th> <th class="amount" scope="col">{{ _("Income")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Expense") }}</th> <th class="amount" scope="col">{{ _("Expense")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Balance") }}</th> <th class="amount" scope="col">{{ _("Balance")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Cumulative Balance") }}</th> <th class="amount" scope="col">{{ _("Cumulative Balance")|force_escape }}</th>
<th class="actions" scope="col">{{ _("View") }}</th> <th class="actions" scope="col">{{ _("View")|force_escape }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -104,7 +104,7 @@ First written: 2020/7/15
{% if item.month is not None %} {% if item.month is not None %}
<a class="btn btn-info" role="button" href="{% url "accounting:cash" account item.month|date:"Y-m" %}"> <a class="btn btn-info" role="button" href="{% url "accounting:cash" account item.month|date:"Y-m" %}">
<i class="fas fa-eye"></i> <i class="fas fa-eye"></i>
<span class="d-none d-lg-inline">{{ _("View") }}</span> <span class="d-none d-lg-inline">{{ _("View")|force_escape }}</span>
</a> </a>
{% endif %} {% endif %}
</td> </td>

View File

@ -39,17 +39,17 @@ First written: 2020/7/1
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<i class="fas fa-edit"></i> <i class="fas fa-edit"></i>
{{ _("New") }} {{ _("New")|force_escape }}
</button> </button>
<div class="dropdown-menu"> <div class="dropdown-menu">
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "expense" %}"> <a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "expense" %}">
{{ _("Cash Expense") }} {{ _("Cash Expense")|force_escape }}
</a> </a>
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "income" %}"> <a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "income" %}">
{{ _("Cash Income") }} {{ _("Cash Income")|force_escape }}
</a> </a>
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "transfer" %}"> <a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "transfer" %}">
{{ _("Transfer") }} {{ _("Transfer")|force_escape }}
</a> </a>
</div> </div>
</div> </div>
@ -59,16 +59,16 @@ First written: 2020/7/1
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="d-none d-md-inline">{{ account.title|title_case }}</span> <span class="d-none d-md-inline">{{ account.title|title_case }}</span>
<span class="d-md-none">{{ _("Account") }}</span> <span class="d-md-none">{{ _("Account")|force_escape }}</span>
</button> </button>
<div class="dropdown-menu account-picker"> <div class="dropdown-menu account-picker">
<div class="dropdown-header">{{ _("Shortcuts") }}</div> <div class="dropdown-header">{{ _("Shortcuts")|force_escape }}</div>
{% for x in shortcut_accounts %} {% for x in shortcut_accounts %}
<a class="dropdown-item {% if x.code == account.code %} active {% endif %}>" href="{% url "accounting:cash" x period %}"> <a class="dropdown-item {% if x.code == account.code %} active {% endif %}>" href="{% url "accounting:cash" x period %}">
{{ x.title|title_case }} {{ x.title|title_case }}
</a> </a>
{% endfor %} {% endfor %}
<div class="dropdown-header">{{ _("All") }}</div> <div class="dropdown-header">{{ _("All")|force_escape }}</div>
{% for x in all_accounts %} {% for x in all_accounts %}
<a class="dropdown-item {% if x.code == account.code %} active {% endif %}>" href="{% url "accounting:cash" x period %}"> <a class="dropdown-item {% if x.code == account.code %} active {% endif %}>" href="{% url "accounting:cash" x period %}">
{{ x.code }} {{ x.title|title_case }} {{ x.code }} {{ x.title|title_case }}
@ -92,13 +92,13 @@ First written: 2020/7/1
<table class="table table-striped table-hover d-none d-md-table general-journal-table"> <table class="table table-striped table-hover d-none d-md-table general-journal-table">
<thead> <thead>
<tr> <tr>
<th scope="col">{{ _("Date") }}</th> <th scope="col">{{ _("Date")|force_escape }}</th>
<th scope="col">{{ _("Account") }}</th> <th scope="col">{{ _("Account")|force_escape }}</th>
<th scope="col">{{ _("Summary") }}</th> <th scope="col">{{ _("Summary")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Income") }}</th> <th class="amount" scope="col">{{ _("Income")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Expense") }}</th> <th class="amount" scope="col">{{ _("Expense")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Balance") }}</th> <th class="amount" scope="col">{{ _("Balance")|force_escape }}</th>
<th class="actions" scope="col">{{ _("View") }}</th> <th class="actions" scope="col">{{ _("View")|force_escape }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -108,11 +108,11 @@ First written: 2020/7/1
<td>{{ item.account.title|title_case }}</td> <td>{{ item.account.title|title_case }}</td>
<td>{{ item.summary|default:"" }}{% if not item.is_balanced %} <td>{{ item.summary|default:"" }}{% if not item.is_balanced %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Unbalanced") }} {{ _("Unbalanced")|force_escape }}
</span> </span>
{% endif %}{% if item.has_order_hole %} {% endif %}{% if item.has_order_hole %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Need Reorder") }} {{ _("Need Reorder")|force_escape }}
</span> </span>
{% endif %}</td> {% endif %}</td>
<td class="amount">{{ item.credit_amount|accounting_amount }}</td> <td class="amount">{{ item.credit_amount|accounting_amount }}</td>
@ -122,7 +122,7 @@ First written: 2020/7/1
{% if item.pk 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"> <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> <i class="fas fa-eye"></i>
<span class="d-none d-lg-inline">{{ _("View") }}</span> <span class="d-none d-lg-inline">{{ _("View")|force_escape }}</span>
</a> </a>
{% endif %} {% endif %}
</td> </td>
@ -145,12 +145,12 @@ First written: 2020/7/1
{{ item.summary|default:"" }} {{ item.summary|default:"" }}
{% if not item.is_balanced %} {% if not item.is_balanced %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Unbalanced") }} {{ _("Unbalanced")|force_escape }}
</span> </span>
{% endif %} {% endif %}
{% if item.has_order_hole %} {% if item.has_order_hole %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Need Reorder") }} {{ _("Need Reorder")|force_escape }}
</span> </span>
{% endif %} {% endif %}
</div> </div>

View File

@ -30,21 +30,21 @@ First written: 2020/7/9
<!-- Modal Header --> <!-- Modal Header -->
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title">{{ _("Search Accounting Records") }}</h4> <h4 class="modal-title">{{ _("Search Accounting Records")|force_escape }}</h4>
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
</div> </div>
<!-- Modal body --> <!-- Modal body -->
<div class="modal-body"> <div class="modal-body">
<label for="accounting-query">{{ _("Search:") }}</label> <label for="accounting-query">{{ _("Search:")|force_escape }}</label>
<input id="accounting-query" type="text" name="q" value="{% if request.resolver_match.url_name == "search" %}{{ request.GET.q }}{% endif %}" placeholder="{{ _("e.g. Coffee") }}" required="required" /> <input id="accounting-query" type="text" name="q" value="{% if request.resolver_match.url_name == "search" %}{{ request.GET.q }}{% endif %}" placeholder="{{ _("e.g. Coffee")|force_escape }}" required="required" />
</div> </div>
<!-- Modal footer --> <!-- Modal footer -->
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-primary" type="submit"> <button class="btn btn-primary" type="submit">
<i class="fas fa-search"></i> <i class="fas fa-search"></i>
{{ _("Search") }} {{ _("Search")|force_escape }}
</button> </button>
</div> </div>
</div> </div>
@ -59,48 +59,48 @@ First written: 2020/7/9
<i class="{{ current_report_icon }}"></i> <i class="{{ current_report_icon }}"></i>
{{ current_report_title }} {{ current_report_title }}
</span> </span>
<span class="d-md-none">{{ _("Book") }}</span> <span class="d-md-none">{{ _("Book")|force_escape }}</span>
</button> </button>
<div class="dropdown-menu account-picker"> <div class="dropdown-menu account-picker">
<a class="dropdown-item {% if request.resolver_match.url_name == "cash" %} active {% endif %}" href="{{ reports.cash }}"> <a class="dropdown-item {% if request.resolver_match.url_name == "cash" %} active {% endif %}" href="{{ reports.cash }}">
<i class="fas fa-money-bill-wave"></i> <i class="fas fa-money-bill-wave"></i>
{{ _("Cash Account") }} {{ _("Cash Account")|force_escape }}
</a> </a>
<a class="dropdown-item {% if request.resolver_match.url_name == "cash-summary" %} active {% endif %}" href="{{ reports.cash_summary }}"> <a class="dropdown-item {% if request.resolver_match.url_name == "cash-summary" %} active {% endif %}" href="{{ reports.cash_summary }}">
<i class="fas fa-money-bill-wave"></i> <i class="fas fa-money-bill-wave"></i>
{{ _("Cash Summary") }} {{ _("Cash Summary")|force_escape }}
</a> </a>
<a class="dropdown-item {% if request.resolver_match.url_name == "ledger" %} active {% endif %}" href="{{ reports.ledger }}"> <a class="dropdown-item {% if request.resolver_match.url_name == "ledger" %} active {% endif %}" href="{{ reports.ledger }}">
<i class="fas fa-file-invoice-dollar"></i> <i class="fas fa-file-invoice-dollar"></i>
{{ _("Ledger") }} {{ _("Ledger")|force_escape }}
</a> </a>
<a class="dropdown-item {% if request.resolver_match.url_name == "ledger-summary" %} active {% endif %}" href="{{ reports.ledger_summary }}"> <a class="dropdown-item {% if request.resolver_match.url_name == "ledger-summary" %} active {% endif %}" href="{{ reports.ledger_summary }}">
<i class="fas fa-file-invoice-dollar"></i> <i class="fas fa-file-invoice-dollar"></i>
{{ _("Ledger Summary") }} {{ _("Ledger Summary")|force_escape }}
</a> </a>
<a class="dropdown-item {% if request.resolver_match.url_name == "journal" %} active {% endif %}" href="{{ reports.journal }}"> <a class="dropdown-item {% if request.resolver_match.url_name == "journal" %} active {% endif %}" href="{{ reports.journal }}">
<i class="fas fa-book"></i> <i class="fas fa-book"></i>
{{ _("Journal") }} {{ _("Journal")|force_escape }}
</a> </a>
<a class="dropdown-item {% if request.resolver_match.url_name == "trial-balance" %} active {% endif %}" href="{{ reports.trial_balance }}"> <a class="dropdown-item {% if request.resolver_match.url_name == "trial-balance" %} active {% endif %}" href="{{ reports.trial_balance }}">
<i class="fas fa-balance-scale-right"></i> <i class="fas fa-balance-scale-right"></i>
{{ _("Trial Balance") }} {{ _("Trial Balance")|force_escape }}
</a> </a>
<a class="dropdown-item {% if request.resolver_match.url_name == "income-statement" %} active {% endif %}" href="{{ reports.income_statement }}"> <a class="dropdown-item {% if request.resolver_match.url_name == "income-statement" %} active {% endif %}" href="{{ reports.income_statement }}">
<i class="fas fa-file-invoice"></i> <i class="fas fa-file-invoice"></i>
{{ _("Income Statement") }} {{ _("Income Statement")|force_escape }}
</a> </a>
<a class="dropdown-item {% if request.resolver_match.url_name == "balance-sheet" %} active {% endif %}" href="{{ reports.balance_sheet }}"> <a class="dropdown-item {% if request.resolver_match.url_name == "balance-sheet" %} active {% endif %}" href="{{ reports.balance_sheet }}">
<i class="fas fa-balance-scale"></i> <i class="fas fa-balance-scale"></i>
{{ _("Balance Sheet") }} {{ _("Balance Sheet")|force_escape }}
</a> </a>
<span class="dropdown-item dropdown-search {% if request.resolver_match.url_name == "search" %} active {% endif %}" data-toggle="modal" data-target="#accounting-search-modal"> <span class="dropdown-item dropdown-search {% if request.resolver_match.url_name == "search" %} active {% endif %}" data-toggle="modal" data-target="#accounting-search-modal">
<i class="fas fa-search"></i> <i class="fas fa-search"></i>
{{ _("Search") }} {{ _("Search")|force_escape }}
</span> </span>
<a class="dropdown-item {% if request.resolver_match.url_name == "accounts" %} active {% endif %}" href="{% url "accounting:accounts" %}"> <a class="dropdown-item {% if request.resolver_match.url_name == "accounts" %} active {% endif %}" href="{% url "accounting:accounts" %}">
<i class="fas fa-list-ol"></i> <i class="fas fa-list-ol"></i>
{{ _("Accounts") }} {{ _("Accounts")|force_escape }}
</a> </a>
</div> </div>
</div> </div>

View File

@ -34,7 +34,7 @@ First written: 2020/4/3
<h4 class="modal-title"> <h4 class="modal-title">
<label for="summary-summary"> <label for="summary-summary">
<i class="fas fa-edit"></i> <i class="fas fa-edit"></i>
{{ _("Summary") }} {{ _("Summary")|force_escape }}
</label> </label>
</h4> </h4>
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
@ -47,26 +47,26 @@ First written: 2020/4/3
</div> </div>
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="nav-item"> <li class="nav-item">
<span id="summary-tab-category" class="summary-tab nav-link active">{{ _("General") }}</span> <span id="summary-tab-category" class="summary-tab nav-link active">{{ _("General")|force_escape }}</span>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<span id="summary-tab-travel" class="summary-tab nav-link">{{ _("Travel") }}</span> <span id="summary-tab-travel" class="summary-tab nav-link">{{ _("Travel")|force_escape }}</span>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<span id="summary-tab-bus" class="summary-tab nav-link">{{ _("Bus") }}</span> <span id="summary-tab-bus" class="summary-tab nav-link">{{ _("Bus")|force_escape }}</span>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<span id="summary-tab-regular" class="summary-tab nav-link">{{ _("Regular") }}</span> <span id="summary-tab-regular" class="summary-tab nav-link">{{ _("Regular")|force_escape }}</span>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<span id="summary-tab-count" class="summary-tab nav-link">{{ _("Count") }}</span> <span id="summary-tab-count" class="summary-tab nav-link">{{ _("Count")|force_escape }}</span>
</li> </li>
</ul> </ul>
<!-- A general category --> <!-- A general category -->
<div id="summary-tab-content-category" class="summary-tab-content"> <div id="summary-tab-content-category" class="summary-tab-content">
<div class="row"> <div class="row">
<label class="col-sm-2 col-form-label" for="summary-general-category">{{ _("Category:") }}</label> <label class="col-sm-2 col-form-label" for="summary-general-category">{{ _("Category:")|force_escape }}</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="summary-general-category" class="form-control summary-helper-input" type="text" value="" /> <input id="summary-general-category" class="form-control summary-helper-input" type="text" value="" />
<div id="summary-general-categories-known" class="summary-categories-known"></div> <div id="summary-general-categories-known" class="summary-categories-known"></div>
@ -77,20 +77,20 @@ First written: 2020/4/3
<!-- A general travel route --> <!-- A general travel route -->
<div id="summary-tab-content-travel" class="summary-tab-content d-none"> <div id="summary-tab-content-travel" class="summary-tab-content d-none">
<div class="row"> <div class="row">
<label class="col-sm-2 col-form-label" for="summary-travel-category">{{ _("Category:") }}</label> <label class="col-sm-2 col-form-label" for="summary-travel-category">{{ _("Category:")|force_escape }}</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="summary-travel-category" class="form-control summary-helper-input summary-travel-part" type="text" value="" /> <input id="summary-travel-category" class="form-control summary-helper-input summary-travel-part" type="text" value="" />
<div id="summary-travel-categories-known" class="summary-categories-known"></div> <div id="summary-travel-categories-known" class="summary-categories-known"></div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-sm-2 col-form-label" for="summary-travel-from">{{ _("From:") }}</label> <label class="col-sm-2 col-form-label" for="summary-travel-from">{{ _("From:")|force_escape }}</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="summary-travel-from" class="form-control summary-helper-input summary-travel-part" type="text" value="" /> <input id="summary-travel-from" class="form-control summary-helper-input summary-travel-part" type="text" value="" />
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-sm-2 col-form-label" for="summary-travel-direction">{{ _("Direction:") }}</label> <label class="col-sm-2 col-form-label" for="summary-travel-direction">{{ _("Direction:")|force_escape }}</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="summary-travel-direction" class="summary-helper-input" type="hidden" value="" /> <input id="summary-travel-direction" class="summary-helper-input" type="hidden" value="" />
<span id="btn-summary-one-way" class="btn btn-outline-primary btn-summary-helper btn-summary-travel-direction"><%="→"%></span> <span id="btn-summary-one-way" class="btn btn-outline-primary btn-summary-helper btn-summary-travel-direction"><%="→"%></span>
@ -98,7 +98,7 @@ First written: 2020/4/3
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-sm-2 col-form-label" for="summary-travel-to">{{ _("To:") }}</label> <label class="col-sm-2 col-form-label" for="summary-travel-to">{{ _("To:")|force_escape }}</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="summary-travel-to" class="form-control summary-helper-input summary-travel-part" type="text" value="" /> <input id="summary-travel-to" class="form-control summary-helper-input summary-travel-part" type="text" value="" />
</div> </div>
@ -108,26 +108,26 @@ First written: 2020/4/3
<!-- A bus route --> <!-- A bus route -->
<div id="summary-tab-content-bus" class="summary-tab-content d-none"> <div id="summary-tab-content-bus" class="summary-tab-content d-none">
<div class="row"> <div class="row">
<label class="col-sm-2 col-form-label" for="summary-bus-category">{{ _("Category:") }}</label> <label class="col-sm-2 col-form-label" for="summary-bus-category">{{ _("Category:")|force_escape }}</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="summary-bus-category" class="form-control summary-helper-input summary-bus-part" type="text" value="" /> <input id="summary-bus-category" class="form-control summary-helper-input summary-bus-part" type="text" value="" />
<div id="summary-bus-categories-known" class="summary-categories-known"></div> <div id="summary-bus-categories-known" class="summary-categories-known"></div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-sm-2 col-form-label" for="summary-bus-route">{{ _("Route:") }}</label> <label class="col-sm-2 col-form-label" for="summary-bus-route">{{ _("Route:")|force_escape }}</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="summary-bus-route" class="form-control summary-helper-input summary-bus-part" type="text" value="" /> <input id="summary-bus-route" class="form-control summary-helper-input summary-bus-part" type="text" value="" />
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-sm-2 col-form-label" for="summary-bus-from">{{ _("From:") }}</label> <label class="col-sm-2 col-form-label" for="summary-bus-from">{{ _("From:")|force_escape }}</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="summary-bus-from" class="form-control summary-helper-input summary-bus-part" type="text" value="" /> <input id="summary-bus-from" class="form-control summary-helper-input summary-bus-part" type="text" value="" />
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-sm-2 col-form-label" for="summary-bus-to">{{ _("To:") }}</label> <label class="col-sm-2 col-form-label" for="summary-bus-to">{{ _("To:")|force_escape }}</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="summary-bus-to" class="form-control summary-helper-input summary-bus-part" type="text" value="" /> <input id="summary-bus-to" class="form-control summary-helper-input summary-bus-part" type="text" value="" />
</div> </div>
@ -145,7 +145,7 @@ First written: 2020/4/3
<div id="summary-tab-content-count" class="summary-tab-content d-none"> <div id="summary-tab-content-count" class="summary-tab-content d-none">
<div class="row"> <div class="row">
<label class="col-sm-2 col-form-label" for="summary-count">{{ _("Count:") }}</label> <label class="col-sm-2 col-form-label" for="summary-count">{{ _("Count:")|force_escape }}</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="summary-count" class="form-control summary-helper-input" type="number" min="1" value="" /> <input id="summary-count" class="form-control summary-helper-input" type="number" min="1" value="" />
</div> </div>
@ -155,8 +155,8 @@ First written: 2020/4/3
<!-- Modal footer --> <!-- Modal footer -->
<div class="modal-footer"> <div class="modal-footer">
<button id="summary-confirm" class="btn btn-danger" type="submit" data-dismiss="modal">{{ _("Confirm") }}</button> <button id="summary-confirm" class="btn btn-danger" type="submit" data-dismiss="modal">{{ _("Confirm")|force_escape }}</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ _("Cancel") }}</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">{{ _("Cancel")|force_escape }}</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -77,7 +77,7 @@ First written: 2020/7/19
<thead> <thead>
<tr> <tr>
<th scope="col"></th> <th scope="col"></th>
<th class="amount" colspan="2" scope="col">{{ _("Amount") }}</th> <th class="amount" colspan="2" scope="col">{{ _("Amount")|force_escape }}</th>
<th scope="col"></th> <th scope="col"></th>
</tr> </tr>
</thead> </thead>
@ -105,13 +105,13 @@ First written: 2020/7/19
<td class="actions"> <td class="actions">
<a href="{% url "accounting:ledger" item 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> <i class="fas fa-eye"></i>
<span class="d-none d-lg-inline">{{ _("View") }}</span> <span class="d-none d-lg-inline">{{ _("View")|force_escape }}</span>
</a> </a>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
<tr class="total"> <tr class="total">
<td><div>{{ _("Total") }}</div></td> <td><div>{{ _("Total")|force_escape }}</div></td>
<td class="amount"></td> <td class="amount"></td>
<td class="amount {% if group.amount < 0 %} text-danger {% endif %}">{{ group.amount|accounting_amount }}</td> <td class="amount {% if group.amount < 0 %} text-danger {% endif %}">{{ group.amount|accounting_amount }}</td>
<td class="actions"></td> <td class="actions"></td>
@ -119,7 +119,7 @@ First written: 2020/7/19
{% endfor %} {% endfor %}
{% else %} {% else %}
<tr class="total"> <tr class="total">
<td><div>{{ _("Total") }}</div></td> <td><div>{{ _("Total")|force_escape }}</div></td>
<td class="amount"></td> <td class="amount"></td>
<td class="amount">-</td> <td class="amount">-</td>
<td class="actions"></td> <td class="actions"></td>
@ -174,7 +174,7 @@ First written: 2020/7/19
</li> </li>
{% endfor %} {% endfor %}
<li class="list-group-item d-flex justify-content-between align-items-center total"> <li class="list-group-item d-flex justify-content-between align-items-center total">
{{ _("Total") }} {{ _("Total")|force_escape }}
<div class="float-right"> <div class="float-right">
<span class="badge {% if group.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill"> <span class="badge {% if group.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">
{{ group.amount|accounting_amount }} {{ group.amount|accounting_amount }}
@ -184,7 +184,7 @@ First written: 2020/7/19
{% endfor %} {% endfor %}
{% else %} {% else %}
<li class="list-group-item d-flex justify-content-between align-items-center total"> <li class="list-group-item d-flex justify-content-between align-items-center total">
{{ _("Total") }} {{ _("Total")|force_escape }}
<div class="float-right"> <div class="float-right">
<span class="badge {% if group.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">-</span> <span class="badge {% if group.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">-</span>
</div> </div>

View File

@ -72,13 +72,13 @@ First written: 2020/7/17
<table class="table table-striped table-hover d-none d-lg-table general-journal-table"> <table class="table table-striped table-hover d-none d-lg-table general-journal-table">
<thead> <thead>
<tr> <tr>
<th scope="col">{{ _("Date") }}</th> <th scope="col">{{ _("Date")|force_escape }}</th>
<th scope="col">{{ _("Account") }}</th> <th scope="col">{{ _("Account")|force_escape }}</th>
<th scope="col">{{ _("Summary") }}</th> <th scope="col">{{ _("Summary")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Debit") }}</th> <th class="amount" scope="col">{{ _("Debit")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Credit") }}</th> <th class="amount" scope="col">{{ _("Credit")|force_escape }}</th>
<th scope="col">{{ _("Notes") }}</th> <th scope="col">{{ _("Notes")|force_escape }}</th>
<th class="actions" scope="col">{{ _("View") }}</th> <th class="actions" scope="col">{{ _("View")|force_escape }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -88,11 +88,11 @@ First written: 2020/7/17
<td>{{ item.account.title|title_case }}</td> <td>{{ item.account.title|title_case }}</td>
<td><div class="{% if item.is_credit %} journal-credit {% else %} journal-debit {% endif %}">{{ item.summary|default:"" }}{% if not item.is_balanced %} <td><div class="{% if item.is_credit %} journal-credit {% else %} journal-debit {% endif %}">{{ item.summary|default:"" }}{% if not item.is_balanced %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Unbalanced") }} {{ _("Unbalanced")|force_escape }}
</span> </span>
{% endif %}{% if item.has_order_hole %} {% endif %}{% if item.has_order_hole %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Need Reorder") }} {{ _("Need Reorder")|force_escape }}
</span> </span>
{% endif %}</div></td> {% endif %}</div></td>
<td class="amount">{{ item.debit_amount|accounting_amount }}</td> <td class="amount">{{ item.debit_amount|accounting_amount }}</td>
@ -102,7 +102,7 @@ First written: 2020/7/17
{% if item.pk 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"> <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> <i class="fas fa-eye"></i>
{{ _("View") }} {{ _("View")|force_escape }}
</a> </a>
{% endif %} {% endif %}
</td> </td>
@ -126,12 +126,12 @@ First written: 2020/7/17
{{ item.summary|default:"" }} {{ item.summary|default:"" }}
{% if not item.is_balanced %} {% if not item.is_balanced %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Unbalanced") }} {{ _("Unbalanced")|force_escape }}
</span> </span>
{% endif %} {% endif %}
{% if item.has_order_hole %} {% if item.has_order_hole %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Need Reorder") }} {{ _("Need Reorder")|force_escape }}
</span> </span>
{% endif %} {% endif %}
</div> </div>
@ -161,7 +161,7 @@ First written: 2020/7/17
{{ item.summary|default:"" }} {{ item.summary|default:"" }}
{% if not item.is_balanced %} {% if not item.is_balanced %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Unbalanced") }} {{ _("Unbalanced")|force_escape }}
</span> </span>
{% endif %} {% endif %}
</div> </div>

View File

@ -58,7 +58,7 @@ First written: 2020/7/16
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="d-none d-md-inline">{{ account.title|title_case }}</span> <span class="d-none d-md-inline">{{ account.title|title_case }}</span>
<span class="d-md-none">{{ _("Account") }}</span> <span class="d-md-none">{{ _("Account")|force_escape }}</span>
</button> </button>
<div class="dropdown-menu account-picker"> <div class="dropdown-menu account-picker">
{% for x in accounts %} {% for x in accounts %}
@ -77,12 +77,12 @@ First written: 2020/7/16
<table class="table table-striped table-hover d-none d-sm-table general-journal-table"> <table class="table table-striped table-hover d-none d-sm-table general-journal-table">
<thead> <thead>
<tr> <tr>
<th scope="col">{{ _("Month") }}</th> <th scope="col">{{ _("Month")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Debit") }}</th> <th class="amount" scope="col">{{ _("Debit")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Credit") }}</th> <th class="amount" scope="col">{{ _("Credit")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Balance") }}</th> <th class="amount" scope="col">{{ _("Balance")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Cumulative Balance") }}</th> <th class="amount" scope="col">{{ _("Cumulative Balance")|force_escape }}</th>
<th class="actions" scope="col">{{ _("View") }}</th> <th class="actions" scope="col">{{ _("View")|force_escape }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -97,7 +97,7 @@ First written: 2020/7/16
{% if item.month is not None %} {% if item.month is not None %}
<a class="btn btn-info" role="button" href="{% url "accounting:ledger" account item.month|date:"Y-m" %}"> <a class="btn btn-info" role="button" href="{% url "accounting:ledger" account item.month|date:"Y-m" %}">
<i class="fas fa-eye"></i> <i class="fas fa-eye"></i>
<span class="d-none d-lg-inline">{{ _("View") }}</span> <span class="d-none d-lg-inline">{{ _("View")|force_escape }}</span>
</a> </a>
{% endif %} {% endif %}
</td> </td>

View File

@ -59,7 +59,7 @@ First written: 2020/7/16
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="d-none d-md-inline">{{ account.title|title_case }}</span> <span class="d-none d-md-inline">{{ account.title|title_case }}</span>
<span class="d-md-none">{{ _("Account") }}</span> <span class="d-md-none">{{ _("Account")|force_escape }}</span>
</button> </button>
<div class="dropdown-menu account-picker"> <div class="dropdown-menu account-picker">
{% for x in accounts %} {% for x in accounts %}
@ -85,13 +85,13 @@ First written: 2020/7/16
<table class="table table-striped table-hover d-none d-md-table general-journal-table"> <table class="table table-striped table-hover d-none d-md-table general-journal-table">
<thead> <thead>
<tr> <tr>
<th scope="col">{{ _("Date") }}</th> <th scope="col">{{ _("Date")|force_escape }}</th>
<th scope="col">{{ _("Account") }}</th> <th scope="col">{{ _("Account")|force_escape }}</th>
<th scope="col">{{ _("Summary") }}</th> <th scope="col">{{ _("Summary")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Debit") }}</th> <th class="amount" scope="col">{{ _("Debit")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Credit") }}</th> <th class="amount" scope="col">{{ _("Credit")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Balance") }}</th> <th class="amount" scope="col">{{ _("Balance")|force_escape }}</th>
<th class="actions" scope="col">{{ _("View") }}</th> <th class="actions" scope="col">{{ _("View")|force_escape }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -101,19 +101,19 @@ First written: 2020/7/16
<td>{{ item.account.title|title_case }}</td> <td>{{ item.account.title|title_case }}</td>
<td>{{ item.summary|default:"" }}{% if not item.is_balanced %} <td>{{ item.summary|default:"" }}{% if not item.is_balanced %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Unbalanced") }} {{ _("Unbalanced")|force_escape }}
</span> </span>
{% endif %}{% if item.has_order_hole %} {% endif %}{% if item.has_order_hole %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Need Reorder") }} {{ _("Need Reorder")|force_escape }}
</span> </span>
{% endif %}{% if not item.is_credit_card_paid %} {% endif %}{% if not item.is_credit_card_paid %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Unpaid") }} {{ _("Unpaid")|force_escape }}
</span> </span>
{% endif %}{% if item.is_existing_equipment %} {% endif %}{% if item.is_existing_equipment %}
<span class="badge badge-info badge-pill"> <span class="badge badge-info badge-pill">
{{ _("Existing") }} {{ _("Existing")|force_escape }}
</span> </span>
{% endif %}</td> {% endif %}</td>
<td class="amount">{{ item.debit_amount|accounting_amount }}</td> <td class="amount">{{ item.debit_amount|accounting_amount }}</td>
@ -123,7 +123,7 @@ First written: 2020/7/16
{% if item.pk 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"> <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> <i class="fas fa-eye"></i>
<span class="d-none d-lg-inline">{{ _("View") }}</span> <span class="d-none d-lg-inline">{{ _("View")|force_escape }}</span>
</a> </a>
{% endif %} {% endif %}
</td> </td>
@ -146,22 +146,22 @@ First written: 2020/7/16
{{ item.summary|default:"" }} {{ item.summary|default:"" }}
{% if not item.is_balanced %} {% if not item.is_balanced %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Unbalanced") }} {{ _("Unbalanced")|force_escape }}
</span> </span>
{% endif %} {% endif %}
{% if item.has_order_hole %} {% if item.has_order_hole %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Need Reorder") }} {{ _("Need Reorder")|force_escape }}
</span> </span>
{% endif %} {% endif %}
{% if not item.is_credit_card_paid %} {% if not item.is_credit_card_paid %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Unpaid") }} {{ _("Unpaid")|force_escape }}
</span> </span>
{% endif %} {% endif %}
{% if item.is_existing_equipment %} {% if item.is_existing_equipment %}
<span class="badge badge-info badge-pill"> <span class="badge badge-info badge-pill">
{{ _("Existing") }} {{ _("Existing")|force_escape }}
</span> </span>
{% endif %} {% endif %}
</div> </div>

View File

@ -61,7 +61,7 @@ First written: 2020/7/21
<label for="search-input" class="search-label"> <label for="search-input" class="search-label">
<button type="submit"> <button type="submit">
<i class="fas fa-search"></i> <i class="fas fa-search"></i>
{{ _("Search") }} {{ _("Search")|force_escape }}
</button> </button>
</label> </label>
</form> </form>
@ -74,13 +74,13 @@ First written: 2020/7/21
<table class="table table-striped table-hover d-none d-md-table general-journal-table"> <table class="table table-striped table-hover d-none d-md-table general-journal-table">
<thead> <thead>
<tr> <tr>
<th scope="col">{{ _("Date") }}</th> <th scope="col">{{ _("Date")|force_escape }}</th>
<th scope="col">{{ _("Account") }}</th> <th scope="col">{{ _("Account")|force_escape }}</th>
<th scope="col">{{ _("Summary") }}</th> <th scope="col">{{ _("Summary")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Debit") }}</th> <th class="amount" scope="col">{{ _("Debit")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Credit") }}</th> <th class="amount" scope="col">{{ _("Credit")|force_escape }}</th>
<th scope="col">{{ _("Notes") }}</th> <th scope="col">{{ _("Notes")|force_escape }}</th>
<th class="actions" scope="col">{{ _("View") }}</th> <th class="actions" scope="col">{{ _("View")|force_escape }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -90,11 +90,11 @@ First written: 2020/7/21
<td>{{ item.account.title|title_case }}</td> <td>{{ item.account.title|title_case }}</td>
<td><div class="{% if item.is_credit %} journal-credit {% else %} journal-debit {% endif %}">{{ item.summary|default:"" }}{% if not item.is_balanced %} <td><div class="{% if item.is_credit %} journal-credit {% else %} journal-debit {% endif %}">{{ item.summary|default:"" }}{% if not item.is_balanced %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Unbalanced") }} {{ _("Unbalanced")|force_escape }}
</span> </span>
{% endif %}{% if item.has_order_hole %} {% endif %}{% if item.has_order_hole %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Need Reorder") }} {{ _("Need Reorder")|force_escape }}
</span> </span>
{% endif %}</div></td> {% endif %}</div></td>
<td class="amount">{{ item.debit_amount|accounting_amount }}</td> <td class="amount">{{ item.debit_amount|accounting_amount }}</td>
@ -103,7 +103,7 @@ First written: 2020/7/21
<td class="actions"> <td class="actions">
<a href="{% url_with_return "accounting:transactions.show" item.transaction.type item.transaction %}" class="btn btn-info" role="button"> <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> <i class="fas fa-eye"></i>
{{ _("View") }} {{ _("View")|force_escape }}
</a> </a>
</td> </td>
</tr> </tr>
@ -125,12 +125,12 @@ First written: 2020/7/21
{{ item.summary|default:"" }} {{ item.summary|default:"" }}
{% if not item.is_balanced %} {% if not item.is_balanced %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Unbalanced") }} {{ _("Unbalanced")|force_escape }}
</span> </span>
{% endif %} {% endif %}
{% if item.has_order_hole %} {% if item.has_order_hole %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Need Reorder") }} {{ _("Need Reorder")|force_escape }}
</span> </span>
{% endif %} {% endif %}
</div> </div>

View File

@ -52,7 +52,7 @@ First written: 2020/7/23
{% csrf_token %} {% csrf_token %}
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2"> <div class="col-sm-2">
<label for="txn-date">{{ _("Date:") }}</label> <label for="txn-date">{{ _("Date:")|force_escape }}</label>
</div> </div>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="txn-date" class="form-control {% if should_validate and item.date.errors %} is-invalid {% endif %}" type="date" name="date" value="{{ item.date.value }}" required="required" /> <input id="txn-date" class="form-control {% if should_validate and item.date.errors %} is-invalid {% endif %}" type="date" name="date" value="{{ item.date.value }}" required="required" />
@ -77,7 +77,7 @@ First written: 2020/7/23
</li> </li>
<li class="list-group-item"> <li class="list-group-item">
<div class="d-flex justify-content-between align-items-center"> <div class="d-flex justify-content-between align-items-center">
{{ _("Total") }} {{ _("Total")|force_escape }}
<span id="debit-total" class="amount">{{ item.debit_total }}</span> <span id="debit-total" class="amount">{{ item.debit_total }}</span>
</div> </div>
</li> </li>
@ -87,7 +87,7 @@ First written: 2020/7/23
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2"> <div class="col-sm-2">
<label for="txn-note">{{ _("Notes:") }}</label> <label for="txn-note">{{ _("Notes:")|force_escape }}</label>
</div> </div>
<div class="col-sm-10"> <div class="col-sm-10">
<textarea id="txn-note" class="form-control {% if should_validate and item.notes.errors %} is-invalid {% endif %}" name="notes">{{ item.notes.value|default:"" }}</textarea> <textarea id="txn-note" class="form-control {% if should_validate and item.notes.errors %} is-invalid {% endif %}" name="notes">{{ item.notes.value|default:"" }}</textarea>
@ -99,7 +99,7 @@ First written: 2020/7/23
<div class="col-sm-12"> <div class="col-sm-12">
<button class="btn btn-primary" type="submit"> <button class="btn btn-primary" type="submit">
<i class="fas fa-save"></i> <i class="fas fa-save"></i>
{{ _("Save") }} {{ _("Save")|force_escape }}
</button> </button>
</div> </div>
</div> </div>

View File

@ -35,7 +35,7 @@ First written: 2020/7/23
{% if item.has_order_hole %} {% if item.has_order_hole %}
<div class="alert alert-danger alert-dismissible fade show"> <div class="alert alert-danger alert-dismissible fade show">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>{{ _("Error:") }}</strong> {{ _("The transactions on this day are not well-ordered. Please reorder them.") }} <strong>{{ _("Error:") }}</strong> {{ _("The transactions on this day are not well-ordered. Please reorder them.")|force_escape }}
</div> </div>
{% endif %} {% endif %}
@ -49,17 +49,17 @@ First written: 2020/7/23
<!-- Modal Header --> <!-- Modal Header -->
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title">{{ _("Cash Expense Transaction Deletion Confirmation") }}</h4> <h4 class="modal-title">{{ _("Cash Expense Transaction Deletion Confirmation")|force_escape }}</h4>
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
</div> </div>
<!-- Modal body --> <!-- Modal body -->
<div class="modal-body">{{ _("Do you really want to delete this cash expense transaction?") }}</div> <div class="modal-body">{{ _("Do you really want to delete this cash expense transaction?")|force_escape }}</div>
<!-- Modal footer --> <!-- Modal footer -->
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-danger" type="submit" name="del-confirm">{{ _("Confirm") }}</button> <button class="btn btn-danger" type="submit" name="del-confirm">{{ _("Confirm")|force_escape }}</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ _("Cancel") }}</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">{{ _("Cancel")|force_escape }}</button>
</div> </div>
</div> </div>
</div> </div>
@ -76,7 +76,7 @@ First written: 2020/7/23
{% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }} {% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }}
</a> </a>
{% if not item.has_many_same_day %} {% if not item.has_many_same_day %}
<button type="button" class="btn btn-secondary d-none d-sm-inline" disabled="disabled" title="{{ _("There is no other transaction at the same day.") }}"> <button type="button" class="btn btn-secondary d-none d-sm-inline" disabled="disabled" title="{{ _("There is no other transaction at the same day.")|force_escape }}">
<i class="fas fa-sort"></i> <i class="fas fa-sort"></i>
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }} {% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
</button> </button>
@ -96,7 +96,7 @@ First written: 2020/7/23
</button> </button>
<div class="dropdown-menu"> <div class="dropdown-menu">
{% if not item.has_many_same_day %} {% if not item.has_many_same_day %}
<span class="dropdown-item disabled" title="{{ _("There is no other transaction at the same day.") }}"> <span class="dropdown-item disabled" title="{{ _("There is no other transaction at the same day.")|force_escape }}">
<i class="fas fa-sort"></i> <i class="fas fa-sort"></i>
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }} {% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
</span> </span>
@ -119,16 +119,16 @@ First written: 2020/7/23
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-2">{{ _("Date:") }}</div> <div class="col-sm-2">{{ _("Date:")|force_escape }}</div>
<div class="col-sm-10">{{ item.date|smart_date }}</div> <div class="col-sm-10">{{ item.date|smart_date }}</div>
</div> </div>
<table class="table table-striped table-hover d-none d-sm-table"> <table class="table table-striped table-hover d-none d-sm-table">
<thead> <thead>
<tr> <tr>
<th scope="col">{{ _("Account") }}</th> <th scope="col">{{ _("Account")|force_escape }}</th>
<th scope="col">{{ _("Summary") }}</th> <th scope="col">{{ _("Summary")|force_escape }}</th>
<th class="amount" scope="col">{{ _("$") }}</th> <th class="amount" scope="col">{{ _("$")|force_escape }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -142,7 +142,7 @@ First written: 2020/7/23
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="2">{{ _("Total") }}</td> <td colspan="2">{{ _("Total")|force_escape }}</td>
<td class="amount">{{ item.debit_total|accounting_amount }}</td> <td class="amount">{{ item.debit_total|accounting_amount }}</td>
</tr> </tr>
</tfoot> </tfoot>
@ -160,7 +160,7 @@ First written: 2020/7/23
{% endfor %} {% endfor %}
<li class="list-group-item"> <li class="list-group-item">
<div class="d-flex justify-content-between align-items-center account-line"> <div class="d-flex justify-content-between align-items-center account-line">
{{ _("Total") }} {{ _("Total")|force_escape }}
<span class="badge badge-info">{{ item.debit_total|accounting_amount }}</span> <span class="badge badge-info">{{ item.debit_total|accounting_amount }}</span>
</div> </div>
</li> </li>
@ -168,28 +168,28 @@ First written: 2020/7/23
{% if item.notes %} {% if item.notes %}
<div class="row"> <div class="row">
<div class="col-sm-2">{{ _("Notes:") }}</div> <div class="col-sm-2">{{ _("Notes:")|force_escape }}</div>
<div class="col-sm-10">{{ item.notes }}</div> <div class="col-sm-10">{{ item.notes }}</div>
</div> </div>
{% endif %} {% endif %}
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2">{{ _("Created at:") }}</div> <div class="col-sm-2">{{ _("Created at:")|force_escape }}</div>
<div class="col-sm-10">{{ item.created_at }}</div> <div class="col-sm-10">{{ item.created_at }}</div>
</div> </div>
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2">{{ _("Created by:") }}</div> <div class="col-sm-2">{{ _("Created by:")|force_escape }}</div>
<div class="col-sm-10">{{ item.created_by.name }}</div> <div class="col-sm-10">{{ item.created_by.name }}</div>
</div> </div>
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2">{{ _("Updated at:") }}</div> <div class="col-sm-2">{{ _("Updated at:")|force_escape }}</div>
<div class="col-sm-10">{{ item.updated_at }}</div> <div class="col-sm-10">{{ item.updated_at }}</div>
</div> </div>
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2">{{ _("Updated by:") }}</div> <div class="col-sm-2">{{ _("Updated by:")|force_escape }}</div>
<div class="col-sm-10">{{ item.updated_by.name }}</div> <div class="col-sm-10">{{ item.updated_by.name }}</div>
</div> </div>

View File

@ -52,7 +52,7 @@ First written: 2020/7/23
{% csrf_token %} {% csrf_token %}
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2"> <div class="col-sm-2">
<label for="txn-date">{{ _("Date:") }}</label> <label for="txn-date">{{ _("Date:")|force_escape }}</label>
</div> </div>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="txn-date" class="form-control {% if should_validate and item.date.errors %} is-invalid {% endif %}" type="date" name="date" value="{{ item.date.value }}" required="required" /> <input id="txn-date" class="form-control {% if should_validate and item.date.errors %} is-invalid {% endif %}" type="date" name="date" value="{{ item.date.value }}" required="required" />
@ -77,7 +77,7 @@ First written: 2020/7/23
</li> </li>
<li class="list-group-item"> <li class="list-group-item">
<div class="d-flex justify-content-between align-items-center"> <div class="d-flex justify-content-between align-items-center">
{{ _("Total") }} {{ _("Total")|force_escape }}
<span id="credit-total" class="amount">{{ item.credit_total }}</span> <span id="credit-total" class="amount">{{ item.credit_total }}</span>
</div> </div>
</li> </li>
@ -87,7 +87,7 @@ First written: 2020/7/23
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2"> <div class="col-sm-2">
<label for="txn-note">{{ _("Notes:") }}</label> <label for="txn-note">{{ _("Notes:")|force_escape }}</label>
</div> </div>
<div class="col-sm-10"> <div class="col-sm-10">
<textarea id="txn-note" class="form-control {% if should_validate and item.notes.errors %} is-invalid {% endif %}" name="notes">{{ item.notes.value|default:"" }}</textarea> <textarea id="txn-note" class="form-control {% if should_validate and item.notes.errors %} is-invalid {% endif %}" name="notes">{{ item.notes.value|default:"" }}</textarea>
@ -99,7 +99,7 @@ First written: 2020/7/23
<div class="col-sm-12"> <div class="col-sm-12">
<button class="btn btn-primary" type="submit"> <button class="btn btn-primary" type="submit">
<i class="fas fa-save"></i> <i class="fas fa-save"></i>
{{ _("Save") }} {{ _("Save")|force_escape }}
</button> </button>
</div> </div>
</div> </div>

View File

@ -35,7 +35,7 @@ First written: 2020/7/23
{% if item.has_order_hole %} {% if item.has_order_hole %}
<div class="alert alert-danger alert-dismissible fade show"> <div class="alert alert-danger alert-dismissible fade show">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>{{ _("Error:") }}</strong> {{ _("The transactions on this day are not well-ordered. Please reorder them.") }} <strong>{{ _("Error:") }}</strong> {{ _("The transactions on this day are not well-ordered. Please reorder them.")|force_escape }}
</div> </div>
{% endif %} {% endif %}
@ -49,17 +49,17 @@ First written: 2020/7/23
<!-- Modal Header --> <!-- Modal Header -->
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title">{{ _("Cash Income Transaction Deletion Confirmation") }}</h4> <h4 class="modal-title">{{ _("Cash Income Transaction Deletion Confirmation")|force_escape }}</h4>
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
</div> </div>
<!-- Modal body --> <!-- Modal body -->
<div class="modal-body">{{ _("Do you really want to delete this cash income transaction?") }}</div> <div class="modal-body">{{ _("Do you really want to delete this cash income transaction?")|force_escape }}</div>
<!-- Modal footer --> <!-- Modal footer -->
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-danger" type="submit" name="del-confirm">{{ _("Confirm") }}</button> <button class="btn btn-danger" type="submit" name="del-confirm">{{ _("Confirm")|force_escape }}</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ _("Cancel") }}</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">{{ _("Cancel")|force_escape }}</button>
</div> </div>
</div> </div>
</div> </div>
@ -76,7 +76,7 @@ First written: 2020/7/23
{% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }} {% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }}
</a> </a>
{% if not item.has_many_same_day %} {% if not item.has_many_same_day %}
<button type="button" class="btn btn-secondary d-none d-sm-inline" disabled="disabled" title="{{ _("There is no other transaction at the same day.") }}"> <button type="button" class="btn btn-secondary d-none d-sm-inline" disabled="disabled" title="{{ _("There is no other transaction at the same day.")|force_escape }}">
<i class="fas fa-sort"></i> <i class="fas fa-sort"></i>
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }} {% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
</button> </button>
@ -96,7 +96,7 @@ First written: 2020/7/23
</button> </button>
<div class="dropdown-menu"> <div class="dropdown-menu">
{% if not item.has_many_same_day %} {% if not item.has_many_same_day %}
<span class="dropdown-item disabled" title="{{ _("There is no other transaction at the same day.") }}"> <span class="dropdown-item disabled" title="{{ _("There is no other transaction at the same day.")|force_escape }}">
<i class="fas fa-sort"></i> <i class="fas fa-sort"></i>
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }} {% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
</span> </span>
@ -119,16 +119,16 @@ First written: 2020/7/23
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-2">{{ _("Date:") }}</div> <div class="col-sm-2">{{ _("Date:")|force_escape }}</div>
<div class="col-sm-10">{{ item.date|smart_date }}</div> <div class="col-sm-10">{{ item.date|smart_date }}</div>
</div> </div>
<table class="table table-striped table-hover d-none d-sm-table"> <table class="table table-striped table-hover d-none d-sm-table">
<thead> <thead>
<tr> <tr>
<th scope="col">{{ _("Account") }}</th> <th scope="col">{{ _("Account")|force_escape }}</th>
<th scope="col">{{ _("Summary") }}</th> <th scope="col">{{ _("Summary")|force_escape }}</th>
<th class="amount" scope="col">{{ _("$") }}</th> <th class="amount" scope="col">{{ _("$")|force_escape }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -142,7 +142,7 @@ First written: 2020/7/23
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="2">{{ _("Total") }}</td> <td colspan="2">{{ _("Total")|force_escape }}</td>
<td class="amount">{{ item.credit_total|accounting_amount }}</td> <td class="amount">{{ item.credit_total|accounting_amount }}</td>
</tr> </tr>
</tfoot> </tfoot>
@ -160,7 +160,7 @@ First written: 2020/7/23
{% endfor %} {% endfor %}
<li class="list-group-item"> <li class="list-group-item">
<div class="d-flex justify-content-between align-items-center account-line"> <div class="d-flex justify-content-between align-items-center account-line">
{{ _("Total") }} {{ _("Total")|force_escape }}
<span class="badge badge-info">{{ item.credit_total|accounting_amount }}</span> <span class="badge badge-info">{{ item.credit_total|accounting_amount }}</span>
</div> </div>
</li> </li>
@ -168,28 +168,28 @@ First written: 2020/7/23
{% if item.notes %} {% if item.notes %}
<div class="row"> <div class="row">
<div class="col-sm-2">{{ _("Notes:") }}</div> <div class="col-sm-2">{{ _("Notes:")|force_escape }}</div>
<div class="col-sm-10">{{ item.notes }}</div> <div class="col-sm-10">{{ item.notes }}</div>
</div> </div>
{% endif %} {% endif %}
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2">{{ _("Created at:") }}</div> <div class="col-sm-2">{{ _("Created at:")|force_escape }}</div>
<div class="col-sm-10">{{ item.created_at }}</div> <div class="col-sm-10">{{ item.created_at }}</div>
</div> </div>
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2">{{ _("Created by:") }}</div> <div class="col-sm-2">{{ _("Created by:")|force_escape }}</div>
<div class="col-sm-10">{{ item.created_by.name }}</div> <div class="col-sm-10">{{ item.created_by.name }}</div>
</div> </div>
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2">{{ _("Updated at:") }}</div> <div class="col-sm-2">{{ _("Updated at:")|force_escape }}</div>
<div class="col-sm-10">{{ item.updated_at }}</div> <div class="col-sm-10">{{ item.updated_at }}</div>
</div> </div>
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2">{{ _("Updated by:") }}</div> <div class="col-sm-2">{{ _("Updated by:")|force_escape }}</div>
<div class="col-sm-10">{{ item.updated_by.name }}</div> <div class="col-sm-10">{{ item.updated_by.name }}</div>
</div> </div>

View File

@ -46,7 +46,7 @@ First written: 2020/8/6
<div class="form-group row"> <div class="form-group row">
<div class="col-sm-2"> <div class="col-sm-2">
<label for="txn-date">{{ _("Date:") }}</label> <label for="txn-date">{{ _("Date:")|force_escape }}</label>
</div> </div>
<div id="txn-date" class="col-sm-10"> <div id="txn-date" class="col-sm-10">
@ -61,10 +61,10 @@ First written: 2020/8/6
<thead> <thead>
<tr> <tr>
<th class="actions" scope="col"></th> <th class="actions" scope="col"></th>
<th scope="col">{{ _("Type") }}</th> <th scope="col">{{ _("Type")|force_escape }}</th>
<th scope="col">{{ _("Content") }}</th> <th scope="col">{{ _("Content")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Amount") }}</th> <th class="amount" scope="col">{{ _("Amount")|force_escape }}</th>
<th scope="col">{{ _("Notes") }}</th> <th scope="col">{{ _("Notes")|force_escape }}</th>
</tr> </tr>
</thead> </thead>
<tbody id="transactions"> <tbody id="transactions">
@ -82,11 +82,11 @@ First written: 2020/8/6
</td> </td>
<td> <td>
{% if item.is_cash_expense %} {% if item.is_cash_expense %}
{{ _("Cash Expense") }} {{ _("Cash Expense")|force_escape }}
{% elif item.is_cash_income %} {% elif item.is_cash_income %}
{{ _("Cash Income") }} {{ _("Cash Income")|force_escape }}
{% else %} {% else %}
{{ _("Transfer") }} {{ _("Transfer")|force_escape }}
{% endif %} {% endif %}
</td> </td>
<td> <td>
@ -117,7 +117,7 @@ First written: 2020/8/6
{% endif %} {% endif %}
{% if not item.is_balanced %} {% if not item.is_balanced %}
<span class="badge badge-danger badge-pill"> <span class="badge badge-danger badge-pill">
{{ _("Unbalanced") }} {{ _("Unbalanced")|force_escape }}
</span> </span>
{% endif %} {% endif %}
</td> </td>
@ -134,7 +134,7 @@ First written: 2020/8/6
<div class="col-sm-12"> <div class="col-sm-12">
<button class="btn btn-primary" type="submit"> <button class="btn btn-primary" type="submit">
<i class="fas fa-save"></i> <i class="fas fa-save"></i>
{{ _("Save") }} {{ _("Save")|force_escape }}
</button> </button>
</div> </div>
</div> </div>

View File

@ -52,7 +52,7 @@ First written: 2020/7/23
{% csrf_token %} {% csrf_token %}
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2"> <div class="col-sm-2">
<label for="txn-date">{{ _("Date:") }}</label> <label for="txn-date">{{ _("Date:")|force_escape }}</label>
</div> </div>
<div class="col-sm-10"> <div class="col-sm-10">
<input id="txn-date" class="form-control {% if should_validate and item.date.errors %} is-invalid {% endif %}" type="date" name="date" value="{{ item.date.value }}" required="required" /> <input id="txn-date" class="form-control {% if should_validate and item.date.errors %} is-invalid {% endif %}" type="date" name="date" value="{{ item.date.value }}" required="required" />
@ -62,7 +62,7 @@ First written: 2020/7/23
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-6"> <div class="col-sm-6">
<h2>{{ _("Debit") }}</h2> <h2>{{ _("Debit")|force_escape }}</h2>
<ul id="debit-records" class="list-group"> <ul id="debit-records" class="list-group">
{% for record in item.debit_records %} {% for record in item.debit_records %}
@ -79,7 +79,7 @@ First written: 2020/7/23
</li> </li>
<li class="list-group-item"> <li class="list-group-item">
<div id="debit-total-row" class="d-flex justify-content-between align-items-center form-control {% if should_validate and item.balance_error %} is-invalid {% endif %} balance-row"> <div id="debit-total-row" class="d-flex justify-content-between align-items-center form-control {% if should_validate and item.balance_error %} is-invalid {% endif %} balance-row">
{{ _("Total") }} {{ _("Total")|force_escape }}
<span id="debit-total" class="amount">{{ item.debit_total }}</span> <span id="debit-total" class="amount">{{ item.debit_total }}</span>
</div> </div>
<div id="debit-total-error" class="invalid-feedback balance-error">{% if should_validate %}{{ item.balance_error|default:"" }}{% endif %}</div> <div id="debit-total-error" class="invalid-feedback balance-error">{% if should_validate %}{{ item.balance_error|default:"" }}{% endif %}</div>
@ -88,7 +88,7 @@ First written: 2020/7/23
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<h2>{{ _("Credit") }}</h2> <h2>{{ _("Credit")|force_escape }}</h2>
<ul id="credit-records" class="list-group"> <ul id="credit-records" class="list-group">
{% for record in item.credit_records %} {% for record in item.credit_records %}
@ -105,7 +105,7 @@ First written: 2020/7/23
</li> </li>
<li class="list-group-item"> <li class="list-group-item">
<div id="credit-total-row" class="d-flex justify-content-between align-items-center form-control {% if should_validate and item.balance_error %} is-invalid {% endif %} balance-row"> <div id="credit-total-row" class="d-flex justify-content-between align-items-center form-control {% if should_validate and item.balance_error %} is-invalid {% endif %} balance-row">
{{ _("Total") }} {{ _("Total")|force_escape }}
<span id="credit-total" class="amount">{{ item.credit_total }}</span> <span id="credit-total" class="amount">{{ item.credit_total }}</span>
</div> </div>
<div id="credit-total-error" class="invalid-feedback balance-error">{% if should_validate %}{{ item.balance_error|default:"" }}{% endif %}</div> <div id="credit-total-error" class="invalid-feedback balance-error">{% if should_validate %}{{ item.balance_error|default:"" }}{% endif %}</div>
@ -116,7 +116,7 @@ First written: 2020/7/23
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2"> <div class="col-sm-2">
<label for="txn-note">{{ _("Notes:") }}</label> <label for="txn-note">{{ _("Notes:")|force_escape }}</label>
</div> </div>
<div class="col-sm-10"> <div class="col-sm-10">
<textarea id="txn-note" class="form-control {% if should_validate and item.notes.errors %} is-invalid {% endif %}" name="notes">{{ item.notes.value|default:"" }}</textarea> <textarea id="txn-note" class="form-control {% if should_validate and item.notes.errors %} is-invalid {% endif %}" name="notes">{{ item.notes.value|default:"" }}</textarea>
@ -128,7 +128,7 @@ First written: 2020/7/23
<div class="col-sm-12"> <div class="col-sm-12">
<button class="btn btn-primary" type="submit"> <button class="btn btn-primary" type="submit">
<i class="fas fa-save"></i> <i class="fas fa-save"></i>
{{ _("Save") }} {{ _("Save")|force_escape }}
</button> </button>
</div> </div>
</div> </div>

View File

@ -35,7 +35,7 @@ First written: 2020/7/23
{% if item.has_order_hole %} {% if item.has_order_hole %}
<div class="alert alert-danger alert-dismissible fade show"> <div class="alert alert-danger alert-dismissible fade show">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>{{ _("Error:") }}</strong> {{ _("The transactions on this day are not well-ordered. Please reorder them.") }} <strong>{{ _("Error:") }}</strong> {{ _("The transactions on this day are not well-ordered. Please reorder them.")|force_escape }}
</div> </div>
{% endif %} {% endif %}
@ -49,17 +49,17 @@ First written: 2020/7/23
<!-- Modal Header --> <!-- Modal Header -->
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title">{{ _("Transfer Transaction Deletion Confirmation") }}</h4> <h4 class="modal-title">{{ _("Transfer Transaction Deletion Confirmation")|force_escape }}</h4>
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
</div> </div>
<!-- Modal body --> <!-- Modal body -->
<div class="modal-body">{{ _("Do you really want to delete this transfer transaction?") }}</div> <div class="modal-body">{{ _("Do you really want to delete this transfer transaction?")|force_escape }}</div>
<!-- Modal footer --> <!-- Modal footer -->
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-danger" type="submit" name="del-confirm">{{ _("Confirm") }}</button> <button class="btn btn-danger" type="submit" name="del-confirm">{{ _("Confirm")|force_escape }}</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ _("Cancel") }}</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">{{ _("Cancel")|force_escape }}</button>
</div> </div>
</div> </div>
</div> </div>
@ -76,7 +76,7 @@ First written: 2020/7/23
{% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }} {% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }}
</a> </a>
{% if not item.has_many_same_day %} {% if not item.has_many_same_day %}
<button type="button" class="btn btn-secondary d-none d-sm-inline" disabled="disabled" title="{{ _("There is no other transaction at the same day.") }}"> <button type="button" class="btn btn-secondary d-none d-sm-inline" disabled="disabled" title="{{ _("There is no other transaction at the same day.")|force_escape }}">
<i class="fas fa-sort"></i> <i class="fas fa-sort"></i>
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }} {% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
</button> </button>
@ -92,7 +92,7 @@ First written: 2020/7/23
</button> </button>
<div class="dropdown-menu"> <div class="dropdown-menu">
{% if not item.has_many_same_day %} {% if not item.has_many_same_day %}
<span class="dropdown-item disabled" title="{{ _("There is no other transaction at the same day.") }}"> <span class="dropdown-item disabled" title="{{ _("There is no other transaction at the same day.")|force_escape }}">
<i class="fas fa-sort"></i> <i class="fas fa-sort"></i>
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }} {% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
</span> </span>
@ -111,20 +111,20 @@ First written: 2020/7/23
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-2">{{ _("Date:") }}</div> <div class="col-sm-2">{{ _("Date:")|force_escape }}</div>
<div class="col-sm-10">{{ item.date|smart_date }}</div> <div class="col-sm-10">{{ item.date|smart_date }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<h2>{{ _("Debit") }}</h2> <h2>{{ _("Debit")|force_escape }}</h2>
<table class="table table-striped table-hover d-none d-lg-table"> <table class="table table-striped table-hover d-none d-lg-table">
<thead> <thead>
<tr> <tr>
<th scope="col">{{ _("Account") }}</th> <th scope="col">{{ _("Account")|force_escape }}</th>
<th scope="col">{{ _("Summary") }}</th> <th scope="col">{{ _("Summary")|force_escape }}</th>
<th class="amount" scope="col">{{ _("$") }}</th> <th class="amount" scope="col">{{ _("$")|force_escape }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -138,7 +138,7 @@ First written: 2020/7/23
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="2">{{ _("Total") }}</td> <td colspan="2">{{ _("Total")|force_escape }}</td>
<td class="amount">{{ item.debit_total|accounting_amount }}</td> <td class="amount">{{ item.debit_total|accounting_amount }}</td>
</tr> </tr>
</tfoot> </tfoot>
@ -156,7 +156,7 @@ First written: 2020/7/23
{% endfor %} {% endfor %}
<li class="list-group-item"> <li class="list-group-item">
<div class="d-flex justify-content-between align-items-center account-line"> <div class="d-flex justify-content-between align-items-center account-line">
{{ _("Total") }} {{ _("Total")|force_escape }}
<span class="badge badge-info">{{ item.debit_total|accounting_amount }}</span> <span class="badge badge-info">{{ item.debit_total|accounting_amount }}</span>
</div> </div>
</li> </li>
@ -164,14 +164,14 @@ First written: 2020/7/23
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<h2>{{ _("Credit") }}</h2> <h2>{{ _("Credit")|force_escape }}</h2>
<table class="table table-striped table-hover d-none d-lg-table"> <table class="table table-striped table-hover d-none d-lg-table">
<thead> <thead>
<tr> <tr>
<th scope="col">{{ _("Account") }}</th> <th scope="col">{{ _("Account")|force_escape }}</th>
<th scope="col">{{ _("Summary") }}</th> <th scope="col">{{ _("Summary")|force_escape }}</th>
<th class="amount" scope="col">{{ _("$") }}</th> <th class="amount" scope="col">{{ _("$")|force_escape }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -185,7 +185,7 @@ First written: 2020/7/23
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="2">{{ _("Total") }}</td> <td colspan="2">{{ _("Total")|force_escape }}</td>
<td class="amount">{{ item.credit_total|accounting_amount }}</td> <td class="amount">{{ item.credit_total|accounting_amount }}</td>
</tr> </tr>
</tfoot> </tfoot>
@ -204,7 +204,7 @@ First written: 2020/7/23
{% endfor %} {% endfor %}
<li class="list-group-item"> <li class="list-group-item">
<div class="d-flex justify-content-between align-items-center account-line"> <div class="d-flex justify-content-between align-items-center account-line">
{{ _("Total") }} {{ _("Total")|force_escape }}
<span class="badge badge-info">{{ item.credit_total|accounting_amount }}</span> <span class="badge badge-info">{{ item.credit_total|accounting_amount }}</span>
</div> </div>
</li> </li>
@ -214,28 +214,28 @@ First written: 2020/7/23
{% if item.notes %} {% if item.notes %}
<div class="row"> <div class="row">
<div class="col-sm-2">{{ _("Notes:") }}</div> <div class="col-sm-2">{{ _("Notes:")|force_escape }}</div>
<div class="col-sm-10">{{ item.notes }}</div> <div class="col-sm-10">{{ item.notes }}</div>
</div> </div>
{% endif %} {% endif %}
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2">{{ _("Created at:") }}</div> <div class="col-sm-2">{{ _("Created at:")|force_escape }}</div>
<div class="col-sm-10">{{ item.created_at }}</div> <div class="col-sm-10">{{ item.created_at }}</div>
</div> </div>
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2">{{ _("Created by:") }}</div> <div class="col-sm-2">{{ _("Created by:")|force_escape }}</div>
<div class="col-sm-10">{{ item.created_by.name }}</div> <div class="col-sm-10">{{ item.created_by.name }}</div>
</div> </div>
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2">{{ _("Updated at:") }}</div> <div class="col-sm-2">{{ _("Updated at:")|force_escape }}</div>
<div class="col-sm-10">{{ item.updated_at }}</div> <div class="col-sm-10">{{ item.updated_at }}</div>
</div> </div>
<div class="row form-group"> <div class="row form-group">
<div class="col-sm-2">{{ _("Updated by:") }}</div> <div class="col-sm-2">{{ _("Updated by:")|force_escape }}</div>
<div class="col-sm-10">{{ item.updated_by.name }}</div> <div class="col-sm-10">{{ item.updated_by.name }}</div>
</div> </div>

View File

@ -79,10 +79,10 @@ First written: 2020/7/19
<table class="table table-borderless table-hover trial-balance-table"> <table class="table table-borderless table-hover trial-balance-table">
<thead> <thead>
<tr> <tr>
<th scope="col">{{ _("Account") }}</th> <th scope="col">{{ _("Account")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Debit") }}</th> <th class="amount" scope="col">{{ _("Debit")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Credit") }}</th> <th class="amount" scope="col">{{ _("Credit")|force_escape }}</th>
<th class="actions" scope="col">{{ _("View") }}</th> <th class="actions" scope="col">{{ _("View")|force_escape }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -94,7 +94,7 @@ First written: 2020/7/19
<td class="actions"> <td class="actions">
<a href="{% url "accounting:ledger" item 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> <i class="fas fa-eye"></i>
<span class="d-none d-lg-inline">{{ _("View") }}</span> <span class="d-none d-lg-inline">{{ _("View")|force_escape }}</span>
</a> </a>
</td> </td>
</tr> </tr>
@ -102,7 +102,7 @@ First written: 2020/7/19
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr>
<td>{{ _("Total") }}</td> <td>{{ _("Total")|force_escape }}</td>
<td class="amount">{{ total_item.debit_amount|accounting_amount }}</td> <td class="amount">{{ total_item.debit_amount|accounting_amount }}</td>
<td class="amount">{{ total_item.credit_amount|accounting_amount }}</td> <td class="amount">{{ total_item.credit_amount|accounting_amount }}</td>
<td></td> <td></td>
@ -142,7 +142,7 @@ First written: 2020/7/19
</li> </li>
{% endfor %} {% endfor %}
<li class="list-group-item d-flex justify-content-between align-items-center total"> <li class="list-group-item d-flex justify-content-between align-items-center total">
{{ _("Total") }} {{ _("Total")|force_escape }}
<div> <div>
<span class="badge badge-success badge-pill"> <span class="badge badge-success badge-pill">
{{ total_item.debit_amount|intcomma:False }} {{ total_item.debit_amount|intcomma:False }}

View File

@ -105,7 +105,7 @@ First written: 2020/7/10
<input id="day-picker" type="date" value="{{ period.chosen_day }}" min="{{ period.data_start }}" max="{{ period.data_end }}" required="required" /> <input id="day-picker" type="date" value="{{ period.chosen_day }}" min="{{ period.data_start }}" max="{{ period.data_end }}" required="required" />
</div> </div>
<div> <div>
<button id="button-period-day" class="btn btn-primary" type="submit">{{ _("Confirm") }}</button> <button id="button-period-day" class="btn btn-primary" type="submit">{{ _("Confirm")|force_escape }}</button>
</div> </div>
{% endif %} {% endif %}
</div> </div>
@ -123,7 +123,7 @@ First written: 2020/7/10
<input id="period-end" type="date" value="{{ period.chosen_end }}" min="{{ period.chosen_start }}" max="{{ period.data_end }}" required="required" /> <input id="period-end" type="date" value="{{ period.chosen_end }}" min="{{ period.chosen_start }}" max="{{ period.data_end }}" required="required" />
</div> </div>
<div> <div>
<button id="button-period-custom" class="btn btn-primary" type="submit">{{ _("Confirm") }}</button> <button id="button-period-custom" class="btn btn-primary" type="submit">{{ _("Confirm")|force_escape }}</button>
</div> </div>
{% endif %} {% endif %}
</div> </div>