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

Product Inventory

{% for product in products %} {% endfor %}
🖼️ Images 📦 Lot Details 📛 Product Name 📂 Category 🎨 Colors 📏 Sizes 📊 Total Stock 📈 Total Sales 💰 Price 📅 Date Added ⚡ Actions
{% if product.variants %} {% set main_variant = (product.variants | selectattr('image_path') | list | first) or product.variants[0] %} {% if main_variant.image_path %} {% if main_variant.image_path.startswith('http') %} {{ product.product_name }} {% else %} {{ product.product_name }} {% endif %} {% if product.variants|length > 1 %}
{{ product.variants|length }}
{% endif %} {% else %}
{% endif %} {% else %}
{% endif %}
{{ product.lot_details or 'N/A' }} {{ product.product_name }} {% if product.description %}
{{ product.description[:50] }}{% if product.description|length > 50 %}...{% endif %} {% endif %}
{% if product.category %} {{ product.category }} {% else %} N/A {% endif %} {% if product.variants and product.variants|length > 0 %} {% set main_variant = product.variants[0] %} {{ main_variant.color | clean_text or 'N/A' }} {% else %} No colors {% endif %} {% if product.variants and product.variants|length > 0 %} {% set main_variant = product.variants[0] %} {{ main_variant.size | clean_text or 'N/A' }} {% else %} No sizes {% endif %} {% set total_stock = product.total_stock or 0 %} 📦 {{ total_stock }} {% set total_sales = product.total_sales or 0 %} 📊 {{ total_sales }} AED {{ "{:,.2f}".format(product.avg_price or 0) }} {{ product.created_at.strftime('%Y-%m-%d') if product.created_at else 'N/A' }}
{% if product.total_sales > 0 %} {% else %} {% endif %}

Showing 0 products

Lot-wise Inventory Summary
Select a lot to view total arrived, sold, and remaining quantities.
{% endblock %} {% block scripts %} {% endblock %}