{% extends "pantry/frame.html" %} {% block title %}Groceries ยท Cookbook & Pantry{% endblock %} {% macro receipt(action_url, entry, qty, extra=false) %} {% set item_label = ('extra ' if extra else '') ~ entry.name ~ (' (' ~ entry.unit ~ ')' if entry.unit else '') %} {% set submit_label = 'Add ' ~ fmt(qty) ~ (' ' ~ entry.unit if entry.unit else '') ~ ' to pantry' %}
Record purchase
{{ csrf_field() }}
{% endmacro %} {% block pantry_body %}

Groceries

The list adds up the measured ingredients across planned recipes and subtracts pantry stock once. Record purchases here to update stock.

Planned recipes

{% if plan %} {% else %}

Open a recipe from the cookbook and add it to your plan.

{% endif %}

Still needed

{% if needed %}
{% for entry in needed %}

{{ entry.name }}

{{ fmt(entry.absent) }} {{ entry.unit }}

{{ receipt(url_for('.receive'), entry, entry.absent) }}
{% endfor %}
{% elif plan %}

All measured ingredients are in stock. Check unmeasured ingredients in each recipe.

{% else %}

Recipe shortages appear here after you make a plan.

{% endif %}

Extras

{% if extras %}
{% for entry in extras %}

{{ entry.name }}

{{ fmt(entry.qty) }} {{ entry.unit }}

{{ receipt(url_for('.receive', extra_id=entry.id), entry, entry.qty, extra=true) }}
{{ csrf_field() }}
{% endfor %}
{% endif %}
{{ csrf_field() }}

Add purchases outside your recipe plan. Entering an existing extra updates its quantity.

{% endblock %}