<tr class="edit-item-row">
    <td class="btn-group">
        {# TODO: Make this pretty for row actions (add tax, add item before, add item after...) #}
        <a class="btn btn-default btn-xs text-red" title="{% trans from 'core' %}item.form.remove{% endtrans %}"
           href="#" onclick="jQuery(this).parents('tr').remove();return false;"><span
                    class="glyphicon glyphicon-trash"></span></a>
    </td>

    {# CAMPO CODIGO DEL PRODUCTO
    {% if bundle_exists('SiwappProductBundle') %}
        <td class="col-md-xs">
            {{ form_widget(form.product, {'attr': {'class': 'product-autocomplete-name'}}) }}
            {{ form_errors(form.product) }}

            {% if bundle_exists('SiwappProductBundle') %}
                <script>
                    $(function () {
                        addProductNameAutocomplete('{{ path('product_autocomplete_reference') }}');
                    });
                </script>
            {% endif %}
        </td>
    {% endif %}
    #}

    <td class="col-md-xs" style="display: none">
        {{ form_widget(form.product) }}
    </td>


<td width="50%">
    {{ form_widget(form.description, {
        'attr': {
            'class': 'text-uppercase product-autocomplete-description'
        }
    }) }}
    {{ form_errors(form.description) }}

    <script>
        $(function () {
            addInvoiceItemDescriptionAutocomplete('{{ path('item_autocomplete_description') }}');
        });
    </script>

    {% if form.detalles_adicionales is defined %}
    <div style="margin-top: 5px;">
        <label style="display: block; margin-bottom: 2px; font-size: 11px;">
            Detalles adicionales
        </label>

        {{ form_widget(form.detalles_adicionales, {
            'attr': {
                'class': 'text-uppercase',
                'maxlength': 20,
                'style': 'width: 200px;'
            }
        }) }}

        {{ form_errors(form.detalles_adicionales) }}
    </div>
{% endif %}
</td>


    <td class="cell-align-right">
        {{ form_widget(form.quantity) }}
        {{ form_errors(form.quantity) }}
    </td>

    <td class="cell-align-right">
        {{ form_widget(form.unitary_cost) }}
        {{ form_errors(form.unitary_cost) }}
    </td>

    <td class="cell-align-right">
        {{ form_widget(form.discount_percent) }}
        {{ form_errors(form.discount_percent) }}
    </td>

    <td class="taxes form-inline">
        {{ form_widget(form.taxes) }}
        {{ form_errors(form.taxes) }}
        <script type="text/javascript">
            $("select#{{ form.taxes.vars.id }} option[value='']").remove();
        </script>
    </td>

    <td class="cell-align-right item-gross-amount">
        {{ entity.grossAmount|localizedcurrency(currency, app.request.locale) }}
    </td>
</tr>
