{% extends "base.html" %} {% from "_macros.html" import doc_export, state_badge, attachments_card with context %} {% block title %}{{ m.name or t('Draft') }}{% endblock %} {% block content %} {% set cur = branch.currency if branch else none %}
{{ t('Journal Entries') }}

{{ m.name or t('Draft') }} {{ state_badge(m.state) }}

{{ doc_export() }} {% if can_write and m.move_type == 'entry' %}{{ t('Duplicate') }}{% endif %} {% if doc %} {{ t('Open source document') }} {% endif %} {% if can_write and m.move_type == 'entry' %} {{ t('Make recurring') }} {% if m.state == 'draft' %} {{ t('Edit') }}
{% elif m.state == 'posted' %}
{% endif %} {% elif can_write and m.move_type == 'transfer' and m.state == 'posted' %}
{% endif %}
{{ t('Branch') }}
{{ branch.code }} โ€” {{ nm(branch) }} ({{ cur }})
{{ t('Journal') }}
{{ m.jcode }} โ€” {{ nm({'name_en': m.jname_en, 'name_ar': m.jname_ar}) }}
{{ t('Date') }}
{{ m.date }}
{{ t('Reference') }}
{{ m.ref or 'โ€”' }}
{% if m.pname_en %}
{{ t('Partner') }}
{{ nm({'name_en': m.pname_en, 'name_ar': m.pname_ar}) }}
{% endif %} {% if m.narration %}
{{ t('Narration') }}
{{ m.narration }}
{% endif %} {% for l in linked %}
{{ t('Counterpart entry') }}
{{ l.name }} ({{ branches[l.branch_id].code if l.branch_id in branches else '' }})
{% endfor %}
{% for l in lines %} {% endfor %}
{{ t('Account') }}{{ t('Partner') }}{{ t('Label') }}{{ t('Debit') }}{{ t('Credit') }}
{{ l.code }} {{ nm(l) }}{% if l.cc_code %} {{ l.cc_code }}{% endif %}{{ nm({'name_en': l.pname_en, 'name_ar': l.pname_ar}) if l.pname_en else '' }} {{ l.label or '' }}{% if l.currency %} ยท {{ l.currency }} {{ (l.amount_currency|abs)|money(l.currency) }}{% endif %}{{ l.debit|money(cur, true) }}{{ l.credit|money(cur, true) }}
{{ t('Total') }}{{ lines|sum(attribute='debit')|money(cur) }}{{ lines|sum(attribute='credit')|money(cur) }}
{{ attachments_card('move', m.id) }} {% endblock %}