{% extends edc_base_template %} {% load static %} {% block main %} {{ block.super }}
Edc PharmacyReceive › {{ order.order_identifier }}
{# ── Order summary ── #}
Receive against order {{ order.order_identifier }} — {{ order.title }}   {% if order.status == COMPLETE %} Complete {% elif order.status == PARTIAL %} Partial {% else %} New {% endif %}
{% if order.comment %} {% endif %}
Supplier {{ order.supplier }} Order date {{ order.order_datetime|date:"d-M-Y" }}
Items ordered {{ order.item_count|default:"—" }} Created by {{ order.user_created|default:"—" }}
Printed {% if order.printed %} Yes — by {{ order.printed_by|default:"—" }} on {{ order.printed_datetime|date:"d-M-Y H:i"|default:"—" }} {% else %} No {% endif %}
Comment {{ order.comment }}
Back to ordering   Stock received   Go to repack
{# ── Receive record ── #}
{% if receive %} Receive {{ receive.receive_identifier }} — {{ receive.receive_datetime|date:"d-M-Y" }} at {{ receive.receive_datetime|date:"H:i" }}   {% if unconfirmed_count == 0 and confirmed_count > 0 %} All confirmed {% elif confirmed_count > 0 %} {{ confirmed_count }} confirmed, {{ unconfirmed_count }} unconfirmed {% else %} {{ unconfirmed_count }} unconfirmed {% endif %} {% else %} New receiving recordComplete the following to start receiving against this order {% endif %}
{% if receive and not edit_receive %} {# ── Read-only summary ── #} {% if receive.comment %} {% endif %}
Location {{ receive.location }} Received count {{ receive.item_count|default:"—" }}
Invoice # {{ receive.invoice_number|default:"—" }} Invoice date {{ receive.invoice_date|date:"d-M-Y"|default:"—" }}
Comment {{ receive.comment }}
Edit Audit trail {% else %} {# ── Edit / create form ── #}
{% csrf_token %}
{% for field in receive_form %}
{{ field }} {% if field.help_text %} {{ field.help_text }} {% endif %} {% if field.errors %} {{ field.errors|join:", " }} {% endif %}
{% endfor %}
{% if receive_form.non_field_errors %}
{{ receive_form.non_field_errors }}
{% endif %} {% if receive %}   Cancel {% endif %}
{% endif %}
{# ── Order items (with receive progress) ── #} {% if receive %}

Receive progress for this order

{% for row in rows %} {% with oi=row.order_item %}
Item {{ oi.order_item_identifier }} — {{ oi.product.name }}   {% if oi.unit_qty_pending is not None and oi.unit_qty_pending == 0 %} Fully received {% elif row.receive_items %} Partial {% else %} Pending {% endif %}
Container {{ oi.container }} Units/container {{ oi.container_unit_qty }}
Containers ordered {{ oi.item_qty_ordered }} Units ordered {{ oi.unit_qty_ordered }}
Units received {{ oi.unit_qty_received|default:"0" }} Units pending {% if oi.unit_qty_pending %} {{ oi.unit_qty_pending }} {% else %} 0 {% endif %}
{# Existing receive items #} {% if row.receive_items %}
{% for entry in row.receive_items %} {% with ri=entry.ri %} {% endwith %} {% endfor %}
Receive item # Batch Container Containers Units Date Reference
{{ ri.receive_item_identifier }} {% if show_batch %}{{ ri.lot.lot_no }}{% else %}******{% endif %} {{ ri.container }} {{ ri.item_qty_received }} {{ ri.unit_qty_received }} {{ ri.receive_item_datetime|date:"d-M-Y" }} {{ ri.reference }} {% if entry.can_edit_delete %}
{% csrf_token %}
{% else %} {% endif %}
{% endif %} {# Receive button — navigates to dedicated receive-item page #}
{% if row.can_add %} Receive this item {% endif %}
{% endwith %} {% endfor %} {% if unconfirmed_count > 0 %}
{{ unconfirmed_count }} stock item{{ unconfirmed_count|pluralize }} need{{ unconfirmed_count|pluralize:"s," }} labelling and confirming.
{% csrf_token %}
 
{% csrf_token %}
{% endif %} {% endif %}
{# /panel-body items #}
{# /panel Receive record #}

← All orders Receive records (admin)

{# ── Delete confirmation modal (shared across delete forms on this page) ── #} {% endblock main %}