{% extends 'base.html' %} {% block title %}Purchase Entry - Politory{% endblock %} {% block content %}
{% for message in messages %}
{% if 'success' in message.tags %}✅{% elif 'error' in message.tags %}❌{% else %}â„šī¸{% endif %} {{ message }}
{% endfor %}
{% if active_purchase and not edit_obj %}
🔴 ACTIVE {{ active_purchase.vendor_name }} ki purchase active hai! Remaining: {{ active_purchase.remaining_weight }} kg
🔒 Nai entry locked hai
{% endif %}
{% if edit_obj %}Update{% else %}New{% endif %} Purchase
{% csrf_token %}
{% if edit_obj %} Cancel {% endif %}
Recent History
{% if active_purchase %} 🔴 {{ active_purchase.vendor_name }} Active {% endif %}
{% for row in history %} {% empty %} {% endfor %}
Vendor Date Rate Weight Amount Status Action
{{ row.vendor_name }} {{ row.date|date:"d M, Y" }} {{ row.vendor_rate }} {{ row.weight }} kg {{ row.amount }} {% if row.status == 'Active' %} Active {% else %} Done {% endif %}
No records found.
{% endblock %}