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">
<a href="{{ item.url }}" class="btn btn-info" role="button">
<i class="fas fa-eye"></i>
{{ _("View") }}
{{ _("View")|force_escape }}
</a>
</td>
</tr>
@ -124,7 +124,7 @@ First written: 2020/7/20
<td class="actions">
<a href="{{ item.url }}" class="btn btn-info" role="button">
<i class="fas fa-eye"></i>
{{ _("View") }}
{{ _("View")|force_escape }}
</a>
</td>
</tr>
@ -133,7 +133,7 @@ First written: 2020/7/20
</tbody>
<tfoot>
<tr class="total">
<td>{{ _("Total") }}</td>
<td>{{ _("Total")|force_escape }}</td>
<td class="amount {% if liabilities.amount < 0 %} text-danger {% endif %}">
{{ liabilities.amount|accounting_amount }}
</td>
@ -161,7 +161,7 @@ First written: 2020/7/20
<td class="actions">
<a href="{{ item.url }}" class="btn btn-info" role="button">
<i class="fas fa-eye"></i>
{{ _("View") }}
{{ _("View")|force_escape }}
</a>
</td>
</tr>
@ -170,7 +170,7 @@ First written: 2020/7/20
</tbody>
<tfoot>
<tr class="total">
<td>{{ _("Total") }}</td>
<td>{{ _("Total")|force_escape }}</td>
<td class="amount {% if owners_equity.amount < 0 %} text-danger {% endif %}">
{{ owners_equity.amount|accounting_amount }}
</td>
@ -185,7 +185,7 @@ First written: 2020/7/20
<table class="table table-borderless table-hover table-sm balance-sheet-total-table">
<tfoot>
<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 %}">
{{ assets.amount|accounting_amount }}
</td>
@ -198,7 +198,7 @@ First written: 2020/7/20
<table class="table table-borderless table-hover table-sm balance-sheet-total-table">
<tfoot>
<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 %}">
{{ liabilities.amount|add:owners_equity.amount|accounting_amount }}
</td>
@ -239,7 +239,7 @@ First written: 2020/7/20
{% endfor %}
{% endfor %}
<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">
{{ assets.amount|accounting_amount }}
</span>
@ -270,7 +270,7 @@ First written: 2020/7/20
{% endfor %}
{% endfor %}
<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">
{{ liabilities.amount|accounting_amount }}
</span>
@ -299,7 +299,7 @@ First written: 2020/7/20
{% endfor %}
{% endfor %}
<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">
{{ owners_equity.amount|accounting_amount }}
</span>
@ -308,7 +308,7 @@ First written: 2020/7/20
<ul class="list-group balance-sheet-list">
<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">
{{ liabilities.amount|add:owners_equity.amount|accounting_amount }}
</span>

View File

@ -58,16 +58,16 @@ First written: 2020/7/15
<div class="btn-group">
<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-md-none">{{ _("Account") }}</span>
<span class="d-md-none">{{ _("Account")|force_escape }}</span>
</button>
<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 %}
<a class="dropdown-item {% if x.code == account.code %} active {% endif %}>" href="{% url "accounting:cash-summary" x %}">
{{ x.title|title_case }}
</a>
{% endfor %}
<div class="dropdown-header">{{ _("All") }}</div>
<div class="dropdown-header">{{ _("All")|force_escape }}</div>
{% for x in all_accounts %}
<a class="dropdown-item {% if x.code == account.code %} active {% endif %}>" href="{% url "accounting:cash-summary" x %}">
{{ 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">
<thead>
<tr>
<th scope="col">{{ _("Month") }}</th>
<th class="amount" scope="col">{{ _("Income") }}</th>
<th class="amount" scope="col">{{ _("Expense") }}</th>
<th class="amount" scope="col">{{ _("Balance") }}</th>
<th class="amount" scope="col">{{ _("Cumulative Balance") }}</th>
<th class="actions" scope="col">{{ _("View") }}</th>
<th scope="col">{{ _("Month")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Income")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Expense")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Balance")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Cumulative Balance")|force_escape }}</th>
<th class="actions" scope="col">{{ _("View")|force_escape }}</th>
</tr>
</thead>
<tbody>
@ -104,7 +104,7 @@ First written: 2020/7/15
{% if item.month is not None %}
<a class="btn btn-info" role="button" href="{% url "accounting:cash" account item.month|date:"Y-m" %}">
<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>
{% endif %}
</td>

