{% extends "shopyo_base/module_base.html" %} {% set active_page = 'purchase' %} {% block pagehead %}PO #{{ po.id }}{% endblock %} {% block sidebar %}{% include 'purchase/blocks/sidebar.html' %}{% endblock %} {% block module_content %}

PO #{{ po.id }}

{{ po.status }}

Created {{ po.created_at.strftime('%Y-%m-%d') if po.created_at else '-' }}

{{ form.vendor_id(class="w-full bg-slate-50 dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl py-2.5 px-4 text-xs focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all outline-none") }}
{{ form.notes(class="w-full bg-slate-50 dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl py-2.5 px-4 text-xs focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all outline-none", rows=3) }}
{% if po.status == 'draft' %}
{{ form.submit(class="bg-primary text-white font-bold py-2.5 px-6 rounded-xl hover:bg-primary-dark transition-all shadow-lg shadow-primary/20 text-xs uppercase tracking-widest cursor-pointer") }}
{% endif %}
{% if po.status == 'draft' %}

Add Item

Scan or enter barcode to add products

{% endif %}

Items

{{ po.items|length }} item(s)

{% if po.status == 'draft' and po.items %}
{% endif %} {% if po.status in ('draft', 'cancelled') %}
{% endif %}
{% if po.status == 'draft' %}{% endif %} {% for item in po.items %} {% if po.status == 'draft' %} {% endif %} {% else %} {% endfor %}
BarcodeProductOrderedReceivedUnit PriceSubtotal
{{ item.product_barcode }} {{ item.product_name }} {{ item.quantity_ordered }} {{ item.quantity_received }} ${{ '%.2f'|format(item.unit_price|float) }} ${{ '%.2f'|format((item.quantity_received or 0) * (item.unit_price|float)) }}
No items
{% if po.status == 'ordered' %}

Receive Items

{% for item in po.items %} {% endfor %}
ProductOrderedReceive Qty
{{ item.product_name }} {{ item.quantity_ordered }}
{% endif %}
{% endblock %}