{% extends "base.html" %} {% block content %}

Asset Master

Bulk Upload
Reset
{% if assets %} {% for a in assets %} {% endfor %} {% else %} {% endif %}
Tag Code Name Image Category Sub Category Vendor Serial Status Qty (T/A) Holder Purchase Actions
{{ a.asset_tag }} {{ a.asset_code or '-' }} {{ a.name }} {% if a.image_path %} {% else %} - {% endif %} {{ a.category.name if a.category else '-' }} {{ a.subcategory.name if a.subcategory else '-' }} {{ a.vendor.name if a.vendor else '-' }} {{ a.serial_number or '-' }} {{ (a.status or 'in_stock').replace('_',' ')|title }} {% set total = (a.quantity_total if a.quantity_total is not none else 1) %} {% set avail = (a.quantity_available if a.quantity_available is not none else total) %} {{ total|int }}/{{ avail|int }} {% if a.current_holder %} {{ a.current_holder.employee_code }} - {{ a.current_holder.full_name }} {% else %} - {% endif %} {% if a.purchase_date %} {{ a.purchase_date.strftime('%d-%m-%Y') }} {% else %}-{% endif %} {% set hard_block_status = ['lost', 'damaged', 'retired'] %} {% set soft_block = a.id in blocked_for_allocation %} {% if a.status not in hard_block_status and not soft_block %} {% else %} {% endif %}
No assets found.
{% if pagination and pagination.pages > 1 %}
Showing {{ (pagination.page - 1) * pagination.per_page + 1 }} to {{ (pagination.page - 1) * pagination.per_page + (assets|length) }} of {{ pagination.total }}
{% endif %}
{% endblock %}