{% extends 'base.html' %} {% load indonesian_filters %} {% block title %}Purchase Order {{ po.po_number }} - Manufacturing App{% endblock %} {% block content %}

Purchase Order: {{ po.po_number }}

Edit Delete Back to List
{% if messages %} {% for message in messages %} {% endfor %} {% endif %}
Purchase Order Information
PO Number: {{ po.po_number }}
Supplier: {{ po.supplier.name }}
Order Date: {{ po.order_date|date:"M d, Y" }}
Expected Delivery: {% if po.expected_delivery_date %} {{ po.expected_delivery_date|date:"M d, Y" }} {% else %} Not specified {% endif %}
Status: {% if po.status == 'ordered' %} Ordered {% elif po.status == 'completed' %} Completed {% elif po.status == 'cancelled' %} Cancelled {% else %} {{ po.get_status_display }} {% endif %}
Subtotal: {{ po.subtotal|format_rupiah }}
Tax (11%): {{ po.tax_amount|format_rupiah }}
Total Amount: {{ po.total_amount|format_rupiah }}
Items Count: {{ po.items.count }} items
Created: {{ po.created_at|date:"M d, Y H:i" }}
{% if po.notes %}
Notes:

{{ po.notes|linebreaks }}

{% endif %}
Order Items
{% if po.items.all %}
{% for item in po.items.all %} {% endfor %}
Product Quantity Unit Price Total Price Received Status
{{ item.product.name }}
{{ item.product.code }}
{{ item.quantity|floatformat:0 }} {{ item.unit_price|format_rupiah }} {{ item.total_price|format_rupiah }} {% if item.received_quantity > 0 %} {{ item.received_quantity|floatformat:0 }} {% else %} 0 {% endif %} {% if item.received_quantity >= item.quantity %} Fully Received {% elif item.received_quantity > 0 %} Partially Received {% else %} Not Received {% endif %}
{% else %}

No items in this order.

{% endif %}
Supplier Information
{{ po.supplier.name }}

{{ po.supplier.address|default:"No address" }}

{% if po.supplier.phone %}

{{ po.supplier.phone }}

{% endif %} {% if po.supplier.email %}

{{ po.supplier.email }}

{% endif %} View Supplier Details
Quick Actions
{% if po.status == 'ordered' %} Edit Order Approve Order {% endif %} {% if po.status == 'ordered' or po.status == 'approved' %} Create Goods Receipt {% endif %} Delete Order View All Orders
{% endblock %}