{% extends "layouts/base.twig" %} {% block title %}{{ translations.pricing }}{% endblock %} {% block head %} {% endblock %} {% block page_heading %}
{{ translations.product_pricing_subtitle }}
| {{ translations.product }} | {{ translations.cost_section|default('Koszt') }} | {{ translations.margin_section|default('Marże') }} | {{ translations.max_price_section|default('Cena maks. sklepu') }} | {{ translations.competitor_section|default('Konkurencja') }} | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| {{ translations.raw_price }} | {{ translations.vat|default('VAT') }} | {{ translations.expected_margin_short|default('Oczek.') }} | {{ translations.suggested_sale_price_short|default('Sug. c. sp.') }} | {{ translations.current_margin_short|default('Marża sp.') }} | {{ translations.max_sale_price_short }} | {{ translations.margin_on_max|default('Marża maks.') }} | {{ translations.competitor_price_range|default('Min / Max konk.') }} | {{ translations.suggested_max_price|default('Suger. cena maks.') }} | ||
| {{ category.name }} {{ category.products|length }} | ||||||||||
|
{{ product.getName() }}
{% if product.getIsVegetarian() %}
🌿
{% endif %}
{# Mikroznaczniki okresów dostępności #}
{% if periodIds|length > 0 %}
{% for period in product.getAvailabilityPeriods() %}
{%- set pParts = period.getName()|split(' ', 2) -%}
{{ pParts[0]|raw }}
{% endfor %}
{% endif %}
|
{# ── Koszt produkcji ── #}
{% if raw > 0 %} {{ raw|number_format(2, ',', ' ') }} {% else %} — {% endif %} | {# ── VAT ── #}{{ product.getTaxValPerc() }}% | {# ── Oczekiwana marża ── #}{% if expMargin > 0 %} {{ expMargin|number_format(0, ',', ' ') }}% {% else %} — {% endif %} | {# ── Obecna cena sprzedaży ── #}{% if suggP > 0 %} {{ suggP|number_format(2, ',', ' ') }} {% else %} — {% endif %} | {# ── Marża od ceny sprzedaży ── #}
{% if margeOnPortion is not null %}
{%- set cls = margeOnPortion >= 50 ? 'marge-good' : (margeOnPortion >= 20 ? 'marge-ok' : 'marge-bad') -%}
{{ margeOnPortion }}%
{# delta względem oczekiwanej #}
{% if expMargin > 0 %}
{%- set delta = margeOnPortion - expMargin|round(0) -%}
{{ delta >= 0 ? '+' : '' }}{{ delta }}pp
{% endif %}
{% else %}
—
{% endif %}
|
{# ── Maks. cena sprzedaży (edytowalna) ── #}
{{ translations.for_expected_margin|default('Dla') }} {{ expMargin|number_format(0) }}%: {{ targetPrice|number_format(2, ',', ' ') }}
{% endif %}
|
{# ── Marża od ceny maks. ── #}
{% if margeOnMax is not null %}
{%- set cls = margeOnMax >= 50 ? 'marge-good' : (margeOnMax >= 20 ? 'marge-ok' : 'marge-bad') -%}
{{ margeOnMax }}%
{# delta względem oczekiwanej #}
{% if expMargin > 0 %}
{%- set delta = margeOnMax - expMargin|round(0) -%}
{{ delta >= 0 ? '+' : '' }}{{ delta }}pp
{% endif %}
{% else %}
—
{% endif %}
|
{# ── Min / Max cena konkurencji ── #}
{% if cp is not null %}
{{ cp.min|number_format(2, ',', ' ') }}
/
{{ cp.max|number_format(2, ',', ' ') }}
{# Lista obserwacji (max 3) #}
{% for obs in cp.observations|slice(0, 3) %}
{% else %}
—
{% endif %}
{{ obs.competitor_name }}
{{ obs.price|number_format(2, ',', ' ') }}
{% endfor %}
{% if cp.count > 3 %}
+{{ cp.count - 3 }} {{ translations.more|default('więcej') }}
{% endif %}
|
{# ── Sugerowana maks. cena sprzedaży (max_konk * 0.95) ── #}
{% if cp is not null %}
{{ cp.suggested_max|number_format(2, ',', ' ') }}
{{ translations.suggested_max_note|default('max konk. −5%') }}
{% if cp.suggested_max != maxP %}
{% else %}
✓ {{ translations.applied|default('Zastosowana') }}
{% endif %}
{% else %}
—
{% endif %}
|
|
{{ translations.no_results|default('Brak wyników dla podanych filtrów') }}