Replaced "Need offset" with "Needs Offset" as the text of the badge.

This commit is contained in:
依瑪貓 2023-03-20 22:43:53 +08:00
parent 9a4531b26c
commit 50dd6078c7
4 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ def get_account_query() -> list[Account]:
Account.title_l10n.contains(k), Account.title_l10n.contains(k),
code.contains(k), code.contains(k),
Account.id.in_(l10n_matches)] Account.id.in_(l10n_matches)]
if k in gettext("Need offset"): if k in gettext("Needs Offset"):
sub_conditions.append(Account.is_need_offset) sub_conditions.append(Account.is_need_offset)
conditions.append(sa.or_(*sub_conditions)) conditions.append(sa.or_(*sub_conditions))

View File

@ -98,7 +98,7 @@ class LineItemCollector:
Account.title_l10n.contains(k), Account.title_l10n.contains(k),
code.contains(k), code.contains(k),
Account.id.in_(select_l10n)] Account.id.in_(select_l10n)]
if k in gettext("Need offset"): if k in gettext("Needs Offset"):
conditions.append(Account.is_need_offset) conditions.append(Account.is_need_offset)
return sa.select(Account.id).filter(sa.or_(*conditions)) return sa.select(Account.id).filter(sa.or_(*conditions))

View File

@ -87,7 +87,7 @@ First written: 2023/1/31
<div class="accounting-card-code">{{ obj.code }}</div> <div class="accounting-card-code">{{ obj.code }}</div>
{% if obj.is_need_offset %} {% if obj.is_need_offset %}
<div> <div>
<span class="badge rounded-pill bg-info">{{ A_("Need offset") }}</span> <span class="badge rounded-pill bg-info">{{ A_("Needs Offset") }}</span>
</div> </div>
{% endif %} {% endif %}
<div class="small text-secondary fst-italic"> <div class="small text-secondary fst-italic">

View File

@ -59,7 +59,7 @@ First written: 2023/1/30
<a class="list-group-item list-group-item-action" href="{{ url_for("accounting.account.detail", account=item)|accounting_append_next }}"> <a class="list-group-item list-group-item-action" href="{{ url_for("accounting.account.detail", account=item)|accounting_append_next }}">
{{ item }} {{ item }}
{% if item.is_need_offset %} {% if item.is_need_offset %}
<span class="badge rounded-pill bg-info">{{ A_("Need offset") }}</span> <span class="badge rounded-pill bg-info">{{ A_("Needs Offset") }}</span>
{% endif %} {% endif %}
</a> </a>
{% endfor %} {% endfor %}