{# views/product/details.twig #} {% extends 'layouts/base.twig' %} {% block title %}{{ translations.product_details }}{% endblock %} {% block page_heading %}
| {{ translations.name }} | {{ product_data.getName() }} |
| {{ translations.category }} | {{ product_data.getCategoryName() }} |
| {{ translations.tax_value_perc }} | {{ product_data.getTaxValPerc() }} |
| {{ translations.single_weight }} | {{ product_data.getSingleWeight() }} |
| {{ translations.storage_type }} | {{ product_data.getStorageName() }} |
| {{ translations.positioning_type }} | {{ product_data.getPositioningName() }} |
| {{ translations.available_to_sale }} | {% if product_data.getIsActive() == 1 %} {% else %} {% endif %} |
| {{ translations.is_vegetarian }} | {% if product_data.getIsVegetarian() == 1 %} {% else %} {% endif %} |
| {{ translations.is_divisible }} | {% if product_data.getIsDivisible() == 1 %} {% else %} {% endif %} |
| {{ translations.require_prepare_before_sale }} | {% if product_data.getIsPreparedBeforeSales() == 1 %} {% else %} {% endif %} |
| {{ translations.suggested_sale_price }} | {{ product_data.getSuggestedSalePrice() }} {{ currency_symbol }} |
| {{ translations.sale_price }} | {{ product_data.getPortionPrice() }} {{ currency_symbol }} |
| {{ translations.quantity_per_label }} | {{ product_data.getQuantityPerLabel() }} |
| {{ translations.shelf_life }} | {{ product_data.getShelfLifeHours() ~ "h" }} {{ "(" ~ product_data.getShelfLifeMinutes() ~ " min)" }} |
| {{ translations.ingredient }} | {{ translations.quantity }} | {{ translations.approximate_cost_price_net }} | {{ translations.allergens }} | {% set total_ingredient_cost = 0 %} {% set total_allergens = [] %} {% if recipe_calculation is not empty %} {% for item in recipe_calculation.getElements() %} {% set class = (item.getType() == "ingredient") ? "bg-light-warning" : "bg-light-info" %}
|---|---|---|---|
| {{ item.getName() }} | {{ item.getRecipeQuantity() }} {{ item.getUnitName() }} | {{ item.getCalculatedReqPriceNet()|number_format(3, '.') }} {{ currency_symbol }} | {{ item.getAllergens() ? item.getAllergens()|join(", ") : "" }} |
| {{ translations.total }}: | {{ recipe_calculation.getCostNet() }} {{ currency_symbol }} | {{ total_allergens|array_unique|join(", ") }} |
| {{ translations.material }} | {{ translations.quantity }} | {{ translations.approximate_cost_price_net }} | {% if pack_calculation is not empty %} {% for item in pack_calculation.getMaterials() %}
|---|---|---|
| {{ item.getName() }} | {{ item.getQuantity() }} {{ item.getUnitName() }} | {{ item.getBaseUnitPriceNet() ~ " " ~ currency_symbol }} |
| {{ translations.total }}: | {{ pack_calculation.getCostNet() ~ " " ~ currency_symbol }} |