{% block oro_sale_quote_product_collection_row %} {{ form_widget(form) }} {% endblock %} {% block oro_sale_quote_product_collection_widget %} {% import _self as fields %} {% set widgetContainerAttributes %} {% with {'id': '', 'attr': []} %}{{ block('widget_container_attributes') }}{% endwith %} {% endset %} {% if prototype is defined %} {% set prototype_html = fields.oro_sale_quote_lineitem_prototype(form, widgetContainerAttributes) %} {% endif %} {% set attr = attr|merge({'class': (attr.class is defined ? attr.class ~ ' ' : '') ~ 'oro-item-collection grid-container' }) %} {% set id = id ~ '_collection' %}
{% set prototype_name = form.vars.prototype_name %}
{% if form.children|length %} {% for child in form.children %} {{ fields.oro_sale_quote_lineitem_prototype(child, widgetContainerAttributes) }} {% endfor %} {% elseif show_form_when_empty and prototype_html is defined %} {{ prototype_html|replace({(prototype_name): '0'})|raw }} {% endif %}
{{ 'oro.sale.quote.lineitem.product_sku'|trans }} {{ 'oro.sale.quote.lineitem.product'|trans }} {{ 'oro.sale.quote.lineitem.requested.label'|trans }} {{ 'oro.sale.quote.lineitem.offers.label'|trans }} {{ 'oro.sale.quote.lineitem.notes'|trans }}
{% endblock %} {% macro oro_sale_quote_lineitem_prototype(widget, attributes) %} {% if 'collection' in widget.vars.block_prefixes %} {% set form = widget.vars.prototype %} {% set name = widget.vars.full_name ~ '[' ~ widget.vars.prototype.vars.name ~ ']' %} {% else %} {% set form = widget %} {% set name = widget.vars.full_name %} {% endif %} {% set page_component_options = form.vars.page_component_options|merge(form.vars.componentOptions|default({})) %} {{ form_widget(form) }} {% endmacro %} {% block oro_sale_quote_product_widget %} {% set attr = attr|merge({'class': (attr.class is defined ? attr.class : '') ~ ' quote-lineitem-widget control-group'}) %} {% set commentCustomer = form.vars.value.commentCustomer|default(null) %} {% set commentSeller = form.vars.value.comment|default(null) %} {% set quoteProductRequests = form.vars.value.quoteProductRequests|default([]) %} {% set isProductFreeForm = form.vars.value.isProductFreeForm()|default(false) %} {% set isProductReplacementFreeForm = form.vars.value.isProductReplacementFreeForm()|default(false) %} {% set isProductReplacement = form.vars.value.isTypeNotAvailable()|default(false) %}
{{ form_widget(form.productSku) }} {{ form_errors(form.productSku) }}
{{ form_widget(form.product) }} {{ form_errors(form.product) }} {% if allow_add_free_form_items %} {{ 'oro.sale.quoteproduct.select.free_form'|trans }} {% endif %}
{{ form_widget(form.freeFormProduct, {attr: attr|merge({class: 'quote-lineitem-product-freeform-input'})}) }} {{ form_errors(form.freeFormProduct) }}
{% if allow_add_free_form_items %} {{ 'oro.sale.quoteproduct.select.product'|trans }} {% endif %}
{{ form_widget(form.productReplacement) }} {{ form_errors(form.productReplacement) }} {{ 'oro.sale.quoteproduct.select.free_form'|trans }}
{{ form_label(form.productReplacementSku) }} {{ form_widget(form.productReplacementSku) }} {{ form_errors(form.productReplacementSku) }} {{ form_label(form.freeFormProductReplacement) }} {{ form_widget(form.freeFormProductReplacement, {attr: attr|merge({class: 'quote-lineitem-productreplacement-freeform-input'})}) }} {{ form_errors(form.freeFormProductReplacement) }}
{{ 'oro.sale.quoteproduct.select.product'|trans }}
{{ form_widget(form.type) }} {{ block('oro_sale_quote_product_request_collection') }} {{ form_widget(form.quoteProductOffers) }} {{ form_errors(form.quoteProductOffers) }} {% if commentCustomer %}
{{ form_label(form.commentCustomer) }} {{ form_widget(form.commentCustomer) }}
{% endif %}
{{ form_label(form.comment) }}
{{ form_widget(form.comment, { 'attr': { 'class': 'quote-lineitem-notes-seller-textarea' } }) }} {{ form_errors(form.comment) }}
{% endblock %} {% block oro_sale_quote_product_request_collection %} {% if quoteProductRequests|length %} {% for child in quoteProductRequests %} {% endfor %}
{{ 'oro.sale.quoteproductrequest.quantity.label'|trans }} {{ 'oro.sale.quoteproductrequest.price.label'|trans }}
{{ child.quantity|oro_format_decimal }} {% if oro_is_unit_code_visible(child.productUnit.code) %} {{ child.productUnit }} {% endif %} {% if child.price is not empty %} {{ child.price|oro_format_price }} {% endif %}
{% endif %} {% endblock %} {% block oro_sale_quote_product_offer_collection_widget %} {% import _self as fields %} {% set widgetContainerAttributes %} {% with {'id': '', 'attr': []} %}{{ block('widget_container_attributes') }}{% endwith %} {% endset %} {% if prototype is defined %} {% set prototype_html = fields.oro_sale_quote_product_offer_prototype(form, true, widgetContainerAttributes) %} {% endif %} {% set attr = attr|merge({'class': (attr.class is defined ? attr.class ~ ' ' : '') ~ 'oro-item-collection grid-container hide' }) %} {% set id = id ~ '_collection' %}
{% set prototype_name = form.vars.prototype_name %}
{% if form.children|length %} {% for child in form.children %} {{ fields.oro_sale_quote_product_offer_prototype(child, false, widgetContainerAttributes) }} {% endfor %} {% elseif show_form_when_empty and prototype_html is defined %} {{ prototype_html|replace({(prototype_name): '0'})|raw }} {% endif %}
{{ 'oro.sale.quote.lineitem.offers.quantity'|trans }} {{ 'oro.sale.quote.lineitem.offers.price'|trans }}
{% endblock %} {% macro oro_sale_quote_product_offer_prototype(widget, prototype, attributes) %} {% if 'collection' in widget.vars.block_prefixes %} {% set form = widget.vars.prototype %} {% set name = widget.vars.full_name ~ '[' ~ widget.vars.prototype.vars.name ~ ']' %} {% else %} {% set form = widget %} {% set name = widget.vars.full_name %} {% endif %} {% set modelAttr = {} %} {% set productForm = form.parent.parent %} {% set quoteProduct = productForm.vars.value %} {% if quoteProduct is not empty %} {% set product = quoteProduct.product %} {% if product is not empty %} {% set modelAttr = {'product_units': product.sellUnitsPrecision} %} {% endif %} {% endif %} {{ form_widget(form, { 'prototype' : prototype}) }} {% endmacro %} {% block oro_sale_quote_product_offer_widget %}
{{ form_widget(form.quantity) }} {{ form_errors(form.quantity) }}
{{ form_widget(form.productUnit, {attr: form.productUnit.vars.attr|merge({class: 'quote-lineitem-offer-unit-select'})}) }} {{ form_errors(form.productUnit) }}
{% set attrs = {} %} {% if prototype|default(false) and form.allowIncrements.vars.attr.default is defined %} {% set attrs = attrs|merge({'checked' : 'checked'}) %} {% endif %} {{ form_widget(form.allowIncrements, attrs) }} {{ form_label(form.allowIncrements) }} {{ form_errors(form.allowIncrements) }}
{{ form_widget(form.priceType) }} {{ form_errors(form.priceType) }}
{{ form_widget(form.price) }} {{ form_errors(form.price) }}
{% endblock %} {% block oro_quote_address_type_widget %} {% if form.parent is not empty %}
{% endif %} {{ form_row(form.customerAddress) }} {{ form_row(form.id) }} {{ form_row(form.label, {label: 'oro.sale.quoteaddress.label.label'}) }} {{ form_row(form.namePrefix, {label: 'oro.sale.quoteaddress.name_prefix.label'}) }} {{ form_row(form.firstName, {label: 'oro.sale.quoteaddress.first_name.label'}) }} {{ form_row(form.middleName, {label: 'oro.sale.quoteaddress.middle_name.label'}) }} {{ form_row(form.lastName, {label: 'oro.sale.quoteaddress.last_name.label'}) }} {{ form_row(form.nameSuffix, {label: 'oro.sale.quoteaddress.name_suffix.label'}) }} {{ form_row(form.organization, {label: 'oro.sale.quoteaddress.organization.label'}) }} {{ form_row(form.country, {label: 'oro.sale.quoteaddress.country.label'}) }} {{ form_row(form.street, {label: 'oro.sale.quoteaddress.street.label'}) }} {{ form_row(form.street2, {label: 'oro.sale.quoteaddress.street2.label'}) }} {{ form_row(form.city, {label: 'oro.sale.quoteaddress.city.label'}) }} {{ form_row(form.region_text, {label: 'oro.sale.quoteaddress.region_text.label'}) }} {{ form_row(form.region, {label: 'oro.sale.quoteaddress.region.label'}) }} {{ form_row(form.postalCode, {label: 'oro.sale.quoteaddress.postal_code.label'}) }} {{ form_row(form.phone, {label: 'oro.sale.quoteaddress.phone.label'}) }} {{ form_rest(form) }} {% if form.parent is not empty %}
{% endif %} {% endblock %}