{% extends "base.html" %} {% block title %}{{ t('Currency Revaluation') }}{% endblock %} {% block content %} {% set cur = branch.currency if branch else none %}

{{ t('Currency Revaluation') }}

{{ t('Open invoices and bills in a foreign currency are restated at the month-end rate. The difference is booked as unrealized exchange gain or loss and reversed on the next day; the real difference is booked when the document is paid.') }}
{% for it in items %}{% set i = it.invoice %} {% else %}{% endfor %} {% if items %}{% endif %}
{{ t('Document') }}{{ t('Partner') }}{{ t('Currency') }}{{ t('Open amount') }}{{ t('Booked rate') }} {{ t('Rate on the date') }}{{ t('Carried at') }} ({{ cur }}){{ t('Value on the date') }} ({{ cur }}){{ t('Difference') }}
{{ i.number }} {{ i.date }} {{ nm({'name_en': i.pname_en, 'name_ar': i.pname_ar}) }}{{ i.currency }}{{ it.residual|money(i.currency) }} {{ it.book_rate }}{{ it.rate }}{{ it.carrying|money(cur) }}{{ it.revalued|money(cur) }} {{ it.diff|money(cur) }}
{{ t('No open foreign-currency documents on this date.') }}
{{ t('Net unrealized gain (loss)') }}{{ total|money(cur) }}
{% if can_write and items and not already %}
{{ t('Receivable / payable against Unrealized Exchange Gain or Loss, reversed on the next day.') }}
{% elif already %}

{{ t('This branch is already revalued on this date.') }}

{% endif %}

{{ t('Posted revaluations') }}

{% for r in done %}{% set bc = branches[r.branch_id].currency if r.branch_id in branches else none %} {% else %}{% endfor %}
{{ t('Number') }}{{ t('Date') }}{{ t('Branch') }}{{ t('Documents') }}{{ t('Net difference') }}
{{ r.number }}{{ r.date }}{{ branches[r.branch_id].code if r.branch_id in branches }}{{ r.n }} {{ r.diff|money(bc) }} {{ bc }}
{{ t('Nothing yet.') }}
{% endblock %}