{% extends edc_base_template %} {% load static %} {% block main %} {{ block.super }}
Edc PharmacyStock Take › Discrepancy Report {% if rows_by_location %} Print PDF {% endif %}
{% if not rows_by_location %}
All clear. No discrepancies found in the most recent stock take for any bin.
{% else %} {% for location_name, rows in rows_by_location.items %}
{{ location_name }} — {{ rows|length }} bin{{ rows|length|pluralize }} with discrepancies
{% for row in rows %}
Bin {{ row.bin.bin_identifier }} · {{ row.bin.container }} · Stock take {{ row.stock_take.stock_take_datetime|date:"d-M-Y H:i" }}   Full results Redo stock take
{% if row.missing %}
{% for item in row.missing %} {% endfor %}
Missing ({{ row.missing|length }})
Code Product
{{ item.code }} {{ item.stock.product.name|default:"—" }}
{% endif %} {% if row.unexpected %}
{% for item in row.unexpected %} {% endfor %}
Unexpected ({{ row.unexpected|length }})
Code Product
{{ item.code }} {% if not item.stock %} (not in system) {% endif %} {{ item.stock.product.name|default:"—" }}
{% endif %}
{% endfor %}
{% endfor %} {% endif %}

All bins

{% endblock main %}