{% set userData = app.session.get('userData') %}
<form id="form-purchaseOrderVoid" method="POST">
    <input type="hidden" name="purchaseOrder_id" value="{{ purchaseOrder_id }}" />
    <h4>{{ page_title }}</h4>
    <div id="flash-messages-content-modal"></div>
    <p class="form-hint-text">Enter basic information below</p>
    <table class="display responsive" id="purchaseOrderItemAddQuantity-datalist" width="100%">
        <thead>
        <tr>
            <th>Item</th>
            <th>Required Qty</th>
            <th>Qty With PO</th>
            <th>Add Qty</th>
        </tr>
        </thead>
        <tbody>
        {% for key,purchaseOrderItem in purchaseOrder.purchaseorderitems %}
            <tr>
                <td>{{ purchaseOrderItem.materialrequisitionitem.item.description }}</td>
                <td>{{ purchaseOrderItem.quantity }}</td>
                <td>{{ purchaseOrderItem.quantitywithpo }}</td>
                <td>
                    <input type="hidden" name="purchaseOrderItems[{{ key }}][id]" value="{{ purchaseOrderItem.id }}" />
                    <input type="text" class="amount" name="purchaseOrderItems[{{ key }}][quantityAdded]" value="{{ purchaseOrderItem.quantityadded }}" />
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
    <br/>
    <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-purchaseOrderAddQuantity-action float-right" id="href-purchaseOrderAddQuantity-action" name="action" value=""
                        data-message="Are you sure you want to save this information?"
                >Save</button>
            </div>
        </div>
    </div>
</form>