{% extends "core/base.jinja" %} {% block title %} {% trans %}Product formulas{% endtrans %} {% endblock %} {% block additional_css %} {% endblock %} {% block content %}

{% trans %}Product formulas{% endtrans %}

{%- trans trimmed -%} Formulas allow you to associate a group of products with a result product (the formula itself). {%- endtrans -%}

{%- trans trimmed -%} If the product of a formula is available on a counter, it will be automatically applied if all the products that make it up are added to the basket. {%- endtrans -%}

{%- trans trimmed -%} For example, if there is a formula that combines a "Sandwich Formula" product with the "Sandwich" and "Soft Drink" products, then, if a person orders a sandwich and a soft drink, the formula will be applied and the basket will then contain a sandwich formula instead. {%- endtrans -%}

{% trans %}New formula{% endtrans %}

{%- for formula in object_list -%}
{{ formula.result.name }}

{% for p in formula.products.all() %} {{ p.code }} ({{ p.selling_price }} €) {% if not loop.last %}+{% endif %} {% endfor %}

{{ formula.result.selling_price }} € ({% trans %}instead of{% endtrans %} {{ formula.max_selling_price}} €)

{% if user.has_perm("counter.delete_productformula") %}
{% endif %} {%- endfor -%}
{% endblock %}