{% extends "base.html" %} {% from "_macros.html" import branch_tag with context %} {% block title %}{{ t('Month-end Closing') }}{% endblock %} {% block content %}

{{ t('Month-end Closing') }}

{{ t('Post the recurring entries due, review open drafts, then lock the period.') }}
{{ t('Draft journal entries') }}
{{ drafts.entries }}
{{ t('Draft invoices and bills') }}
{{ drafts.invoices }}
{% if has('inventory') %}
{{ t('Open receipts and deliveries') }}
{{ drafts.pickings }}
{{ t('Sales without matching cost of goods sold') }}
{{ drafts.unmatched }}
{% endif %} {% if has('assets') %}
{{ t('Depreciation lines due') }}
{{ dep|length }}
{% endif %} {% if has('prepaid') %}
{{ t('Recognitions due') }}
{{ rec|length + rev|length }}
{% endif %}
{{ t('Recurring documents due') }}
{{ drafts.recurring }}
{% if drafts.recurring %}

{{ t('Recurring invoices, bills and journal entries') }}

{{ drafts.recurring }} {{ t('documents are due up to') }} {{ up_to }}.

{% endif %} {% if has('assets') or has('prepaid') %}

{{ t('Post recurring entries up to') }} {{ up_to }}

{% if has('assets') %}
{% if dep %}{% for l in dep[:15] %}{% endfor %} {% if dep|length > 15 %}{% endif %}
{{ l.date }}{{ l.code }} {{ nm(l) }}{{ branch_tag(branches, l.branch_id) }}{{ l.amount|money(branches[l.branch_id].currency if l.branch_id in branches else none) }}
… {{ dep|length - 15 }} {{ t('more') }}
{% endif %} {% endif %} {% if has('prepaid') %}
{% if rec or rev %}{% for l in rec[:15] %}{% endfor %} {% for l in rev[:15] %}{% endfor %}
{{ l.date }}{{ l.number }} {{ l.name }}{{ branch_tag(branches, l.branch_id) }}{{ l.amount|money(branches[l.branch_id].currency if l.branch_id in branches else none) }}
{{ l.date }}{{ l.number }} {{ l.name }} ({{ t('reversal') }}){{ branch_tag(branches, l.branch_id) }}{{ l.amount|money(branches[l.branch_id].currency if l.branch_id in branches else none) }}
{% endif %} {% endif %}
{% endif %} {% if is_admin and years %}

{{ t('Year-end closing') }}

{{ t('Moves the income and expense balances of the year to retained earnings. The profit and loss report still shows the year in full.') }}
{% for r in ye_rows %} {% set cur = r.branch.currency %} {% endfor %}
{{ t('Branch') }}{{ t('Income') }}{{ t('Expenses') }}{{ t('Result to close') }} {{ t('Already closed') }}{{ t('Status') }}
{{ branch_tag(branches, r.branch.id) }} {{ nm(r.branch) }} {{ r.income|money(cur) }}{{ r.expense|money(cur) }} {{ r.profit|money(cur) }} {{ cur }} {{ r.closed_profit|money(cur, true) }} {% if r.drafts %}{{ r.drafts }} {{ t('drafts in the year') }} {% elif r.closings and not r.accounts %}{{ t('Closed') }} {% elif r.closings %}{{ t('Late entries — close again') }} {% elif r.accounts %}{{ t('Open') }}{% else %}—{% endif %}

{{ t('Posts one entry per branch dated') }} {{ year_end }}: {{ t('each income and expense account is brought to zero and the result goes to') }} {{ t('Retained Earnings') }}. {{ t('Profit goes to the credit side, a loss to the debit side.') }}

{% set open_rows = ye_rows|selectattr('accounts')|list %} {% if open_rows %}
{% endif %} {% if ye_rows|selectattr('closings')|list %}
{% endif %}
{% endif %} {% if is_admin %}

{{ t('Lock the period') }}

{{ t('No entries can be posted, changed or cancelled on or before this date.') }} {{ t('Current lock date') }}: {{ lock_date or '—' }}

{% endif %} {% endblock %}