View File

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

View File

@ -30,21 +30,21 @@ First written: 2020/7/9
<!-- 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>
</div>
<!-- Modal body -->
<div class="modal-body">
<label for="accounting-query">{{ _("Search:") }}</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" />
<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")|force_escape }}" required="required" />
</div>
<!-- Modal footer -->
<div class="modal-footer">
<button class="btn btn-primary" type="submit">
<i class="fas fa-search"></i>
{{ _("Search") }}
{{ _("Search")|force_escape }}
</button>
</div>
</div>
@ -59,48 +59,48 @@ First written: 2020/7/9
<i class="{{ current_report_icon }}"></i>
{{ current_report_title }}
</span>
<span class="d-md-none">{{ _("Book") }}</span>
<span class="d-md-none">{{ _("Book")|force_escape }}</span>
</button>
<div class="dropdown-menu account-picker">
<a class="dropdown-item {% if request.resolver_match.url_name == "cash" %} active {% endif %}" href="{{ reports.cash }}">
<i class="fas fa-money-bill-wave"></i>
{{ _("Cash Account") }}
{{ _("Cash Account")|force_escape }}
</a>
<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>
{{ _("Cash Summary") }}
{{ _("Cash Summary")|force_escape }}
</a>
<a class="dropdown-item {% if request.resolver_match.url_name == "ledger" %} active {% endif %}" href="{{ reports.ledger }}">
<i class="fas fa-file-invoice-dollar"></i>
{{ _("Ledger") }}
{{ _("Ledger")|force_escape }}
</a>
<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>
{{ _("Ledger Summary") }}
{{ _("Ledger Summary")|force_escape }}
</a>
<a class="dropdown-item {% if request.resolver_match.url_name == "journal" %} active {% endif %}" href="{{ reports.journal }}">
<i class="fas fa-book"></i>
{{ _("Journal") }}
{{ _("Journal")|force_escape }}
</a>
<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>
{{ _("Trial Balance") }}
{{ _("Trial Balance")|force_escape }}
</a>
<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>
{{ _("Income Statement") }}
{{ _("Income Statement")|force_escape }}
</a>
<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>
{{ _("Balance Sheet") }}
{{ _("Balance Sheet")|force_escape }}
</a>
<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>
{{ _("Search") }}
{{ _("Search")|force_escape }}
</span>
<a class="dropdown-item {% if request.resolver_match.url_name == "accounts" %} active {% endif %}" href="{% url "accounting:accounts" %}">
<i class="fas fa-list-ol"></i>
{{ _("Accounts") }}
{{ _("Accounts")|force_escape }}
</a>
</div>
</div>

View File

