{% 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 %}
{{ '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 }}
{% 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.add'|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.vars.value.productSku|default('') }}
{{ form_widget(form.productSku) }}
{{ form_errors(form.productSku) }}
{{ 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 %}
{% 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 %}
{{ 'oro.sale.quote.lineitem.offers.quantity'|trans }}
{{ 'oro.sale.quote.lineitem.offers.price'|trans }}
{% 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.add'|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 %}