{% extends "base.html" %} {% from "_macros.html" import wf_badge, attachments_card with context %} {% block title %}{{ a.code }}{% endblock %} {% block content %} {% set cur = branch.currency %}
{{ t('Fixed Assets') }}

{{ a.code }} — {{ nm(a) }} {{ wf_badge(a.state) }}

{% if a.acquisition_move_id %}{{ t('Acquisition entry') }}{% endif %} {% if a.disposal_move_id %}{{ t('Disposal entry') }}{% endif %} {% if can_write %} {% if a.state == 'draft' %} {{ t('Edit') }}
{% elif a.state == 'running' and not posted %}
{% endif %} {% endif %}
{{ t('Cost') }}
{{ a.cost|money(cur) }}
{{ cur }}
{{ t('Accumulated Depreciation') }}
{{ posted|money(cur) }}
{{ t('posted') }}
{{ t('Net Book Value') }}
{{ (0 if a.state == 'disposed' else a.cost - posted)|money(cur) }}
{{ cur }}
{{ t('Method') }}
{{ t('Straight line') if a.method == 'linear' else t('Declining balance') }}
{{ a.life_months }} {{ t('months') }}{% if a.salvage %} · {{ t('Salvage value') }} {{ a.salvage|money(cur) }}{% endif %}
{{ t('Category') }}
{{ nm({'name_en': a.cname_en, 'name_ar': a.cname_ar}) }}
{{ t('Branch') }}
{{ branch.code }} — {{ nm(branch) }}
{{ t('Vendor') }}
{{ nm({'name_en': a.pname_en, 'name_ar': a.pname_ar}) if a.pname_en else '—' }}
{{ t('Acquisition date') }}
{{ a.acquisition_date }}
{{ t('Depreciation start') }}
{{ a.start_date }}
{{ t('Serial number') }}
{{ a.serial_no or '—' }}
{{ t('Location') }}
{{ a.location or '—' }}
{{ t('Custodian') }}
{{ a.custodian or '—' }}
{% if a.state == 'disposed' %}
{{ t('Disposed on') }}
{{ a.disposal_date }} · {{ (a.disposal_amount or 0)|money(cur) }}
{% endif %}
{% if can_write and a.state == 'draft' %}

{{ t('Confirm asset') }}

{{ t('Leave unticked if the purchase was already booked to the asset account through a vendor bill.') }}
{% endif %} {% if can_write and a.state in ('running', 'closed') %}
{% if a.state == 'running' %}

{{ t('Post depreciation') }}

{% endif %}

{{ t('Sell / Dispose') }}

{% endif %}

{{ t('Depreciation schedule') }}{% if preview %} ({{ t('preview') }}){% endif %}

{% for l in lines %} {% endfor %} {% for d, amt, acc, bv in preview %} {% endfor %} {% if not lines and not preview %}{% endif %}
{{ t('Date') }}{{ t('Depreciation') }}{{ t('Accumulated') }}{{ t('Book value') }}{{ t('Entry') }}
{{ l.date }}{{ l.amount|money(cur) }}{{ l.accumulated|money(cur) }}{{ l.book_value|money(cur) }} {% if l.move_id %}{{ t('Posted') }}{% endif %}
{{ d }}{{ amt|money(cur) }}{{ acc|money(cur) }}{{ bv|money(cur) }}
{{ t('Nothing yet.') }}
{{ attachments_card('asset', a.id) }} {% endblock %}