{% set userData = app.session.get('userData') %}
<form id="form-purchaseOrderBreakdownAddQuantity" method="POST">
    <input type="hidden" name="purchaseOrderBreakdown_id" value="{{ purchaseOrderBreakdown_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="purchaseOrderBreakdownItemAddQuantity-datalist" width="100%">
        <thead>
        <tr>
            <th>Item</th>
            <th>Required Qty</th>
            <th>Qty Received</th>
            <th>Add Quantity</th>
        </tr>
        </thead>
        <tbody>
        {% for key,purchaseOrderBreakdownItem in purchaseOrderBreakdown.purchaseorderbreakdownitems %}
            <tr>
                <td>{{ purchaseOrderBreakdownItem.purchaseorderitem.materialrequisitionitem.item.description }}</td>
                <td>{{ purchaseOrderBreakdownItem.quantity }}</td>
                <td>{{ purchaseOrderBreakdownItem.quantityreceived }}</td>
                <td>
                    <input type="hidden" name="purchaseOrderBreakdownItems[{{ key }}][id]" value="{{ purchaseOrderBreakdownItem.id }}" />
                    <input type="text" class="amount" name="purchaseOrderBreakdownItems[{{ key }}][addQuantity]" value="{{ purchaseOrderBreakdownItem.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-purchaseOrderBreakdownAddQuantity-action float-right" id="href-purchaseOrderBreakdownAddQuantity-action" name="action" value=""
                        data-message="Are you sure you want to save this information?"
                >Save</button>
            </div>
        </div>
    </div>
</form>