{% extends "base.html" %} {% load static %} {% block title %}{{ product.name }} - Product Details{% endblock %} {% block header_title %}Product Details{% endblock %} {% block extra_head %} {% endblock %} {% block content %}
| Name: | {{ product.name }} |
|---|---|
| Category: | {{ product.category.name|default:"Uncategorized" }} |
| SKU: | {{ product.sku|default:"--" }} |
| Barcode: | {{ product.barcode|default:"--" }} |
| Description: | {{ product.description|default:"No description provided."|linebreaks }} |
| Price: | KSh {{ product.price }} |
|---|---|
| Cost Price: | KSh {{ product.cost_price }} |
| Profit Margin: | {{ product.profit_margin|floatformat:2 }}% |
| Current Stock: | {{ product.quantity }} {% if user.role == 'admin' or user.role == 'manager' %} Adjust {% endif %} |
| Low Stock Alert: | When below {{ product.low_stock_threshold }} |
| Date | User | Type | From | To | Quantity | Reason |
|---|---|---|---|---|---|---|
| {{ movement.timestamp|date:"M d, Y H:i" }} | {% if movement.user %}{{ movement.user.get_full_name|default:movement.user.email }}{% else %}System{% endif %} | {% if movement.adjustment_type == 'add' %} Add {% elif movement.adjustment_type == 'remove' %} Remove {% elif movement.adjustment_type == 'set' %} Set {% elif movement.adjustment_type == 'sale' %} Sale {% elif movement.adjustment_type == 'purchase' %} Purchase {% elif movement.adjustment_type == 'return' %} Return {% endif %} | {{ movement.from_quantity }} | {{ movement.to_quantity }} | {{ movement.adjustment_quantity }} | {{ movement.reason|default:"--" }} |