{% macro startCard(col, zone = "default", card ='primary', fullWidth = false ) %} {% if col > 0 %}
{% endif %}

{% set label = "group."~zone %} {{ label|trans({}, 'lcshop')|raw }}

{% endmacro %} {% macro cardOverlay(attr) %}
{% endmacro %} {% macro endCard(noCol = false) %}
{% if noCol == false %}{% endif %} {% endmacro %} {% macro productField(colspan, field, fieldName, fieldDisplay = false, displaySuffix="",attr="") %} {% if fieldDisplay == false %}{% set fieldDisplay = fieldName %}{% endif %}
{% verbatim %}{{ {% endverbatim %}{{ fieldDisplay }} {% verbatim %}}}{% endverbatim %}{{ displaySuffix }}
{% verbatim %}{{ productFamily.{% endverbatim %}{{ fieldDisplay }} {% verbatim %}}}{% endverbatim %}{{ displaySuffix }}
{{ form_widget(field, {'attr' : {'v-model' : fieldName , 'v-on:focusout': fieldName~'Inherited = false', '@change' : fieldName~'Updated'}}) }}
{% endmacro %} {% macro priceField(field, fieldTax, fieldName, behaviorPriceValue) %}
{{ form_label(field) }}
{{ form_widget(field, {'attr' : {'v-model': fieldName, '@change' : fieldName~'Updated'}}) }}
€ HT {% if behaviorPriceValue == 'by-reference-unit' %}/ ${ unitReference }{% endif %}
{{ form_widget(fieldTax, {'attr' : {'v-model': fieldName ~ 'WithTax', '@change' : fieldName~'WithTaxUpdated'}}) }}
€ TTC {% if behaviorPriceValue == 'by-reference-unit' %}/ ${ unitReference }{% endif %}
{% endmacro %} {% macro reductionCatalogForm(form) %} {{ _self.startCard(6, 'ReductionCatalog.info') }}
{{ form_row(form.title) }}
{#
{{ form_row(form.fromQuantity) }}
#}
{{ form_row(form.behaviorTaxRate, {"attr" : {":required": "reductionActive", 'v-model' : 'reductionBehaviorTaxRate'}}) }}
{{ form_row(form.unit, {"attr" : {":required": "reductionActive", 'v-model' : 'reductionUnit'}}) }}
{{ form_row(form.value, {"attr" : {":required": "reductionActive", 'v-model' : 'reductionValue'}}) }}
{{ _self.endCard() }} {{ _self.startCard(6, 'ReductionCatalog.conditions','success') }}
{{ form_widget(form.permanent, {"attr" : {'v-model' : 'reductionPermanent' } }) }}
{{ form_widget(form.usersActive, {"attr" : {'v-model' : 'reductionUsersActive' } }) }}
{{ form_widget(form.users) }}
{{ form_widget(form.groupUsersActive, {"attr" : {'v-model' : 'reductionGroupUsersActive' } }) }}
{{ form_widget(form.groupUsers) }}
{% if form.suppliers is defined %}
{{ form_widget(form.suppliersActive, {"attr" : {'v-model' : 'reductionSuppliersActive' } }) }}
{{ form_widget(form.suppliers) }}
{% endif %} {% if form.productCategories is defined %}
{{ form_widget(form.productCategoriesActive, {"attr" : {'v-model' : 'reductionProductCategoriesActive' } }) }}
{{ form_widget(form.productCategories) }}
{% endif %} {% if form.productFamilies is defined %}
{{ form_widget(form.productFamiliesActive, {"attr" : {'v-model' : 'reductionProductFamiliesActive' } }) }}
{{ form_widget(form.productFamilies) }}
{% endif %} {{ _self.endCard() }} {% endmacro %} {% macro reductionCatalogFormValues(formValues, isProductFamilyForm= false) %} {% endmacro %}