{% extends "base.html" %} {% import 'components/macros.html' as ui %} {% block title %}Restock Request {{ request_row.document_code }}{% endblock %} {% block body_class %}restock-page{% endblock %} {% block head_extra %} {% endblock %} {% block content %}

Restock Request {{ request_row.document_code }}

{{ ui.button('Back', '/restock') }} Download CSV Download Document {{ ui.button('Manage Suppliers', '/restock/suppliers') }}
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %}
{{ message }}
{% endfor %} {% endif %} {% endwith %}

Status: {{ request_row.status }}

Summary:

{{ summary_json }}

Editable Restock List

{% for item in items %} {% endfor %}
Product Stock Suggested Approved Qty Supplier Unit Cost AI Score Notes
{{ item.product_name }}
ID {{ item.shop_product_id or item.product_id }}
{{ item.current_stock }} {{ item.suggested_qty }} {% if offers_by_product.get(item.id) %} Offers: {% for offer in offers_by_product.get(item.id) %} {{ offer.supplier_name }} {{ currency_symbol }}{{ "%.2f"|format(offer.unit_cost or 0) }} Q{{ offer.quality_score }}; {% endfor %} {% endif %} {{ item.ai_score or 0 }}

Send To Shop Admins For Approval

{% if admin_links %} {% for admin in admin_links %}
{{ admin.name }} {% if admin.whatsapp_link %}WhatsApp{% endif %} {% if admin.email_link %}Email{% endif %}
{% endfor %} {% else %}

No admin contacts found.

{% endif %}

Send To Wholesalers / Industries

{% if supplier_messages %} {% for supplier in supplier_messages %}

{{ supplier.supplier_name }}

Send the purchase request using WhatsApp or email. The supplier response link is included in the message.

{% if supplier.whatsapp_link %}Send WhatsApp{% endif %} {% if supplier.email_link %}Send Email{% endif %} Download Supplier CSV
{{ supplier.body }}
{% endfor %} {% else %}

Select suppliers and approved quantities first.

{% endif %}
{% endblock %}