{% import "helper.twig" as helper %} {% if part.manufacturer or part.manufacturerProductUrl or part.manufacturerProductNumber %}
{% if part.manufacturer %} {% if part.manufacturer.id is not null %} {{ part.manufacturer.name}} {% else %} {{ part.manufacturer.name }} {% endif %} {% endif %} {% if part.manufacturerProductUrl %} {% if part.manufacturerProductNumber is not empty %} {{ part.manufacturerProductNumber }} {% else %} {{ part.name }} {% endif %} {% elseif part.manufacturerProductNumber %} {{ part.manufacturerProductNumber }} {% endif %}
{% endif %}

{{ part.name }} {# You need edit permission to use the edit button #} {% if timeTravel is not null %} {% elseif is_granted('edit', part) %} {% endif %}

{# Slighlty highlight every text in this block over normal text (similar to h5) #}
{% trans %}description.label{% endtrans %}
{{ part.description|format_markdown(true) }}
{% trans %}category.label{% endtrans %}
{{ helper.structural_entity_link(part.category) }}
{% trans %}part.part_lots.label{% endtrans %}
{% if not part.amountUnknown %} {# For known instock we can just show the label as normal #} {{ part.amountSum | format_amount(part.partUnit) }} {% else %} {% if part.amountSum == 0.0 %} ? {% else %} ≥{{ part.amountSum | format_amount(part.partUnit) }} {% endif %} {% endif %} {% if part.expiredAmountSum > 0 %} (+{{ part.expiredAmountSum }}) {% endif %} / {{ part.minAmount | format_amount(part.partUnit) }} {% if part.notEnoughInstock %}  {% trans %}part.info.amount.less_than_desired{% endtrans %} {% endif %}
{% trans %}footprint.label{% endtrans %}
{{ helper.structural_entity_link(part.footprint) }}
{% set min_order_amount = pricedetail_helper.minOrderAmount(part) %} {% set max_order_amount = pricedetail_helper.maxDiscountAmount(part) %} {% set max_order_price = pricedetail_helper.calculateAvgPrice(part, max_order_amount, app.user.currency ?? null) %} {% set min_order_price = pricedetail_helper.calculateAvgPrice(part, min_order_amount, app.user.currency ?? null ) %} {% if max_order_price is not null %}
{{ max_order_price | format_money(app.user.currency ?? null) }} {% if min_order_price is not null and min_order_amount < max_order_amount %} - {% if max_order_price is not null %}{{ min_order_price | format_money(app.user.currency ?? null) }}{% else %}???{% endif %} {% endif %}
{% endif %} {# {% if part.comment != "" %}
{% trans %}comment.label{% endtrans %}
>{{ part.comment|nl2br }}
{% endif %} #}