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

Approve & Modify Order #{{ order.id }}

Original Order Details

Customer: {{ order.customer.name }}
Order Date: {{ order.date|date_format }}
Original Weight: {{ order.weight_kg|kg }}
Original Price/kg: {{ order.price_per_kg|currency }}
Original Total: {{ order.total_amount|currency }}
Status: ⏳ Pending
{% if order.description %}
Customer Requirements:
{{ order.description }}
{% endif %}

Inventory Availability

📦
{{ available_inventory|kg }}
Available

Note: Ensure the approved weight doesn't exceed available inventory.

You can modify the customer's request based on availability and pricing.

Approve & Modify Order

{{ form.hidden_tag() }}
{{ form.weight_kg(class="input", placeholder="e.g., 25.50", max=available_inventory) }} {% if form.weight_kg.errors %}
{{ form.weight_kg.errors[0] }}
{% endif %} Maximum: {{ available_inventory|kg }}
{{ form.price_per_kg(class="input", placeholder="e.g., 180.00") }} {% if form.price_per_kg.errors %}
{{ form.price_per_kg.errors[0] }}
{% endif %} Final price per kilogram
{{ form.description(class="input", rows="4", placeholder="Modified requirements, quality specifications, delivery notes, etc.") }} {% if form.description.errors %}
{{ form.description.errors[0] }}
{% endif %} You can modify the customer's requirements based on availability and business needs
{{ form.admin_notes(class="input", rows="3", placeholder="Any notes about the approval, modifications made, special instructions, etc.") }} {% if form.admin_notes.errors %}
{{ form.admin_notes.errors[0] }}
{% endif %} These notes will be visible to the customer and supplier

📊 Order Summary Preview

Weight: {{ order.weight_kg|kg }}
Price/kg: {{ order.price_per_kg|currency }}
Total Amount: {{ order.total_amount|currency }}
Status: ✅ Will be Approved
Cancel
{% endblock %}