{% if low_stock or expiring or expired %} {% if low_stock %}
Low Stock
{% for item in low_stock %}
{{ item.medication.name }}
Stock: {{ item.current_stock }} / Min: {{ item.minimum_stock_level }}
{{ item.current_stock }}
{% endfor %}
{% endif %} {% if expiring %}
Expiring Soon
{% for item in expiring %}
{{ item.medication.name }}
Expires: {{ item.expiry_date|date:"M d, Y" }}
{{ item.expiry_date|timeuntil }}
{% endfor %}
{% endif %} {% if expired %}
Expired
{% for item in expired %}
{{ item.medication.name }}
Expired: {{ item.expiry_date|date:"M d, Y" }}
Expired
{% endfor %}
{% endif %} {% else %}

No inventory alerts

All items are properly stocked
{% endif %}