Removed the context from the translatable text messages in the accounting application, because it is not needed now.
This commit is contained in:
parent
518b49ee65
commit
86dfe993a4
@ -21,7 +21,7 @@
|
||||
import datetime
|
||||
import re
|
||||
|
||||
from django.utils.translation import pgettext
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
from .models import Transaction, Record, Account
|
||||
from mia_core.period import Period
|
||||
@ -124,8 +124,7 @@ class CashAccountConverter:
|
||||
if value == "0":
|
||||
return Account(
|
||||
code="0",
|
||||
title=pgettext(
|
||||
"Accounting|", "current assets and liabilities"),
|
||||
title=_("current assets and liabilities"),
|
||||
)
|
||||
try:
|
||||
account = Account.objects.get(code=value)
|
||||
|
@ -21,7 +21,7 @@
|
||||
import re
|
||||
|
||||
from django import forms
|
||||
from django.utils.translation import pgettext
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
from .models import Account, Record
|
||||
from .validators import validate_record_account_code, validate_record_id
|
||||
@ -37,27 +37,26 @@ class RecordForm(forms.Form):
|
||||
id = forms.IntegerField(
|
||||
required=False,
|
||||
error_messages={
|
||||
"invalid": pgettext("Accounting|", "This record is not valid."),
|
||||
"invalid": _("This record is not valid."),
|
||||
},
|
||||
validators=[validate_record_id])
|
||||
account = forms.CharField(
|
||||
error_messages={
|
||||
"required": pgettext("Accounting|", "Please select the account."),
|
||||
"required": _("Please select the account."),
|
||||
},
|
||||
validators=[validate_record_account_code])
|
||||
summary = forms.CharField(
|
||||
required=False,
|
||||
max_length=128,
|
||||
error_messages={
|
||||
"max_length": pgettext("Accounting|", "This summary is too long."),
|
||||
"max_length": _("This summary is too long."),
|
||||
})
|
||||
amount = forms.IntegerField(
|
||||
min_value=1,
|
||||
error_messages={
|
||||
"required": pgettext("Accounting|", "Please fill in the amount."),
|
||||
"invalid": pgettext("Accounting|", "Please fill in a number."),
|
||||
"min_value": pgettext(
|
||||
"Accounting|", "The amount must be at least 1."),
|
||||
"required": _("Please fill in the amount."),
|
||||
"invalid": _("Please fill in a number."),
|
||||
"min_value": _("The amount must be at least 1."),
|
||||
})
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
@ -108,8 +107,7 @@ class RecordForm(forms.Form):
|
||||
if self.transaction is None:
|
||||
if "id" in self.data:
|
||||
error = forms.ValidationError(
|
||||
pgettext("Accounting|",
|
||||
"This record is not for this transaction."),
|
||||
_("This record is not for this transaction."),
|
||||
code="not_belong")
|
||||
self.add_error("id", error)
|
||||
raise error
|
||||
@ -118,8 +116,7 @@ class RecordForm(forms.Form):
|
||||
record = Record.objects.get(pk=self.data["id"])
|
||||
if record.transaction.pk != self.transaction.pk:
|
||||
error = forms.ValidationError(
|
||||
pgettext("Accounting|",
|
||||
"This record is not for this transaction."),
|
||||
_("This record is not for this transaction."),
|
||||
code="not_belong")
|
||||
self.add_error("id", error)
|
||||
raise error
|
||||
@ -135,16 +132,14 @@ class RecordForm(forms.Form):
|
||||
if self.is_credit:
|
||||
if not re.match("^([123489]|7[1234])", self.data["account"]):
|
||||
error = forms.ValidationError(
|
||||
pgettext("Accounting|",
|
||||
"This account is not for credit records."),
|
||||
_("This account is not for credit records."),
|
||||
code="not_credit")
|
||||
self.add_error("account", error)
|
||||
raise error
|
||||
else:
|
||||
if not re.match("^([1235689]|7[5678])", self.data["account"]):
|
||||
error = forms.ValidationError(
|
||||
pgettext("Accounting|",
|
||||
"This account is not for debit records."),
|
||||
_("This account is not for debit records."),
|
||||
code="not_debit")
|
||||
self.add_error("account", error)
|
||||
raise error
|
||||
@ -164,13 +159,11 @@ class RecordForm(forms.Form):
|
||||
if record.is_credit != self.is_credit:
|
||||
if self.is_credit:
|
||||
error = forms.ValidationError(
|
||||
pgettext("Accounting|",
|
||||
"This record is not a credit record."),
|
||||
_("This record is not a credit record."),
|
||||
code="not_credit")
|
||||
else:
|
||||
error = forms.ValidationError(
|
||||
pgettext("Accounting|",
|
||||
"This record is not a debit record."),
|
||||
_("This record is not a debit record."),
|
||||
code="not_debit")
|
||||
self.add_error("id", error)
|
||||
raise error
|
||||
@ -188,13 +181,13 @@ class TransactionForm(forms.Form):
|
||||
date = forms.DateField(
|
||||
required=True,
|
||||
error_messages={
|
||||
"invalid": pgettext("Accounting|", "This date is not valid.")
|
||||
"invalid": _("This date is not valid.")
|
||||
})
|
||||
notes = forms.CharField(
|
||||
required=False,
|
||||
max_length=128,
|
||||
error_messages={
|
||||
"max_length": pgettext("Accounting|", "This notes is too long.")
|
||||
"max_length": _("This notes is too long.")
|
||||
})
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
@ -223,9 +216,8 @@ class TransactionForm(forms.Form):
|
||||
return
|
||||
if self.debit_total() == self.credit_total():
|
||||
return
|
||||
raise forms.ValidationError(pgettext(
|
||||
"Accounting|",
|
||||
"The total amount of debit and credit records are inconsistent."),
|
||||
raise forms.ValidationError(
|
||||
_("The total amount of debit and credit records are inconsistent."),
|
||||
code="balance")
|
||||
|
||||
def is_valid(self):
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -27,7 +27,7 @@ First written: 2020/7/20
|
||||
{% load accounting %}
|
||||
|
||||
{% block settings %}
|
||||
{% blocktrans asvar title with prep_period=period.prep_desc context "Accounting|" %}Balance Sheet {{ prep_period }}{% endblocktrans %}
|
||||
{% blocktrans asvar title with prep_period=period.prep_desc %}Balance Sheet {{ prep_period }}{% endblocktrans %}
|
||||
{% setvar "title" title %}
|
||||
{% setvar "use_period_chooser" True %}
|
||||
{% static "accounting/css/report.css" as file %}{% add_css file %}
|
||||
@ -39,26 +39,21 @@ First written: 2020/7/20
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fas fa-edit"></i>
|
||||
{% trans "New" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("New")|force_escape }}
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "expense" %}">
|
||||
{% trans "Cash Expense" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Expense")|force_escape }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "income" %}">
|
||||
{% trans "Cash Income" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Income")|force_escape }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "transfer" %}">
|
||||
{% trans "Transfer" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Transfer")|force_escape }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% with current_report_icon="fas fa-balance-scale" %}
|
||||
{% trans "Balance Sheet" context "Accounting|" as current_report_title %}
|
||||
{% with current_report_icon="fas fa-balance-scale" current_report_title=_("Balance Sheet") %}
|
||||
{% include "accounting/include/report-chooser.html" %}
|
||||
{% endwith %}
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#period-modal">
|
||||
@ -98,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>
|
||||
{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("View") }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@ -129,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>
|
||||
{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("View") }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@ -138,7 +133,7 @@ First written: 2020/7/20
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="total">
|
||||
<td>{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}</td>
|
||||
<td>{{ _("Total") }}</td>
|
||||
<td class="amount {% if liabilities.amount < 0 %} text-danger {% endif %}">
|
||||
{{ liabilities.amount|accounting_amount }}
|
||||
</td>
|
||||
@ -166,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>
|
||||
{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("View") }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@ -175,7 +170,7 @@ First written: 2020/7/20
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="total">
|
||||
<td>{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}</td>
|
||||
<td>{{ _("Total") }}</td>
|
||||
<td class="amount {% if owners_equity.amount < 0 %} text-danger {% endif %}">
|
||||
{{ owners_equity.amount|accounting_amount }}
|
||||
</td>
|
||||
@ -190,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">{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}</td>
|
||||
<td class="align-middle">{{ _("Total") }}</td>
|
||||
<td class="text-right align-middle font-italic {% if assets.amount < 0 %} text-danger {% endif %}">
|
||||
{{ assets.amount|accounting_amount }}
|
||||
</td>
|
||||
@ -203,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">{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}</td>
|
||||
<td class="align-middle">{{ _("Total") }}</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>
|
||||
@ -244,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">
|
||||
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Total") }}
|
||||
<span class="badge {% if assets.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">
|
||||
{{ assets.amount|accounting_amount }}
|
||||
</span>
|
||||
@ -275,7 +270,7 @@ First written: 2020/7/20
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center total">
|
||||
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Total") }}
|
||||
<span class="badge {% if liabilities.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">
|
||||
{{ liabilities.amount|accounting_amount }}
|
||||
</span>
|
||||
@ -304,7 +299,7 @@ First written: 2020/7/20
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center total">
|
||||
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Total") }}
|
||||
<span class="badge {% if owners_equity.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">
|
||||
{{ owners_equity.amount|accounting_amount }}
|
||||
</span>
|
||||
@ -313,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">
|
||||
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Total") }}
|
||||
<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>
|
||||
|
@ -27,7 +27,7 @@ First written: 2020/7/15
|
||||
{% load accounting %}
|
||||
|
||||
{% block settings %}
|
||||
{% blocktrans asvar title with account=account.title context "Accounting|" %}Cash Summary for {{ account }}{% endblocktrans %}
|
||||
{% blocktrans asvar title with account=account.title %}Cash Summary for {{ account }}{% endblocktrans %}
|
||||
{% setvar "title" title %}
|
||||
{% static "accounting/css/report.css" as file %}{% add_css file %}
|
||||
{% endblock %}
|
||||
@ -38,41 +38,36 @@ First written: 2020/7/15
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fas fa-edit"></i>
|
||||
{% trans "New" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("New")|force_escape }}
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "expense" %}">
|
||||
{% trans "Cash Expense" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Expense")|force_escape }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "income" %}">
|
||||
{% trans "Cash Income" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Income")|force_escape }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "transfer" %}">
|
||||
{% trans "Transfer" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Transfer")|force_escape }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% with current_report_icon="fas fa-money-bill-wave" %}
|
||||
{% trans "Cash Summary" context "Accounting|" as current_report_title %}
|
||||
{% with current_report_icon="fas fa-money-bill-wave" current_report_title=_("Cash Summary") %}
|
||||
{% include "accounting/include/report-chooser.html" %}
|
||||
{% endwith %}
|
||||
<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">{% trans "Account" context "Accounting|" as text %}{{ text|force_escape }}</span>
|
||||
<span class="d-md-none">{{ _("Account") }}</span>
|
||||
</button>
|
||||
<div class="dropdown-menu account-picker">
|
||||
<div class="dropdown-header">{% trans "Shortcuts" context "Accounting|Account|" as text %}{{ text|force_escape }}</div>
|
||||
<div class="dropdown-header">{{ _("Shortcuts") }}</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">{% trans "All" context "Accounting|Account|" as text %}{{ text|force_escape }}</div>
|
||||
<div class="dropdown-header">{{ _("All") }}</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 }}
|
||||
@ -89,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">{% trans "Month" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Income" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Expense" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Balance" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Cumulative Balance" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="actions" scope="col">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -109,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">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</span>
|
||||
<span class="d-none d-lg-inline">{{ _("View") }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
@ -27,7 +27,7 @@ First written: 2020/7/1
|
||||
{% load accounting %}
|
||||
|
||||
{% block settings %}
|
||||
{% blocktrans asvar title with account=account.title prep_period=period.prep_desc context "Accounting|" %}Cash Account for {{ account }} {{ prep_period }}{% endblocktrans %}
|
||||
{% blocktrans asvar title with account=account.title prep_period=period.prep_desc %}Cash Account for {{ account }} {{ prep_period }}{% endblocktrans %}
|
||||
{% setvar "title" title %}
|
||||
{% setvar "use_period_chooser" True %}
|
||||
{% static "accounting/css/report.css" as file %}{% add_css file %}
|
||||
@ -39,41 +39,36 @@ 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>
|
||||
{% trans "New" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("New") }}
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "expense" %}">
|
||||
{% trans "Cash Expense" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Expense") }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "income" %}">
|
||||
{% trans "Cash Income" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Income") }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "transfer" %}">
|
||||
{% trans "Transfer" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Transfer") }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% with current_report_icon="fas fa-money-bill-wave" %}
|
||||
{% trans "Cash Account" context "Accounting|" as current_report_title %}
|
||||
{% with current_report_icon="fas fa-money-bill-wave" current_report_title=_("Cash Account") %}
|
||||
{% include "accounting/include/report-chooser.html" %}
|
||||
{% endwith %}
|
||||
<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">{% trans "Account" context "Accounting|" as text %}{{ text|force_escape }}</span>
|
||||
<span class="d-md-none">{{ _("Account") }}</span>
|
||||
</button>
|
||||
<div class="dropdown-menu account-picker">
|
||||
<div class="dropdown-header">{% trans "Shortcuts" context "Accounting|Account|" as text %}{{ text|force_escape }}</div>
|
||||
<div class="dropdown-header">{{ _("Shortcuts") }}</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">{% trans "All" context "Accounting|Account|" as text %}{{ text|force_escape }}</div>
|
||||
<div class="dropdown-header">{{ _("All") }}</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 }}
|
||||
@ -97,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">{% trans "Date" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{% trans "Account" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{% trans "Summary" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Income" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Expense" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Balance" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="actions" scope="col">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -113,13 +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">
|
||||
{% trans "Unbalanced" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Unbalanced") }}
|
||||
</span>
|
||||
{% endif %}{% if item.has_order_hole %}
|
||||
<span class="badge badge-danger badge-pill">
|
||||
{% trans "Need Reorder" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Need Reorder") }}
|
||||
</span>
|
||||
{% endif %}</td>
|
||||
<td class="amount">{{ item.credit_amount|accounting_amount }}</td>
|
||||
@ -129,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">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</span>
|
||||
<span class="d-none d-lg-inline">{{ _("View") }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
@ -152,14 +145,12 @@ First written: 2020/7/1
|
||||
{{ item.summary|default:"" }}
|
||||
{% if not item.is_balanced %}
|
||||
<span class="badge badge-danger badge-pill">
|
||||
{% trans "Unbalanced" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Unbalanced") }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if item.has_order_hole %}
|
||||
<span class="badge badge-danger badge-pill">
|
||||
{% trans "Need Reorder" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Need Reorder") }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -30,22 +30,21 @@ First written: 2020/7/9
|
||||
|
||||
<!-- Modal Header -->
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{% trans "Search Accounting Records" context "Accounting|" as text %}{{ text|force_escape }}</h4>
|
||||
<h4 class="modal-title">{{ _("Search Accounting Records") }}</h4>
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
</div>
|
||||
|
||||
<!-- Modal body -->
|
||||
<div class="modal-body">
|
||||
<label for="accounting-query">{% trans "Search:" context "Accounting|" as text %}{{ text|force_escape }}</label>
|
||||
{% trans "e.g. Coffee" context "Accounting|" as text %}
|
||||
<input id="accounting-query" type="text" name="q" value="{% if request.resolver_match.url_name == "search" %}{{ request.GET.q }}{% endif %}" placeholder="{{ text|force_escape }}" required="required" />
|
||||
<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" />
|
||||
</div>
|
||||
|
||||
<!-- Modal footer -->
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-primary" type="submit">
|
||||
<i class="fas fa-search"></i>
|
||||
{% trans "Search" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Search") }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -60,58 +59,48 @@ First written: 2020/7/9
|
||||
<i class="{{ current_report_icon }}"></i>
|
||||
{{ current_report_title }}
|
||||
</span>
|
||||
<span class="d-md-none">{% trans "Book" context "Accounting|" as text %}{{ text|force_escape }}</span>
|
||||
<span class="d-md-none">{{ _("Book") }}</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>
|
||||
{% trans "Cash Account" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Account") }}
|
||||
</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>
|
||||
{% trans "Cash Summary" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Summary") }}
|
||||
</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>
|
||||
{% trans "Ledger" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Ledger") }}
|
||||
</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>
|
||||
{% trans "Ledger Summary" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Ledger Summary") }}
|
||||
</a>
|
||||
<a class="dropdown-item {% if request.resolver_match.url_name == "journal" %} active {% endif %}" href="{{ reports.journal }}">
|
||||
<i class="fas fa-book"></i>
|
||||
{% trans "Journal" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Journal") }}
|
||||
</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>
|
||||
{% trans "Trial Balance" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Trial Balance") }}
|
||||
</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>
|
||||
{% trans "Income Statement" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Income Statement") }}
|
||||
</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>
|
||||
{% trans "Balance Sheet" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Balance Sheet") }}
|
||||
</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>
|
||||
{% trans "Search" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Search") }}
|
||||
</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>
|
||||
{% trans "Accounts" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Accounts") }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -34,7 +34,7 @@ First written: 2020/4/3
|
||||
<h4 class="modal-title">
|
||||
<label for="summary-summary">
|
||||
<i class="fas fa-edit"></i>
|
||||
{% trans "Summary" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Summary") }}
|
||||
</label>
|
||||
</h4>
|
||||
<button type="button" class="close" data-dismiss="modal">×</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">{% trans "General" context "Accounting|Summary|" as text %}{{ text|force_escape }}</span>
|
||||
<span id="summary-tab-category" class="summary-tab nav-link active">{{ _("General") }}</span>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<span id="summary-tab-travel" class="summary-tab nav-link">{% trans "Travel" context "Accounting|Summary|" as text %}{{ text|force_escape }}</span>
|
||||
<span id="summary-tab-travel" class="summary-tab nav-link">{{ _("Travel") }}</span>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<span id="summary-tab-bus" class="summary-tab nav-link">{% trans "Bus" context "Accounting|Summary|" as text %}{{ text|force_escape }}</span>
|
||||
<span id="summary-tab-bus" class="summary-tab nav-link">{{ _("Bus") }}</span>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<span id="summary-tab-regular" class="summary-tab nav-link">{% trans "Regular" context "Accounting|Summary|" as text %}{{ text|force_escape }}</span>
|
||||
<span id="summary-tab-regular" class="summary-tab nav-link">{{ _("Regular") }}</span>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<span id="summary-tab-count" class="summary-tab nav-link">{% trans "Count" context "Accounting|Summary|" as text %}{{ text|force_escape }}</span>
|
||||
<span id="summary-tab-count" class="summary-tab nav-link">{{ _("Count") }}</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">{% trans "Category:" context "Accounting|Summary|" as text %}{{ text|force_escape }}</label>
|
||||
<label class="col-sm-2 col-form-label" for="summary-general-category">{{ _("Category:") }}</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">{% trans "Category:" context "Accounting|Summary|" as text %}{{ text|force_escape }}</label>
|
||||
<label class="col-sm-2 col-form-label" for="summary-travel-category">{{ _("Category:") }}</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">{% trans "From:" context "Accounting|Summary|" as text %}{{ text|force_escape }}</label>
|
||||
<label class="col-sm-2 col-form-label" for="summary-travel-from">{{ _("From:") }}</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">{% trans "Direction:" context "Accounting|Summary|" as text %}{{ text|force_escape }}</label>
|
||||
<label class="col-sm-2 col-form-label" for="summary-travel-direction">{{ _("Direction:") }}</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">{% trans "To:" context "Accounting|Summary|" as text %}{{ text|force_escape }}</label>
|
||||
<label class="col-sm-2 col-form-label" for="summary-travel-to">{{ _("To:") }}</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">{% trans "Category:" context "Accounting|Summary|" as text %}{{ text|force_escape }}</label>
|
||||
<label class="col-sm-2 col-form-label" for="summary-bus-category">{{ _("Category:") }}</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">{% trans "Route:" context "Accounting|Summary|" as text %}{{ text|force_escape }}</label>
|
||||
<label class="col-sm-2 col-form-label" for="summary-bus-route">{{ _("Route:") }}</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">{% trans "From:" context "Accounting|Summary|" as text %}{{ text|force_escape }}</label>
|
||||
<label class="col-sm-2 col-form-label" for="summary-bus-from">{{ _("From:") }}</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">{% trans "To:" context "Accounting|Summary|" as text %}{{ text|force_escape }}</label>
|
||||
<label class="col-sm-2 col-form-label" for="summary-bus-to">{{ _("To:") }}</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">{% trans "Count:" context "Accounting|Summary|" as text %}{{ text|force_escape }}</label>
|
||||
<label class="col-sm-2 col-form-label" for="summary-count">{{ _("Count:") }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input id="summary-count" class="form-control summary-helper-input" type="number" min="1" value="" />
|
||||
</div>
|
||||
|
@ -27,7 +27,7 @@ First written: 2020/7/19
|
||||
{% load accounting %}
|
||||
|
||||
{% block settings %}
|
||||
{% blocktrans asvar title with prep_period=period.prep_desc context "Accounting|" %}Income Statement {{ prep_period }}{% endblocktrans %}
|
||||
{% blocktrans asvar title with prep_period=period.prep_desc %}Income Statement {{ prep_period }}{% endblocktrans %}
|
||||
{% setvar "title" title %}
|
||||
{% setvar "use_period_chooser" True %}
|
||||
{% static "accounting/css/report.css" as file %}{% add_css file %}
|
||||
@ -39,26 +39,21 @@ First written: 2020/7/19
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fas fa-edit"></i>
|
||||
{% trans "New" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("New")|force_escape }}
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "expense" %}">
|
||||
{% trans "Cash Expense" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Expense")|force_escape }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "income" %}">
|
||||
{% trans "Cash Income" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Income")|force_escape }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "transfer" %}">
|
||||
{% trans "Transfer" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Transfer")|force_escape }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% with current_report_icon="fas fa-file-invoice" %}
|
||||
{% trans "Income Statement" context "Accounting|" as current_report_title %}
|
||||
{% with current_report_icon="fas fa-file-invoice" current_report_title=_("Income Statement") %}
|
||||
{% include "accounting/include/report-chooser.html" %}
|
||||
{% endwith %}
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#period-modal">
|
||||
@ -82,7 +77,7 @@ First written: 2020/7/19
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"></th>
|
||||
<th class="amount" colspan="2" scope="col">{% trans "Amount" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" colspan="2" scope="col">{{ _("Amount") }}</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -110,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">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</span>
|
||||
<span class="d-none d-lg-inline">{{ _("View") }}</span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr class="total">
|
||||
<td><div>{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}</div></td>
|
||||
<td><div>{{ _("Total") }}</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>
|
||||
@ -124,7 +119,7 @@ First written: 2020/7/19
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr class="total">
|
||||
<td><div>{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}</div></td>
|
||||
<td><div>{{ _("Total") }}</div></td>
|
||||
<td class="amount"></td>
|
||||
<td class="amount">-</td>
|
||||
<td class="actions"></td>
|
||||
@ -179,7 +174,7 @@ First written: 2020/7/19
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center total">
|
||||
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Total") }}
|
||||
<div class="float-right">
|
||||
<span class="badge {% if group.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">
|
||||
{{ group.amount|accounting_amount }}
|
||||
@ -189,7 +184,7 @@ First written: 2020/7/19
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center total">
|
||||
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Total") }}
|
||||
<div class="float-right">
|
||||
<span class="badge {% if group.amount < 0 %} badge-danger {% else %} badge-info {% endif %} badge-pill">-</span>
|
||||
</div>
|
||||
|
@ -27,7 +27,7 @@ First written: 2020/7/17
|
||||
{% load accounting %}
|
||||
|
||||
{% block settings %}
|
||||
{% blocktrans asvar title with prep_period=period.prep_desc context "Accounting|" %}Journal {{ prep_period }}{% endblocktrans %}
|
||||
{% blocktrans asvar title with prep_period=period.prep_desc %}Journal {{ prep_period }}{% endblocktrans %}
|
||||
{% setvar "title" title %}
|
||||
{% setvar "use_period_chooser" True %}
|
||||
{% static "accounting/css/report.css" as file %}{% add_css file %}
|
||||
@ -39,26 +39,21 @@ First written: 2020/7/17
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fas fa-edit"></i>
|
||||
{% trans "New" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("New")|force_escape }}
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "expense" %}">
|
||||
{% trans "Cash Expense" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Expense")|force_escape }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "income" %}">
|
||||
{% trans "Cash Income" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Income")|force_escape }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "transfer" %}">
|
||||
{% trans "Transfer" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Transfer")|force_escape }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% with current_report_icon="fas fa-book" %}
|
||||
{% trans "Journal" context "Accounting|" as current_report_title %}
|
||||
{% with current_report_icon="fas fa-book" current_report_title=_("Journal") %}
|
||||
{% include "accounting/include/report-chooser.html" %}
|
||||
{% endwith %}
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#period-modal">
|
||||
@ -77,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">{% trans "Date" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{% trans "Account" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{% trans "Summary" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Debit" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Credit" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{% trans "Notes" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="actions" scope="col">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -93,13 +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">
|
||||
{% trans "Unbalanced" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Unbalanced") }}
|
||||
</span>
|
||||
{% endif %}{% if item.has_order_hole %}
|
||||
<span class="badge badge-danger badge-pill">
|
||||
{% trans "Need Reorder" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Need Reorder") }}
|
||||
</span>
|
||||
{% endif %}</div></td>
|
||||
<td class="amount">{{ item.debit_amount|accounting_amount }}</td>
|
||||
@ -109,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>
|
||||
{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("View") }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
@ -133,14 +126,12 @@ First written: 2020/7/17
|
||||
{{ item.summary|default:"" }}
|
||||
{% if not item.is_balanced %}
|
||||
<span class="badge badge-danger badge-pill">
|
||||
{% trans "Unbalanced" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Unbalanced") }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if item.has_order_hole %}
|
||||
<span class="badge badge-danger badge-pill">
|
||||
{% trans "Need Reorder" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Need Reorder") }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
@ -170,8 +161,7 @@ First written: 2020/7/17
|
||||
{{ item.summary|default:"" }}
|
||||
{% if not item.is_balanced %}
|
||||
<span class="badge badge-danger badge-pill">
|
||||
{% trans "Unbalanced" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Unbalanced") }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -27,7 +27,7 @@ First written: 2020/7/16
|
||||
{% load accounting %}
|
||||
|
||||
{% block settings %}
|
||||
{% blocktrans asvar title with account=account.title context "Accounting|" %}Ledger Summary for {{ account }}{% endblocktrans %}
|
||||
{% blocktrans asvar title with account=account.title %}Ledger Summary for {{ account }}{% endblocktrans %}
|
||||
{% setvar "title" title %}
|
||||
{% static "accounting/css/report.css" as file %}{% add_css file %}
|
||||
{% endblock %}
|
||||
@ -38,32 +38,27 @@ First written: 2020/7/16
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fas fa-edit"></i>
|
||||
{% trans "New" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("New")|force_escape }}
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "expense" %}">
|
||||
{% trans "Cash Expense" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Expense")|force_escape }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "income" %}">
|
||||
{% trans "Cash Income" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Income")|force_escape }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "transfer" %}">
|
||||
{% trans "Transfer" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Transfer")|force_escape }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% with current_report_icon="fas fa-file-invoice-dollar" %}
|
||||
{% trans "Ledger Summary" context "Accounting|" as current_report_title %}
|
||||
{% with current_report_icon="fas fa-file-invoice-dollar" current_report_title=_("Ledger Summary") %}
|
||||
{% include "accounting/include/report-chooser.html" %}
|
||||
{% endwith %}
|
||||
<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">{% trans "Account" context "Accounting|" as text %}{{ text|force_escape }}</span>
|
||||
<span class="d-md-none">{{ _("Account") }}</span>
|
||||
</button>
|
||||
<div class="dropdown-menu account-picker">
|
||||
{% for x in accounts %}
|
||||
@ -82,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">{% trans "Month" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Debit" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Credit" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Balance" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Cumulative Balance" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="actions" scope="col">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -102,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">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</span>
|
||||
<span class="d-none d-lg-inline">{{ _("View") }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
@ -27,7 +27,7 @@ First written: 2020/7/16
|
||||
{% load accounting %}
|
||||
|
||||
{% block settings %}
|
||||
{% blocktrans asvar title with account=account.title prep_period=period.prep_desc context "Accounting|" %}Ledger for {{ account }} {{ prep_period }}{% endblocktrans %}
|
||||
{% blocktrans asvar title with account=account.title prep_period=period.prep_desc %}Ledger for {{ account }} {{ prep_period }}{% endblocktrans %}
|
||||
{% setvar "title" title %}
|
||||
{% setvar "use_period_chooser" True %}
|
||||
{% static "accounting/css/report.css" as file %}{% add_css file %}
|
||||
@ -39,32 +39,27 @@ First written: 2020/7/16
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fas fa-edit"></i>
|
||||
{% trans "New" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("New")|force_escape }}
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "expense" %}">
|
||||
{% trans "Cash Expense" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Expense")|force_escape }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "income" %}">
|
||||
{% trans "Cash Income" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Income")|force_escape }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "transfer" %}">
|
||||
{% trans "Transfer" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Transfer")|force_escape }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% with current_report_icon="fas fa-file-invoice-dollar" %}
|
||||
{% trans "Ledger" context "Accounting|" as current_report_title %}
|
||||
{% with current_report_icon="fas fa-file-invoice-dollar" current_report_title=_("Ledger") %}
|
||||
{% include "accounting/include/report-chooser.html" %}
|
||||
{% endwith %}
|
||||
<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">{% trans "Account" context "Accounting|" as text %}{{ text|force_escape }}</span>
|
||||
<span class="d-md-none">{{ _("Account") }}</span>
|
||||
</button>
|
||||
<div class="dropdown-menu account-picker">
|
||||
{% for x in accounts %}
|
||||
@ -90,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">{% trans "Date" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{% trans "Account" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{% trans "Summary" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Debit" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Credit" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Balance" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="actions" scope="col">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -106,23 +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">
|
||||
{% trans "Unbalanced" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Unbalanced") }}
|
||||
</span>
|
||||
{% endif %}{% if item.has_order_hole %}
|
||||
<span class="badge badge-danger badge-pill">
|
||||
{% trans "Need Reorder" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Need Reorder") }}
|
||||
</span>
|
||||
{% endif %}{% if not item.is_credit_card_paid %}
|
||||
<span class="badge badge-danger badge-pill">
|
||||
{% trans "Unpaid" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Unpaid") }}
|
||||
</span>
|
||||
{% endif %}{% if item.is_existing_equipment %}
|
||||
<span class="badge badge-info badge-pill">
|
||||
{% trans "Existing" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Existing") }}
|
||||
</span>
|
||||
{% endif %}</td>
|
||||
<td class="amount">{{ item.debit_amount|accounting_amount }}</td>
|
||||
@ -132,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">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</span>
|
||||
<span class="d-none d-lg-inline">{{ _("View") }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
@ -155,26 +146,22 @@ First written: 2020/7/16
|
||||
{{ item.summary|default:"" }}
|
||||
{% if not item.is_balanced %}
|
||||
<span class="badge badge-danger badge-pill">
|
||||
{% trans "Unbalanced" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Unbalanced") }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if item.has_order_hole %}
|
||||
<span class="badge badge-danger badge-pill">
|
||||
{% trans "Need Reorder" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Need Reorder") }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if not item.is_credit_card_paid %}
|
||||
<span class="badge badge-danger badge-pill">
|
||||
{% trans "Unpaid" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Unpaid") }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if item.is_existing_equipment %}
|
||||
<span class="badge badge-info badge-pill">
|
||||
{% trans "Existing" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Existing") }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -27,7 +27,7 @@ First written: 2020/7/21
|
||||
{% load accounting %}
|
||||
|
||||
{% block settings %}
|
||||
{% blocktrans asvar title with query=request.GET.q context "Accounting|" %}Search Result for “{{ query }}”{% endblocktrans %}
|
||||
{% blocktrans asvar title with query=request.GET.q %}Search Result for “{{ query }}”{% endblocktrans %}
|
||||
{% setvar "title" title %}
|
||||
{% setvar "use_period_chooser" True %}
|
||||
{% static "accounting/css/report.css" as file %}{% add_css file %}
|
||||
@ -39,26 +39,21 @@ First written: 2020/7/21
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fas fa-edit"></i>
|
||||
{% trans "New" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("New")|force_escape }}
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "expense" %}">
|
||||
{% trans "Cash Expense" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Expense")|force_escape }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "income" %}">
|
||||
{% trans "Cash Income" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Income")|force_escape }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "transfer" %}">
|
||||
{% trans "Transfer" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Transfer")|force_escape }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% with current_report_icon="fas fa-search" %}
|
||||
{% trans "Search" context "Accounting|" as current_report_title %}
|
||||
{% with current_report_icon="fas fa-search" current_report_title=_("Search") %}
|
||||
{% include "accounting/include/report-chooser.html" %}
|
||||
{% endwith %}
|
||||
<form class="btn btn-primary input-group" action="{% url "accounting:search" %}" method="get">
|
||||
@ -66,8 +61,7 @@ First written: 2020/7/21
|
||||
<label for="search-input" class="search-label">
|
||||
<button type="submit">
|
||||
<i class="fas fa-search"></i>
|
||||
{% trans "Search" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Search") }}
|
||||
</button>
|
||||
</label>
|
||||
</form>
|
||||
@ -80,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">{% trans "Date" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{% trans "Account" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{% trans "Summary" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Debit" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Credit" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{% trans "Notes" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="actions" scope="col">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -96,13 +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">
|
||||
{% trans "Unbalanced" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Unbalanced") }}
|
||||
</span>
|
||||
{% endif %}{% if item.has_order_hole %}
|
||||
<span class="badge badge-danger badge-pill">
|
||||
{% trans "Need Reorder" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Need Reorder") }}
|
||||
</span>
|
||||
{% endif %}</div></td>
|
||||
<td class="amount">{{ item.debit_amount|accounting_amount }}</td>
|
||||
@ -111,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>
|
||||
{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("View") }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@ -133,14 +125,12 @@ First written: 2020/7/21
|
||||
{{ item.summary|default:"" }}
|
||||
{% if not item.is_balanced %}
|
||||
<span class="badge badge-danger badge-pill">
|
||||
{% trans "Unbalanced" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Unbalanced") }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if item.has_order_hole %}
|
||||
<span class="badge badge-danger badge-pill">
|
||||
{% trans "Need Reorder" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Need Reorder") }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -25,8 +25,7 @@ First written: 2020/7/23
|
||||
{% load mia_core %}
|
||||
|
||||
{% block settings %}
|
||||
{% trans "Cash Expense Transaction" context "Accounting|" as title %}
|
||||
{% setvar "title" title %}
|
||||
{% setvar "title" _("Cash Expense Transaction") %}
|
||||
{% setvar "use_jqueryui" True %}
|
||||
{% static "accounting/css/transactions.css" as file %}{% add_css file %}
|
||||
{% static "accounting/css/summary-helper.css" as file %}{% add_css file %}
|
||||
@ -55,7 +54,7 @@ First written: 2020/7/23
|
||||
{% csrf_token %}
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-2">
|
||||
<label for="txn-date">{% trans "Date:" context "Accounting|" as text %}{{ text|force_escape }}</label>
|
||||
<label for="txn-date">{{ _("Date:") }}</label>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<input id="txn-date" class="form-control {% if item.date.errors %} is-invalid {% endif %}" type="date" name="date" value="{{ item.date.value }}" required="required" />
|
||||
@ -80,7 +79,7 @@ First written: 2020/7/23
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Total") }}
|
||||
<span id="debit-total" class="amount">{{ item.debit_total }}</span>
|
||||
</div>
|
||||
</li>
|
||||
@ -90,7 +89,7 @@ First written: 2020/7/23
|
||||
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-2">
|
||||
<label for="txn-note">{% trans "Notes:" context "Accounting|" as text %}{{ text|force_escape }}</label>
|
||||
<label for="txn-note">{{ _("Notes:") }}</label>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="txn-note" class="form-control {% if item.notes.errors %} is-invalid {% endif %}" name="notes">{{ item.notes.value|default:"" }}</textarea>
|
||||
@ -102,7 +101,7 @@ First written: 2020/7/23
|
||||
<div class="col-sm-12">
|
||||
<button class="btn btn-primary" type="submit">
|
||||
<i class="fas fa-save"></i>
|
||||
{% trans "Save" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Save") }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -26,8 +26,7 @@ First written: 2020/7/23
|
||||
{% load accounting %}
|
||||
|
||||
{% block settings %}
|
||||
{% trans "Cash Expense Transaction" context "Accounting|" as title %}
|
||||
{% setvar "title" title %}
|
||||
{% setvar "title" _("Cash Expense Transaction") %}
|
||||
{% static "accounting/css/transactions.css" as file %}{% add_css file %}
|
||||
{% endblock %}
|
||||
|
||||
@ -36,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">×</button>
|
||||
<strong>{{ _("Error:") }}</strong> {% trans "The transactions on this day are not well-ordered. Please reorder them." context "Accounting|" as text %}{{ text|force_escape }}
|
||||
<strong>{{ _("Error:") }}</strong> {{ _("The transactions on this day are not well-ordered. Please reorder them.") }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@ -50,12 +49,12 @@ First written: 2020/7/23
|
||||
|
||||
<!-- Modal Header -->
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{% trans "Cash Expense Transaction Deletion Confirmation" context "Accounting|" as text %}{{ text|force_escape }}</h4>
|
||||
<h4 class="modal-title">{{ _("Cash Expense Transaction Deletion Confirmation") }}</h4>
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
</div>
|
||||
|
||||
<!-- Modal body -->
|
||||
<div class="modal-body">{% trans "Do you really want to delete this cash expense transaction?" context "Accounting|" as text %}{{ text|force_escape }}</div>
|
||||
<div class="modal-body">{{ _("Do you really want to delete this cash expense transaction?") }}</div>
|
||||
|
||||
<!-- Modal footer -->
|
||||
<div class="modal-footer">
|
||||
@ -77,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="{% trans "There is no other transaction at the same day." context "Accounting|" as text %}{{ text|force_escape }}">
|
||||
<button type="button" class="btn btn-secondary d-none d-sm-inline" disabled="disabled" title="{{ _("There is no other transaction at the same day.") }}">
|
||||
<i class="fas fa-sort"></i>
|
||||
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
|
||||
</button>
|
||||
@ -97,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="{% trans "There is no other transaction at the same day." context "Accounting|" as text %}{{ text|force_escape }}">
|
||||
<span class="dropdown-item disabled" title="{{ _("There is no other transaction at the same day.") }}">
|
||||
<i class="fas fa-sort"></i>
|
||||
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
|
||||
</span>
|
||||
@ -120,16 +119,16 @@ First written: 2020/7/23
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-2">{% trans "Date:" context "Accounting|" as text %}{{ text|force_escape }}</div>
|
||||
<div class="col-sm-2">{{ _("Date:") }}</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">{% trans "Account" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{% trans "Summary" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "$" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{{ _("Account") }}</th>
|
||||
<th scope="col">{{ _("Summary") }}</th>
|
||||
<th class="amount" scope="col">{{ _("$") }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -143,7 +142,7 @@ First written: 2020/7/23
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}</td>
|
||||
<td colspan="2">{{ _("Total") }}</td>
|
||||
<td class="amount">{{ item.debit_total|accounting_amount }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@ -161,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">
|
||||
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Total") }}
|
||||
<span class="badge badge-info">{{ item.debit_total|accounting_amount }}</span>
|
||||
</div>
|
||||
</li>
|
||||
@ -169,7 +168,7 @@ First written: 2020/7/23
|
||||
|
||||
{% if item.notes %}
|
||||
<div class="row">
|
||||
<div class="col-sm-2">{% trans "Notes:" context "Accounting|" as text %}{{ text|force_escape }}</div>
|
||||
<div class="col-sm-2">{{ _("Notes:") }}</div>
|
||||
<div class="col-sm-10">{{ item.notes }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -25,8 +25,7 @@ First written: 2020/7/23
|
||||
{% load mia_core %}
|
||||
|
||||
{% block settings %}
|
||||
{% trans "Cash Income Transaction" context "Accounting|" as title %}
|
||||
{% setvar "title" title %}
|
||||
{% setvar "title" _("Cash Income Transaction") %}
|
||||
{% setvar "use_jqueryui" True %}
|
||||
{% static "accounting/css/transactions.css" as file %}{% add_css file %}
|
||||
{% static "accounting/css/summary-helper.css" as file %}{% add_css file %}
|
||||
@ -55,7 +54,7 @@ First written: 2020/7/23
|
||||
{% csrf_token %}
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-2">
|
||||
<label for="txn-date">{% trans "Date:" context "Accounting|" as text %}{{ text|force_escape }}</label>
|
||||
<label for="txn-date">{{ _("Date:") }}</label>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<input id="txn-date" class="form-control {% if item.date.errors %} is-invalid {% endif %}" type="date" name="date" value="{{ item.date.value }}" required="required" />
|
||||
@ -80,7 +79,7 @@ First written: 2020/7/23
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Total") }}
|
||||
<span id="credit-total" class="amount">{{ item.credit_total }}</span>
|
||||
</div>
|
||||
</li>
|
||||
@ -90,7 +89,7 @@ First written: 2020/7/23
|
||||
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-2">
|
||||
<label for="txn-note">{% trans "Notes:" context "Accounting|" as text %}{{ text|force_escape }}</label>
|
||||
<label for="txn-note">{{ _("Notes:") }}</label>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="txn-note" class="form-control {% if item.notes.errors %} is-invalid {% endif %}" name="notes">{{ item.notes.value|default:"" }}</textarea>
|
||||
@ -102,7 +101,7 @@ First written: 2020/7/23
|
||||
<div class="col-sm-12">
|
||||
<button class="btn btn-primary" type="submit">
|
||||
<i class="fas fa-save"></i>
|
||||
{% trans "Save" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Save") }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -26,8 +26,7 @@ First written: 2020/7/23
|
||||
{% load accounting %}
|
||||
|
||||
{% block settings %}
|
||||
{% trans "Cash Income Transaction" context "Accounting|" as title %}
|
||||
{% setvar "title" title %}
|
||||
{% setvar "title" _("Cash Income Transaction") %}
|
||||
{% static "accounting/css/transactions.css" as file %}{% add_css file %}
|
||||
{% endblock %}
|
||||
|
||||
@ -36,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">×</button>
|
||||
<strong>{{ _("Error:") }}</strong> {% trans "The transactions on this day are not well-ordered. Please reorder them." context "Accounting|" as text %}{{ text|force_escape }}
|
||||
<strong>{{ _("Error:") }}</strong> {{ _("The transactions on this day are not well-ordered. Please reorder them.") }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@ -50,12 +49,12 @@ First written: 2020/7/23
|
||||
|
||||
<!-- Modal Header -->
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{% trans "Cash Income Transaction Deletion Confirmation" context "Accounting|" as text %}{{ text|force_escape }}</h4>
|
||||
<h4 class="modal-title">{{ _("Cash Income Transaction Deletion Confirmation") }}</h4>
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
</div>
|
||||
|
||||
<!-- Modal body -->
|
||||
<div class="modal-body">{% trans "Do you really want to delete this cash income transaction?" context "Accounting|" as text %}{{ text|force_escape }}</div>
|
||||
<div class="modal-body">{{ _("Do you really want to delete this cash income transaction?") }}</div>
|
||||
|
||||
<!-- Modal footer -->
|
||||
<div class="modal-footer">
|
||||
@ -77,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="{% trans "There is no other transaction at the same day." context "Accounting|" as text %}{{ text|force_escape }}">
|
||||
<button type="button" class="btn btn-secondary d-none d-sm-inline" disabled="disabled" title="{{ _("There is no other transaction at the same day.") }}">
|
||||
<i class="fas fa-sort"></i>
|
||||
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
|
||||
</button>
|
||||
@ -97,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="{% trans "There is no other transaction at the same day." context "Accounting|" as text %}{{ text|force_escape }}">
|
||||
<span class="dropdown-item disabled" title="{{ _("There is no other transaction at the same day.") }}">
|
||||
<i class="fas fa-sort"></i>
|
||||
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
|
||||
</span>
|
||||
@ -120,16 +119,16 @@ First written: 2020/7/23
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-2">{% trans "Date:" context "Accounting|" as text %}{{ text|force_escape }}</div>
|
||||
<div class="col-sm-2">{{ _("Date:") }}</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">{% trans "Account" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{% trans "Summary" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "$" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{{ _("Account") }}</th>
|
||||
<th scope="col">{{ _("Summary") }}</th>
|
||||
<th class="amount" scope="col">{{ _("$") }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -143,7 +142,7 @@ First written: 2020/7/23
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}</td>
|
||||
<td colspan="2">{{ _("Total") }}</td>
|
||||
<td class="amount">{{ item.credit_total|accounting_amount }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@ -161,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">
|
||||
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Total") }}
|
||||
<span class="badge badge-info">{{ item.credit_total|accounting_amount }}</span>
|
||||
</div>
|
||||
</li>
|
||||
@ -169,7 +168,7 @@ First written: 2020/7/23
|
||||
|
||||
{% if item.notes %}
|
||||
<div class="row">
|
||||
<div class="col-sm-2">{% trans "Notes:" context "Accounting|" as text %}{{ text|force_escape }}</div>
|
||||
<div class="col-sm-2">{{ _("Notes:") }}</div>
|
||||
<div class="col-sm-10">{{ item.notes }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -25,8 +25,7 @@ First written: 2020/7/23
|
||||
{% load mia_core %}
|
||||
|
||||
{% block settings %}
|
||||
{% trans "Transfer Transaction" context "Accounting|" as title %}
|
||||
{% setvar "title" title %}
|
||||
{% setvar "title" _("Transfer Transaction") %}
|
||||
{% setvar "use_jqueryui" True %}
|
||||
{% static "accounting/css/transactions.css" as file %}{% add_css file %}
|
||||
{% static "accounting/css/summary-helper.css" as file %}{% add_css file %}
|
||||
@ -55,7 +54,7 @@ First written: 2020/7/23
|
||||
{% csrf_token %}
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-2">
|
||||
<label for="txn-date">{% trans "Date:" context "Accounting|" as text %}{{ text|force_escape }}</label>
|
||||
<label for="txn-date">{{ _("Date:") }}</label>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<input id="txn-date" class="form-control {% if item.date.errors %} is-invalid {% endif %}" type="date" name="date" value="{{ item.date.value }}" required="required" />
|
||||
@ -65,7 +64,7 @@ First written: 2020/7/23
|
||||
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-6">
|
||||
<h2>{% trans "Debit" context "Accounting|" as text %}{{ text|force_escape }}</h2>
|
||||
<h2>{{ _("Debit") }}</h2>
|
||||
|
||||
<ul id="debit-records" class="list-group">
|
||||
{% for record in item.debit_records %}
|
||||
@ -82,7 +81,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 item.balance_error %} is-invalid {% endif %} balance-row">
|
||||
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Total") }}
|
||||
<span id="debit-total" class="amount">{{ item.debit_total }}</span>
|
||||
</div>
|
||||
<div id="debit-total-error" class="invalid-feedback balance-error">{{ item.balance_error|default:"" }}</div>
|
||||
@ -91,7 +90,7 @@ First written: 2020/7/23
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<h2>{% trans "Credit" context "Accounting|" as text %}{{ text|force_escape }}</h2>
|
||||
<h2>{{ _("Credit") }}</h2>
|
||||
|
||||
<ul id="credit-records" class="list-group">
|
||||
{% for record in item.credit_records %}
|
||||
@ -108,7 +107,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 item.balance_error %} is-invalid {% endif %} balance-row">
|
||||
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Total") }}
|
||||
<span id="credit-total" class="amount">{{ item.credit_total }}</span>
|
||||
</div>
|
||||
<div id="credit-total-error" class="invalid-feedback balance-error">{{ item.balance_error|default:"" }}</div>
|
||||
@ -119,7 +118,7 @@ First written: 2020/7/23
|
||||
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-2">
|
||||
<label for="txn-note">{% trans "Notes:" context "Accounting|" as text %}{{ text|force_escape }}</label>
|
||||
<label for="txn-note">{{ _("Notes:") }}</label>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="txn-note" class="form-control {% if item.notes.errors %} is-invalid {% endif %}" name="notes">{{ item.notes.value|default:"" }}</textarea>
|
||||
@ -131,7 +130,7 @@ First written: 2020/7/23
|
||||
<div class="col-sm-12">
|
||||
<button class="btn btn-primary" type="submit">
|
||||
<i class="fas fa-save"></i>
|
||||
{% trans "Save" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Save") }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -26,8 +26,7 @@ First written: 2020/7/23
|
||||
{% load accounting %}
|
||||
|
||||
{% block settings %}
|
||||
{% trans "Transfer Transaction" context "Accounting|" as title %}
|
||||
{% setvar "title" title %}
|
||||
{% setvar "title" _("Transfer Transaction") %}
|
||||
{% static "accounting/css/transactions.css" as file %}{% add_css file %}
|
||||
{% endblock %}
|
||||
|
||||
@ -36,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">×</button>
|
||||
<strong>{{ _("Error:") }}</strong> {% trans "The transactions on this day are not well-ordered. Please reorder them." context "Accounting|" as text %}{{ text|force_escape }}
|
||||
<strong>{{ _("Error:") }}</strong> {{ _("The transactions on this day are not well-ordered. Please reorder them.") }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@ -50,12 +49,12 @@ First written: 2020/7/23
|
||||
|
||||
<!-- Modal Header -->
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{% trans "Transfer Transaction Deletion Confirmation" context "Accounting|" as text %}{{ text|force_escape }}</h4>
|
||||
<h4 class="modal-title">{{ _("Transfer Transaction Deletion Confirmation") }}</h4>
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
</div>
|
||||
|
||||
<!-- Modal body -->
|
||||
<div class="modal-body">{% trans "Do you really want to delete this transfer transaction?" context "Accounting|" as text %}{{ text|force_escape }}</div>
|
||||
<div class="modal-body">{{ _("Do you really want to delete this transfer transaction?") }}</div>
|
||||
|
||||
<!-- Modal footer -->
|
||||
<div class="modal-footer">
|
||||
@ -77,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="{% trans "There is no other transaction at the same day." context "Accounting|" as text %}{{ text|force_escape }}">
|
||||
<button type="button" class="btn btn-secondary d-none d-sm-inline" disabled="disabled" title="{{ _("There is no other transaction at the same day.") }}">
|
||||
<i class="fas fa-sort"></i>
|
||||
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
|
||||
</button>
|
||||
@ -93,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="{% trans "There is no other transaction at the same day." context "Accounting|" as text %}{{ text|force_escape }}">
|
||||
<span class="dropdown-item disabled" title="{{ _("There is no other transaction at the same day.") }}">
|
||||
<i class="fas fa-sort"></i>
|
||||
{% trans "Sort" context "Navigation|" as text %}{{ text|force_escape }}
|
||||
</span>
|
||||
@ -112,20 +111,20 @@ First written: 2020/7/23
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-2">{% trans "Date:" context "Accounting|" as text %}{{ text|force_escape }}</div>
|
||||
<div class="col-sm-2">{{ _("Date:") }}</div>
|
||||
<div class="col-sm-10">{{ item.date|smart_date }}</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<h2>{% trans "Debit" context "Accounting|" as text %}{{ text|force_escape }}</h2>
|
||||
<h2>{{ _("Debit") }}</h2>
|
||||
|
||||
<table class="table table-striped table-hover d-none d-lg-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{% trans "Account" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{% trans "Summary" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "$" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{{ _("Account") }}</th>
|
||||
<th scope="col">{{ _("Summary") }}</th>
|
||||
<th class="amount" scope="col">{{ _("$") }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -139,7 +138,7 @@ First written: 2020/7/23
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}</td>
|
||||
<td colspan="2">{{ _("Total") }}</td>
|
||||
<td class="amount">{{ item.debit_total|accounting_amount }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@ -157,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">
|
||||
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Total") }}
|
||||
<span class="badge badge-info">{{ item.debit_total|accounting_amount }}</span>
|
||||
</div>
|
||||
</li>
|
||||
@ -165,14 +164,14 @@ First written: 2020/7/23
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<h2>{% trans "Credit" context "Accounting|" as text %}{{ text|force_escape }}</h2>
|
||||
<h2>{{ _("Credit") }}</h2>
|
||||
|
||||
<table class="table table-striped table-hover d-none d-lg-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{% trans "Account" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{% trans "Summary" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "$" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th scope="col">{{ _("Account") }}</th>
|
||||
<th scope="col">{{ _("Summary") }}</th>
|
||||
<th class="amount" scope="col">{{ _("$") }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -186,7 +185,7 @@ First written: 2020/7/23
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}</td>
|
||||
<td colspan="2">{{ _("Total") }}</td>
|
||||
<td class="amount">{{ item.credit_total|accounting_amount }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@ -205,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">
|
||||
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Total") }}
|
||||
<span class="badge badge-info">{{ item.credit_total|accounting_amount }}</span>
|
||||
</div>
|
||||
</li>
|
||||
@ -215,7 +214,7 @@ First written: 2020/7/23
|
||||
|
||||
{% if item.notes %}
|
||||
<div class="row">
|
||||
<div class="col-sm-2">{% trans "Notes:" context "Accounting|" as text %}{{ text|force_escape }}</div>
|
||||
<div class="col-sm-2">{{ _("Notes:") }}</div>
|
||||
<div class="col-sm-10">{{ item.notes }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -27,7 +27,7 @@ First written: 2020/7/19
|
||||
{% load accounting %}
|
||||
|
||||
{% block settings %}
|
||||
{% blocktrans asvar title with prep_period=period.prep_desc context "Accounting|" %}Trial Balance {{ prep_period }}{% endblocktrans %}
|
||||
{% blocktrans asvar title with prep_period=period.prep_desc %}Trial Balance {{ prep_period }}{% endblocktrans %}
|
||||
{% setvar "title" title %}
|
||||
{% setvar "use_period_chooser" True %}
|
||||
{% static "accounting/css/report.css" as file %}{% add_css file %}
|
||||
@ -39,26 +39,21 @@ First written: 2020/7/19
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fas fa-edit"></i>
|
||||
{% trans "New" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("New")|force_escape }}
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "expense" %}">
|
||||
{% trans "Cash Expense" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Expense")|force_escape }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "income" %}">
|
||||
{% trans "Cash Income" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Cash Income")|force_escape }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url_with_return "accounting:transactions.create" "transfer" %}">
|
||||
{% trans "Transfer" context "Accounting|" as text %}
|
||||
{{ text|force_escape }}
|
||||
{{ _("Transfer")|force_escape }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% with current_report_icon="fas fa-balance-scale-right" %}
|
||||
{% trans "Trial Balance" context "Accounting|" as current_report_title %}
|
||||
{% with current_report_icon="fas fa-balance-scale-right" current_report_title=_("Trial Balance") %}
|
||||
{% include "accounting/include/report-chooser.html" %}
|
||||
{% endwith %}
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#period-modal">
|
||||
@ -84,10 +79,10 @@ First written: 2020/7/19
|
||||
<table class="table table-borderless table-hover trial-balance-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{% trans "Account" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Debit" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="amount" scope="col">{% trans "Credit" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<th class="actions" scope="col">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -99,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">{% trans "View" context "Accounting|" as text %}{{ text|force_escape }}</span>
|
||||
<span class="d-none d-lg-inline">{{ _("View") }}</span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@ -107,7 +102,7 @@ First written: 2020/7/19
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td>{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}</td>
|
||||
<td>{{ _("Total") }}</td>
|
||||
<td class="amount">{{ total_item.debit_amount|accounting_amount }}</td>
|
||||
<td class="amount">{{ total_item.credit_amount|accounting_amount }}</td>
|
||||
<td></td>
|
||||
@ -147,7 +142,7 @@ First written: 2020/7/19
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center total">
|
||||
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
|
||||
{{ _("Total") }}
|
||||
<div>
|
||||
<span class="badge badge-success badge-pill">
|
||||
{{ total_item.debit_amount|intcomma:False }}
|
||||
|
@ -29,7 +29,7 @@ from django.db.models import Q, Sum, Case, When, F, Count, Max, Min, Value, \
|
||||
from django.db.models.functions import StrIndex, Left
|
||||
from django.urls import reverse
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import pgettext
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
from .forms import TransactionForm, RecordForm
|
||||
from .models import Account, Transaction, Record
|
||||
@ -258,8 +258,7 @@ def get_cash_accounts():
|
||||
.order_by("code"))
|
||||
accounts.insert(0, Account(
|
||||
code="0",
|
||||
title=pgettext(
|
||||
"Accounting|", "current assets and liabilities"),
|
||||
title=_("current assets and liabilities"),
|
||||
))
|
||||
return accounts
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
"""
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.db.models import Q
|
||||
from django.utils.translation import pgettext
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
from .models import Account, Record
|
||||
|
||||
@ -37,9 +37,8 @@ def validate_record_id(value):
|
||||
try:
|
||||
Record.objects.get(pk=value)
|
||||
except Record.DoesNotExist:
|
||||
raise ValidationError(
|
||||
pgettext("Accounting|", "This record does not exists."),
|
||||
code="not_exist")
|
||||
raise ValidationError(_("This record does not exists."),
|
||||
code="not_exist")
|
||||
|
||||
|
||||
def validate_record_account_code(value):
|
||||
@ -54,14 +53,12 @@ def validate_record_account_code(value):
|
||||
try:
|
||||
Account.objects.get(code=value)
|
||||
except Account.DoesNotExist:
|
||||
raise ValidationError(
|
||||
pgettext("Accounting|", "This account does not exist."),
|
||||
code="not_exist")
|
||||
raise ValidationError(_("This account does not exist."),
|
||||
code="not_exist")
|
||||
child = Account.objects.filter(
|
||||
Q(code__startswith=value),
|
||||
~Q(code=value),
|
||||
).first()
|
||||
if child is not None:
|
||||
raise ValidationError(
|
||||
pgettext("Accounting|", "You cannot select a parent account."),
|
||||
code="parent_account")
|
||||
raise ValidationError(_("You cannot select a parent account."),
|
||||
code="parent_account")
|
||||
|
@ -31,7 +31,7 @@ from django.template.loader import render_to_string
|
||||
from django.urls import reverse
|
||||
from django.utils import timezone
|
||||
from django.utils.decorators import method_decorator
|
||||
from django.utils.translation import pgettext, gettext_noop
|
||||
from django.utils.translation import gettext as _, gettext_noop
|
||||
from django.views.decorators.http import require_GET, require_POST
|
||||
from django.views.generic import RedirectView
|
||||
|
||||
@ -133,7 +133,7 @@ def cash(request, account, period):
|
||||
if len(records) > 0
|
||||
else Transaction(date=timezone.localdate())),
|
||||
account=account,
|
||||
summary=pgettext("Accounting|", "Total"),
|
||||
summary=_("Total"),
|
||||
)
|
||||
record_sum.balance = balance
|
||||
record_sum.credit_amount = sum([
|
||||
@ -248,7 +248,7 @@ def cash_summary(request, account):
|
||||
cumulative_balance = cumulative_balance + month.balance
|
||||
month.cumulative_balance = cumulative_balance
|
||||
months.append(MonthlySummary(
|
||||
label=pgettext("Accounting|", "Total"),
|
||||
label=_("Total"),
|
||||
credit=sum([x.credit for x in months]),
|
||||
debit=sum([x.debit for x in months]),
|
||||
balance=sum([x.balance for x in months]),
|
||||
@ -319,7 +319,7 @@ def ledger(request, account, period):
|
||||
record_brought_forward = Record(
|
||||
transaction=Transaction(date=period.start),
|
||||
account=account,
|
||||
summary=pgettext("Accounting|", "Brought Forward"),
|
||||
summary=_("Brought Forward"),
|
||||
is_credit=balance < 0,
|
||||
amount=abs(balance),
|
||||
)
|
||||
@ -396,7 +396,7 @@ def ledger_summary(request, account):
|
||||
cumulative_balance = cumulative_balance + month.balance
|
||||
month.cumulative_balance = cumulative_balance
|
||||
months.append(MonthlySummary(
|
||||
label=pgettext("Accounting|", "Total"),
|
||||
label=_("Total"),
|
||||
credit=sum([x.credit for x in months]),
|
||||
debit=sum([x.debit for x in months]),
|
||||
balance=sum([x.balance for x in months]),
|
||||
@ -591,7 +591,7 @@ def trial_balance(request, period):
|
||||
accounts = nominal + real
|
||||
accounts.sort(key=lambda x: x.code)
|
||||
total_account = Account()
|
||||
total_account.title = pgettext("Accounting|", "Total")
|
||||
total_account.title = _("Total")
|
||||
total_account.debit_amount = sum([x.debit_amount for x in accounts
|
||||
if x.debit_amount is not None])
|
||||
total_account.credit_amount = sum([x.credit_amount for x in accounts
|
||||
@ -649,10 +649,10 @@ def income_statement(request, period):
|
||||
Q(code="4") | Q(code="5") | Q(code="6")
|
||||
| Q(code="7") | Q(code="8") | Q(code="9")).order_by("code"))
|
||||
cumulative_accounts = {
|
||||
"5": Account(title=pgettext("Accounting|", "Gross Income")),
|
||||
"6": Account(title=pgettext("Accounting|", "Operating Income")),
|
||||
"7": Account(title=pgettext("Accounting|", "Before Tax Income")),
|
||||
"8": Account(title=pgettext("Accounting|", "After Tax Income")),
|
||||
"5": Account(title=_("Gross Income")),
|
||||
"6": Account(title=_("Operating Income")),
|
||||
"7": Account(title=_("Before Tax Income")),
|
||||
"8": Account(title=_("After Tax Income")),
|
||||
"9": Account.objects.get(code=Account.NET_CHANGE),
|
||||
}
|
||||
cumulative_total = 0
|
||||
@ -1011,13 +1011,12 @@ def account_options(request):
|
||||
x.is_for_debit = re.match("^([1235689]|7[5678])", x.code) is not None
|
||||
x.is_for_credit = re.match("^([123489]|7[1234])", x.code) is not None
|
||||
data = {
|
||||
"header_in_use": pgettext("Accounting|", "---Accounts In Use---"),
|
||||
"header_in_use": _("---Accounts In Use---"),
|
||||
"debit_in_use": [x.option_data for x in accounts
|
||||
if x.is_for_debit and x.is_in_use],
|
||||
"credit_in_use": [x.option_data for x in accounts
|
||||
if x.is_for_credit and x.is_in_use],
|
||||
"header_not_in_use": pgettext(
|
||||
"Accounting|", "---Accounts Not In Use---"),
|
||||
"header_not_in_use": _("---Accounts Not In Use---"),
|
||||
"debit_not_in_use": [x.option_data for x in accounts
|
||||
if x.is_for_debit and not x.is_in_use],
|
||||
"credit_not_in_use": [x.option_data for x in accounts
|
||||
|
@ -7,8 +7,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mia 1.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-08-06 00:00+0800\n"
|
||||
"PO-Revision-Date: 2020-08-05 23:59+0800\n"
|
||||
"POT-Creation-Date: 2020-08-06 00:39+0800\n"
|
||||
"PO-Revision-Date: 2020-08-06 00:40+0800\n"
|
||||
"Last-Translator: imacat <imacat@mail.imacat.idv.tw>\n"
|
||||
"Language-Team: Traditional Chinese <imacat@mail.imacat.idv.tw>\n"
|
||||
"Language: Traditional Chinese\n"
|
||||
|
Loading…
Reference in New Issue
Block a user