{% extends "base.html" %} {% from "_macros.html" import doc_export with context %} {% block title %}{{ c.number }}{% endblock %} {% block content %} {% set cur = branch.currency %}{% set open = c.state in ('registered', 'deposited') %}
{{ t(info.label) }}

{{ c.number }} {% include "cheques/_badge.html" %}

{{ t('Cheque no.') }} {{ c.cheque_no }}{{ ' · ' ~ c.bank_name if c.bank_name }} · {{ nm({'name_en': c.pname_en, 'name_ar': c.pname_ar}) }}
{{ doc_export() }} {% if c.invoice_id %}{{ c.inv_number }}{% endif %} {% if pay %}{{ t('Receipt entry') if c.direction == 'received' else t('Issue entry') }}{% endif %} {% if c.clear_move_id %}{{ t('Clearing entry') }}{% endif %} {% if c.bounce_move_id %}{{ t('Reversal entry') }}{% endif %}
{{ t('Amount') }}
{{ c.amount|money(cur) }}
{{ cur }}
{{ t('Cheque date') }}
{{ c.cheque_date }}
{{ t('Post-dated') if c.cheque_date > c.issue_date else t('Current') }} · {{ t('Received') if c.direction == 'received' else t('Issued') }} {{ c.issue_date }}
{{ t('Bank') }}
{{ nm({'name_en': c.jname_en, 'name_ar': c.jname_ar}) if c.jname_en else '—' }}
{% if c.clear_date %}{{ t('Cleared') }} {{ c.clear_date }}{% elif c.deposit_date %}{{ t('Deposited') }} {{ c.deposit_date }}{% endif %}{% if c.bounce_date %}{{ t(states[c.state]) }} {{ c.bounce_date }}{% endif %}
{% if c.bounce_reason %}
{{ t('Reason') }}: {{ c.bounce_reason }}
{% endif %} {% if c.notes %}
{{ c.notes }}
{% endif %} {% if can_write and open %}
{% if c.direction == 'received' and c.state == 'registered' %}
{{ t('No entry: it stays under collection until the bank clears it.') }}
{% endif %}
{% if c.direction == 'received' %}{{ t('Dr Bank / Cr Cheques Under Collection') }}{% else %}{{ t('Dr Post-dated Cheques Issued / Cr Bank') }}{% endif %}
{% endif %} {% endblock %}