{#
{% set userData = app.session.get('userData') %}
<form id="form-materialRequisitionItem" method="POST">
    <h5>{{ page_title }}</h5>
    <div id="flash-messages-content-modal"></div>
    <p class="form-hint-text">Basic Information</p>
    {% if userData.type == 'Super Admin' or 'Admin Item New' in userData.accesses %}
        <div class="row">
            <div class="small-12 columns text-right">
                <a target="_blank" href="{{ path('item_form') }}" >New Item</a>
            </div>
        </div>
    {% endif %}
    <div class="row">
        <div class="large-4 large-text-right columns">
            {{ form_label(form.item_description) }}
        </div>
        <div class="large-8 columns">
            {{ form_widget(form.item_description) }}
            {{ form_widget(form.item_id) }}
        </div>
    </div>
    <div class="row">
        <div class="large-4 large-text-right columns">
            {{ form_label(form.location_description) }}
        </div>
        <div class="large-8 columns">
            {{ form_widget(form.location_description) }}
            {{ form_widget(form.location_id) }}
        </div>
    </div>
    <div class="row">
        <div class="large-4 large-text-right columns">
            {{ form_label(form.quantity) }}
        </div>
        <div class="large-8 columns">
            {{ form_widget(form.quantity) }}
        </div>
    </div>
    <div class="row">
        <div class="large-4 large-text-right columns">
            {{ form_label(form.control_no) }}
        </div>
        <div class="large-8 columns">
            {{ form_widget(form.control_no) }}
        </div>
    </div>
    <hr>
    <div class="row max-width-initial">
        <div class="small-12 columns no-padding-right">
            <div class="button-container clearfix">
                <button type="button" class="button just-continue href-materialRequisitionItem-action float-right" name="action" value="{{ action }}"
                        data-message="Are you sure you want to save this information?"
                >Save</button>
                {% if action == 'u' and (userData.type == 'Super Admin' or 'Admin Material Requisition Item Update Delete' in userData.accesses) %}
                    <button type="button" class="ask-continue button alert href-materialRequisitionItem-action float-right" name="action" value="d"
                            data-message="Are you sure you want to delete this record?"
                    >Delete</button>
                {% endif %}
            </div>
        </div>
    </div>
    {{ form_widget(form.materialRequisition_id) }}
    {{ form_widget(form.action) }}
    {{ form_widget(form.id) }}
    {{ form_widget(form._token) }}
</form>#}

{################################################### This is new item form start #############################################}
<h5>{{ page_title }}</h5>
<div id="flash-messages-content-modal"></div>
<div class="row max-width-initial">
    {#<div class="large-6 columns">
        <label>Default Location</label>
        <input type="text" id="default_location_description" name="default_location_description">
        <input type="hidden" id="default_location_id" name="default_location_id">
    </div>#}
    <div class="large-6 columns no-padding-left">
        <label>Category</label>
        <select id="addItemFormFilter-itemCategory">
            <option value=""></option>
            {% for ic in itemCategories %}
                <option value="{{ ic.id }}">{{ ic.description }}</option>
            {% endfor %}
        </select>
        {#<input type="text" id="item_category_description" name="item_category_description">
        <input type="hidden" id="item_category_id" name="item_category_id">#}
    </div>
    <div class="large-6 columns no-padding-left">
        <label>Supplier</label>
        <select id="addItemFormFilter-supplier">
            <option value=""></option>
            {% for supplier in suppliers %}
                <option value="{{ supplier.id }}">{{ supplier.description }}</option>
            {% endfor %}
        </select>
    </div>
</div>
<table class="display responsive" id="item-datalist" width="100%">
    <thead>
    <tr>
        <th>Supplier</th>
        <th>Item</th>
        {#<th>Location</th>#}
        <th>Current Quantity</th>
        {#<th>Previous Cost</th>#}
        <th>Order Quantity</th>
        <th>Price</th>
        <th>Tax (%)</th>
        <th>Total Price</th>
        <th>Notes</th>
        {#<th>UOM</th>#}
        {#<th>Control No.</th>#}
        <th>Action</th>
    </tr>
    </thead>
    <tbody></tbody>
</table>
<br/>
<div class="row max-width-initial">
    <div class="small-12 columns no-padding-right">
        <div class="button-container clearfix text-right">
            <a href="javascript:void(0)" class="button secondary" data-close style="margin-left: 10px; margin-right: 0;">Close</a>
        </div>
    </div>
</div>
{################################################### This is new item form end #############################################}