@ -34,7 +34,7 @@ First written: 2020/4/3
<h4 class="modal-title">
<label for="summary-summary">
<i class="fas fa-edit"></i>
{{ _("Summary") }}
{{ _("Summary")|force_escape }}
</label>
</h4>
<button type="button" class="close" data-dismiss="modal">&times;</button>
@ -47,26 +47,26 @@ First written: 2020/4/3
</div>
<ul class="nav nav-tabs">
<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 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 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 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 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>
</ul>
<!-- A general category -->
<div id="summary-tab-content-category" class="summary-tab-content">
<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">
<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>
@ -77,20 +77,20 @@ First written: 2020/4/3
<!-- A general travel route -->
<div id="summary-tab-content-travel" class="summary-tab-content d-none">
<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">
<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>
</div>
<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">
<input id="summary-travel-from" class="form-control summary-helper-input summary-travel-part" type="text" value="" />
</div>
</div>
<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">
<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>
@ -98,7 +98,7 @@ First written: 2020/4/3
</div>
</div>
<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">
<input id="summary-travel-to" class="form-control summary-helper-input summary-travel-part" type="text" value="" />
</div>
@ -108,26 +108,26 @@ First written: 2020/4/3
<!-- A bus route -->
<div id="summary-tab-content-bus" class="summary-tab-content d-none">
<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">
<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>
</div>
<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">
<input id="summary-bus-route" class="form-control summary-helper-input summary-bus-part" type="text" value="" />
</div>
</div>
<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">
<input id="summary-bus-from" class="form-control summary-helper-input summary-bus-part" type="text" value="" />
</div>
</div>
<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">
<input id="summary-bus-to" class="form-control summary-helper-input summary-bus-part" type="text" value="" />
</div>
@ -145,7 +145,7 @@ First written: 2020/4/3
<div id="summary-tab-content-count" class="summary-tab-content d-none">
<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">
<input id="summary-count" class="form-control summary-helper-input" type="number" min="1" value="" />
</div>
@ -155,8 +155,8 @@ First written: 2020/4/3
<!-- Modal footer -->
<div class="modal-footer">
<button id="summary-confirm" class="btn btn-danger" type="submit" data-dismiss="modal">{{ _("Confirm") }}</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ _("Cancel") }}</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")|force_escape }}</button>
</div>
</div>
</div>

View File

@ -77,7 +77,7 @@ First written: 2020/7/19
<thead>
<tr>
<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>
</tr>
</thead>
@ -105,13 +105,13 @@ First written: 2020/7/19
<td class="actions">
<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">{{ _("View") }}</span>
<span class="d-none d-lg-inline">{{ _("View")|force_escape }}</span>
</a>
</td>
</tr>
{% endfor %}
<tr class="total">
<td><div>{{ _("Total") }}</div></td>
<td><div>{{ _("Total")|force_escape }}</div></td>
<td class="amount"></td>
<td class="amount {% if group.amount < 0 %} text-danger {% endif %}">{{ group.amount|accounting_amount }}</td>
<td class="actions"></td>
@ -119,7 +119,7 @@ First written: 2020/7/19
{% endfor %}
{% else %}
<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="actions"></td>
@ -174,7 +174,7 @@ First written: 2020/7/19
</li>
{% endfor %}
<li class="list-group-item d-flex justify-content-between align-items-center total">
{{ _("Total") }}
{{ _("Total")|force_escape }}
<div class="float-right">
<span class="badge {% if group.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">
{{ group.amount|accounting_amount }}
@ -184,7 +184,7 @@ First written: 2020/7/19
{% endfor %}
{% else %}
<li class="list-group-item d-flex justify-content-between align-items-center total">
{{ _("Total") }}
{{ _("Total")|force_escape }}
<div class="float-right">
<span class="badge {% if group.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">-</span>
</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">
<thead>
<tr>
<th scope="col">{{ _("Date") }}</th>
<th scope="col">{{ _("Account") }}</th>
<th scope="col">{{ _("Summary") }}</th>
<th class="amount" scope="col">{{ _("Debit") }}</th>
<th class="amount" scope="col">{{ _("Credit") }}</th>
<th scope="col">{{ _("Notes") }}</th>
<th class="actions" scope="col">{{ _("View") }}</th>
<th scope="col">{{ _("Date")|force_escape }}</th>
<th scope="col">{{ _("Account")|force_escape }}</th>
<th scope="col">{{ _("Summary")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Debit")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Credit")|force_escape }}</th>
<th scope="col">{{ _("Notes")|force_escape }}</th>
<th class="actions" scope="col">{{ _("View")|force_escape }}</th>
</tr>
</thead>
<tbody>
@ -88,11 +88,11 @@ First written: 2020/7/17
<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 %}
<span class="badge badge-danger badge-pill">
{{ _("Unbalanced") }}
{{ _("Unbalanced")|force_escape }}
</span>
{% endif %}{% if item.has_order_hole %}
<span class="badge badge-danger badge-pill">
{{ _("Need Reorder") }}
{{ _("Need Reorder")|force_escape }}
</span>
{% endif %}</div></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 %}
<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>
{{ _("View") }}
{{ _("View")|force_escape }}
</a>
{% endif %}
</td>
@ -126,12 +126,12 @@ First written: 2020/7/17
{{ item.summary|default:"" }}
{% if not item.is_balanced %}
<span class="badge badge-danger badge-pill">
{{ _("Unbalanced") }}
{{ _("Unbalanced")|force_escape }}
</span>
{% endif %}
{% if item.has_order_hole %}
<span class="badge badge-danger badge-pill">
{{ _("Need Reorder") }}
{{ _("Need Reorder")|force_escape }}
</span>
{% endif %}
</div>
@ -161,7 +161,7 @@ First written: 2020/7/17
{{ item.summary|default:"" }}
{% if not item.is_balanced %}
<span class="badge badge-danger badge-pill">
{{ _("Unbalanced") }}
{{ _("Unbalanced")|force_escape }}
</span>
{% endif %}
</div>

