{% extends "base.html" %} {% block title %}{{ t('Batches & Expiry') }}{% endblock %} {% block content %}

{{ t('Batches & Expiry') }}

{{ t('Batches in stock, earliest expiry first. Deliveries take the earliest-expiring batch automatically.') }}
{% if can_write %}
{{ t('Write Off Stock') }}
{% endif %}
{% for r in rows %}{% set cur = branches[r.branch_id].currency if r.branch_id in branches else none %} {% else %}{% endfor %}
{{ t('Product') }}{{ t('Batch') }}{{ t('Warehouse') }}{{ t('Expiry date') }}{{ t('Status') }}{{ t('Quantity') }}{{ t('Value') }}
{{ r.code or '' }} {{ nm(r) }}{{ r.number }}{{ r.wcode }}{{ r.expiry_date or '—' }} {% if r.expiry_date is none %}—{% elif r.days < 0 %}{{ t('Expired') }} {{ -r.days }} {{ t('days ago') }} {% elif r.days <= 30 %}{{ r.days }} {{ t('days left') }}{% else %}{{ r.days }} {{ t('days left') }}{% endif %} {{ '%g' % r.qty }} {{ r.uom or '' }} {{ (r.qty * (r.unit_cost or 0))|round|int|money(cur) }} {% if can_write and r.days is not none and r.days < 0 %}{{ t('Write Off') }}{% endif %}
{{ t('No batches. Mark a product “Batch / expiry” and enter the batch on its receipts.') }}
{% endblock %}