View File

@ -58,7 +58,7 @@ First written: 2020/7/16
<div class="btn-group">
<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-md-none">{{ _("Account") }}</span>
<span class="d-md-none">{{ _("Account")|force_escape }}</span>
</button>
<div class="dropdown-menu account-picker">
{% 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">
<thead>
<tr>
<th scope="col">{{ _("Month") }}</th>
<th class="amount" scope="col">{{ _("Debit") }}</th>
<th class="amount" scope="col">{{ _("Credit") }}</th>
<th class="amount" scope="col">{{ _("Balance") }}</th>
<th class="amount" scope="col">{{ _("Cumulative Balance") }}</th>
<th class="actions" scope="col">{{ _("View") }}</th>
<th scope="col">{{ _("Month")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Debit")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Credit")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Balance")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Cumulative Balance")|force_escape }}</th>
<th class="actions" scope="col">{{ _("View")|force_escape }}</th>
</tr>
</thead>
<tbody>
@ -97,7 +97,7 @@ First written: 2020/7/16
{% if item.month is not None %}
<a class="btn btn-info" role="button" href="{% url "accounting:ledger" account item.month|date:"Y-m" %}">
<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>
{% endif %}
</td>

View File

@ -59,7 +59,7 @@ First written: 2020/7/16
<div class="btn-group">
<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-md-none">{{ _("Account") }}</span>
<span class="d-md-none">{{ _("Account")|force_escape }}</span>
</button>
<div class="dropdown-menu account-picker">
{% 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">
<thead>
<tr>
<th scope="col">{{ _("Date") }}</th>
<th scope="col">{{ _("Account") }}</th>
<th scope="col">{{ _("Summary") }}</th>
<th class="amount" scope="col">{{ _("Debit") }}</th>
<th class="amount" scope="col">{{ _("Credit") }}</th>
<th class="amount" scope="col">{{ _("Balance") }}</th>
<th class="actions" scope="col">{{ _("View") }}</th>
<th scope="col">{{ _("Date")|force_escape }}</th>
<th scope="col">{{ _("Account")|force_escape }}</th>
<th scope="col">{{ _("Summary")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Debit")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Credit")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Balance")|force_escape }}</th>
<th class="actions" scope="col">{{ _("View")|force_escape }}</th>
</tr>
</thead>
<tbody>
@ -101,19 +101,19 @@ First written: 2020/7/16
<td>{{ item.account.title|title_case }}</td>
<td>{{ item.summary|default:"" }}{% if not item.is_balanced %}
<span class="badge badge-danger badge-pill">
{{ _("Unbalanced") }}
{{ _("Unbalanced")|force_escape }}
</span>
{% endif %}{% if item.has_order_hole %}
<span class="badge badge-danger badge-pill">
{{ _("Need Reorder") }}
{{ _("Need Reorder")|force_escape }}
</span>
{% endif %}{% if not item.is_credit_card_paid %}
<span class="badge badge-danger badge-pill">
{{ _("Unpaid") }}
{{ _("Unpaid")|force_escape }}
</span>
{% endif %}{% if item.is_existing_equipment %}
<span class="badge badge-info badge-pill">
{{ _("Existing") }}
{{ _("Existing")|force_escape }}
</span>
{% endif %}</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 %}
<a href="{% url_with_return "accounting:transactions.show" item.transaction.type item.transaction %}" class="btn btn-info" role="button">
<i class="fas fa-eye"></i>
<span class="d-none d-lg-inline">{{ _("View") }}</span>
<span class="d-none d-lg-inline">{{ _("View")|force_escape }}</span>
</a>
{% endif %}
</td>
@ -146,22 +146,22 @@ First written: 2020/7/16
{{ item.summary|default:"" }}
{% if not item.is_balanced %}
<span class="badge badge-danger badge-pill">
{{ _("Unbalanced") }}
{{ _("Unbalanced")|force_escape }}
</span>
{% endif %}
{% if item.has_order_hole %}
<span class="badge badge-danger badge-pill">
{{ _("Need Reorder") }}
{{ _("Need Reorder")|force_escape }}
</span>
{% endif %}
{% if not item.is_credit_card_paid %}
<span class="badge badge-danger badge-pill">
{{ _("Unpaid") }}
{{ _("Unpaid")|force_escape }}
</span>
{% endif %}
{% if item.is_existing_equipment %}
<span class="badge badge-info badge-pill">
{{ _("Existing") }}
{{ _("Existing")|force_escape }}
</span>
{% endif %}
</div>

View File

@ -61,7 +61,7 @@ First written: 2020/7/21
<label for="search-input" class="search-label">
<button type="submit">
<i class="fas fa-search"></i>
{{ _("Search") }}
{{ _("Search")|force_escape }}
</button>
</label>
</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">
<thead>
<tr>
<th scope="col">{{ _("Date") }}</th>
<th scope="col">{{ _("Account") }}</th>
<th scope="col">{{ _("Summary") }}</th>
<th class="amount" scope="col">{{ _("Debit") }}</th>
<th class="amount" scope="col">{{ _("Credit") }}</th>
<th scope="col">{{ _("Notes") }}</th>
<th class="actions" scope="col">{{ _("View") }}</th>
<th scope="col">{{ _("Date")|force_escape }}</th>
<th scope="col">{{ _("Account")|force_escape }}</th>
<th scope="col">{{ _("Summary")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Debit")|force_escape }}</th>
<th class="amount" scope="col">{{ _("Credit")|force_escape }}</th>
<th scope="col">{{ _("Notes")|force_escape }}</th>
<th class="actions" scope="col">{{ _("View")|force_escape }}</th>
</tr>
</thead>
<tbody>
@ -90,11 +90,11 @@ First written: 2020/7/21
<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 %}
<span class="badge badge-danger badge-pill">
{{ _("Unbalanced") }}
{{ _("Unbalanced")|force_escape }}
</span>
{% endif %}{% if item.has_order_hole %}
<span class="badge badge-danger badge-pill">
{{ _("Need Reorder") }}
{{ _("Need Reorder")|force_escape }}
</span>
{% endif %}</div></td>
<td class="amount">{{ item.debit_amount|accounting_amount }}</td>
@ -103,7 +103,7 @@ First written: 2020/7/21
<td class="actions">
<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>
{{ _("View") }}
{{ _("View")|force_escape }}
</a>
</td>
</tr>
@ -125,12 +125,12 @@ First written: 2020/7/21
{{ item.summary|default:"" }}
{% if not item.is_balanced %}
<span class="badge badge-danger badge-pill">
{{ _("Unbalanced") }}
{{ _("Unbalanced")|force_escape }}
</span>
{% endif %}
{% if item.has_order_hole %}
<span class="badge badge-danger badge-pill">
{{ _("Need Reorder") }}
{{ _("Need Reorder")|force_escape }}
</span>
{% endif %}
</div>

View File

@ -52,7 +52,7 @@ First written: 2020/7/23
{% csrf_token %}
<div class="row form-group">
<div class="col-sm-2">
<label for="txn-date">{{ _("Date:") }}</label>
<label for="txn-date">{{ _("Date:")|force_escape }}</label>
</div>
<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" />
@ -77,7 +77,7 @@ First written: 2020/7/23
</li>
<li class="list-group-item">
<div class="d-flex justify-content-between align-items-center">
{{ _("Total") }}
{{ _("Total")|force_escape }}
<span id="debit-total" class="amount">{{ item.debit_total }}</span>
</div>
</li>
@ -87,7 +87,7 @@ First written: 2020/7/23
<div class="row form-group">
<div class="col-sm-2">
<label for="txn-note">{{ _("Notes:") }}</label>
<label for="txn-note">{{ _("Notes:")|force_escape }}</label>
</div>
<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>
@ -99,7 +99,7 @@ First written: 2020/7/23
<div class="col-sm-12">
<button class="btn btn-primary" type="submit">
<i class="fas fa-save"></i>
{{ _("Save") }}
{{ _("Save")|force_escape }}
</button>
</div>
</div>

View File

@ -35,7 +35,7 @@ First written: 2020/7/23
{% if item.has_order_hole %}
<div class="alert alert-danger alert-dismissible fade show">
<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>
{% endif %}
@ -49,17 +49,17 @@ First written: 2020/7/23
<!-- 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>
</div>
<!-- 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 -->
<div class="modal-footer">
<button class="btn btn-danger" type="submit" name="del-confirm">{{ _("Confirm") }}</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ _("Cancel") }}</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")|force_escape }}</button>
</div>
</div>
</div>
@ -76,7 +76,7 @@ First written: 2020/7/23
{% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }}
</a>
{% 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>
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
</button>
@ -96,7 +96,7 @@ First written: 2020/7/23
</button>
<div class="dropdown-menu">
{% 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>
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
</span>
@ -119,16 +119,16 @@ First written: 2020/7/23
</div>
<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>
<table class="table table-striped table-hover d-none d-sm-table">
<thead>
<tr>
<th scope="col">{{ _("Account") }}</th>
<th scope="col">{{ _("Summary") }}</th>
<th class="amount" scope="col">{{ _("$") }}</th>
<th scope="col">{{ _("Account")|force_escape }}</th>
<th scope="col">{{ _("Summary")|force_escape }}</th>
<th class="amount" scope="col">{{ _("$")|force_escape }}</th>
</tr>
</thead>
<tbody>
@ -142,7 +142,7 @@ First written: 2020/7/23
</tbody>
<tfoot>
<tr>
<td colspan="2">{{ _("Total") }}</td>
<td colspan="2">{{ _("Total")|force_escape }}</td>
<td class="amount">{{ item.debit_total|accounting_amount }}</td>
</tr>
</tfoot>
@ -160,7 +160,7 @@ First written: 2020/7/23
{% endfor %}
<li class="list-group-item">
<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>
</div>
</li>
@ -168,28 +168,28 @@ First written: 2020/7/23
{% if item.notes %}
<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>
{% endif %}
<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>
<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>
<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>
<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>

View File

@ -52,7 +52,7 @@ First written: 2020/7/23
{% csrf_token %}
<div class="row form-group">
<div class="col-sm-2">
<label for="txn-date">{{ _("Date:") }}</label>
<label for="txn-date">{{ _("Date:")|force_escape }}</label>
</div>
<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" />
@ -77,7 +77,7 @@ First written: 2020/7/23
</li>
<li class="list-group-item">
<div class="d-flex justify-content-between align-items-center">
{{ _("Total") }}
{{ _("Total")|force_escape }}
<span id="credit-total" class="amount">{{ item.credit_total }}</span>
</div>
</li>
@ -87,7 +87,7 @@ First written: 2020/7/23
<div class="row form-group">
<div class="col-sm-2">
<label for="txn-note">{{ _("Notes:") }}</label>
<label for="txn-note">{{ _("Notes:")|force_escape }}</label>
</div>
<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>
@ -99,7 +99,7 @@ First written: 2020/7/23
<div class="col-sm-12">
<button class="btn btn-primary" type="submit">
<i class="fas fa-save"></i>
{{ _("Save") }}
{{ _("Save")|force_escape }}
</button>
</div>
</div>

View File

@ -35,7 +35,7 @@ First written: 2020/7/23
{% if item.has_order_hole %}
<div class="alert alert-danger alert-dismissible fade show">
<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>
{% endif %}
@ -49,17 +49,17 @@ First written: 2020/7/23
<!-- 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>
</div>
<!-- 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 -->
<div class="modal-footer">
<button class="btn btn-danger" type="submit" name="del-confirm">{{ _("Confirm") }}</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ _("Cancel") }}</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")|force_escape }}</button>
</div>
</div>
</div>
@ -76,7 +76,7 @@ First written: 2020/7/23
{% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }}
</a>
{% 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>
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
</button>
@ -96,7 +96,7 @@ First written: 2020/7/23
</button>
<div class="dropdown-menu">
{% 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>
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
</span>
@ -119,16 +119,16 @@ First written: 2020/7/23
</div>
<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>
<table class="table table-striped table-hover d-none d-sm-table">
<thead>
<tr>
<th scope="col">{{ _("Account") }}</th>
<th scope="col">{{ _("Summary") }}</th>
<th class="amount" scope="col">{{ _("$") }}</th>
<th scope="col">{{ _("Account")|force_escape }}</th>
<th scope="col">{{ _("Summary")|force_escape }}</th>
<th class="amount" scope="col">{{ _("$")|force_escape }}</th>
</tr>
</thead>
<tbody>
@ -142,7 +142,7 @@ First written: 2020/7/23
</tbody>
<tfoot>
<tr>
<td colspan="2">{{ _("Total") }}</td>
<td colspan="2">{{ _("Total")|force_escape }}</td>
<td class="amount">{{ item.credit_total|accounting_amount }}</td>
</tr>
</tfoot>
@ -160,7 +160,7 @@ First written: 2020/7/23
{% endfor %}
<li class="list-group-item">
<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>
</div>
</li>
@ -168,28 +168,28 @@ First written: 2020/7/23
{% if item.notes %}
<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>
{% endif %}
<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>
<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>
<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>
<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>

View File

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

View File

@ -52,7 +52,7 @@ First written: 2020/7/23
{% csrf_token %}
<div class="row form-group">
<div class="col-sm-2">
<label for="txn-date">{{ _("Date:") }}</label>
<label for="txn-date">{{ _("Date:")|force_escape }}</label>
</div>
<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" />
@ -62,7 +62,7 @@ First written: 2020/7/23
<div class="row form-group">
<div class="col-sm-6">
<h2>{{ _("Debit") }}</h2>
<h2>{{ _("Debit")|force_escape }}</h2>
<ul id="debit-records" class="list-group">
{% for record in item.debit_records %}
@ -79,7 +79,7 @@ First written: 2020/7/23
</li>
<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">
{{ _("Total") }}
{{ _("Total")|force_escape }}
<span id="debit-total" class="amount">{{ item.debit_total }}</span>
</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 class="col-sm-6">
<h2>{{ _("Credit") }}</h2>
<h2>{{ _("Credit")|force_escape }}</h2>
<ul id="credit-records" class="list-group">
{% for record in item.credit_records %}
@ -105,7 +105,7 @@ First written: 2020/7/23
</li>
<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">
{{ _("Total") }}
{{ _("Total")|force_escape }}
<span id="credit-total" class="amount">{{ item.credit_total }}</span>
</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="col-sm-2">
<label for="txn-note">{{ _("Notes:") }}</label>
<label for="txn-note">{{ _("Notes:")|force_escape }}</label>
</div>
<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>
@ -128,7 +128,7 @@ First written: 2020/7/23
<div class="col-sm-12">
<button class="btn btn-primary" type="submit">
<i class="fas fa-save"></i>
{{ _("Save") }}
{{ _("Save")|force_escape }}
</button>
</div>
</div>

View File

@ -35,7 +35,7 @@ First written: 2020/7/23
{% if item.has_order_hole %}
<div class="alert alert-danger alert-dismissible fade show">
<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>
{% endif %}
@ -49,17 +49,17 @@ First written: 2020/7/23
<!-- 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>
</div>
<!-- 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 -->
<div class="modal-footer">
<button class="btn btn-danger" type="submit" name="del-confirm">{{ _("Confirm") }}</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ _("Cancel") }}</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")|force_escape }}</button>
</div>
</div>
</div>
@ -76,7 +76,7 @@ First written: 2020/7/23
{% trans "Edit" context "Navigation|" as text %}{{ text|force_escape }}
</a>
{% 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>
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
</button>
@ -92,7 +92,7 @@ First written: 2020/7/23
</button>
<div class="dropdown-menu">
{% 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>
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
</span>
@ -111,20 +111,20 @@ First written: 2020/7/23
</div>
<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>
<div class="row">
<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">
<thead>
<tr>
<th scope="col">{{ _("Account") }}</th>
<th scope="col">{{ _("Summary") }}</th>
<th class="amount" scope="col">{{ _("$") }}</th>
<th scope="col">{{ _("Account")|force_escape }}</th>
<th scope="col">{{ _("Summary")|force_escape }}</th>
<th class="amount" scope="col">{{ _("$")|force_escape }}</th>
</tr>
</thead>
<tbody>
@ -138,7 +138,7 @@ First written: 2020/7/23
</tbody>
<tfoot>
<tr>
<td colspan="2">{{ _("Total") }}</td>
<td colspan="2">{{ _("Total")|force_escape }}</td>
<td class="amount">{{ item.debit_total|accounting_amount }}</td>
</tr>
</tfoot>
@ -156,7 +156,7 @@ First written: 2020/7/23
{% endfor %}
<li class="list-group-item">
<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>
</div>
</li>
@ -164,14 +164,14 @@ First written: 2020/7/23
</div>
<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">
<thead>
<tr>
<th scope="col">{{ _("Account") }}</th>
<th scope="col">{{ _("Summary") }}</th>
<th class="amount" scope="col">{{ _("$") }}</th>
<th scope="col">{{ _("Account")|force_escape }}</th>
<th scope="col">{{ _("Summary")|force_escape }}</th>
<th class="amount" scope="col">{{ _("$")|force_escape }}</th>
</tr>
</thead>
<tbody>
@ -185,7 +185,7 @@ First written: 2020/7/23
</tbody>
<tfoot>
<tr>
<td colspan="2">{{ _("Total") }}</td>
<td colspan="2">{{ _("Total")|force_escape }}</td>
<td class="amount">{{ item.credit_total|accounting_amount }}</td>
</tr>
</tfoot>
@ -204,7 +204,7 @@ First written: 2020/7/23
{% endfor %}
<li class="list-group-item">
<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>
</div>
</li>
@ -214,28 +214,28 @@ First written: 2020/7/23
{% if item.notes %}
<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>
{% endif %}
<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>
<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>
<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>
<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>

View File

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