{% set userData = app.session.get('userData') %}
<form id="form-addInventoryPayment" method="POST">
    <h5>{{ page_title }}</h5>
    <div id="flash-messages-content-modal"></div>
    <div>
        <p><strong>Amount to pay :</strong>{{ addInventory.paymentbalance }}</p>
    </div>
    <div class="row max-width-initial">
        <div class="large-6 columns">
            <p class="form-hint-text">Enter basic information below</p>
            <div class="row">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.pay_date) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.pay_date) }}
                </div>
            </div>
            <div class="row">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.type) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.type) }}
                </div>
            </div>
            <div class="row">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.amount) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.amount) }}
                </div>
            </div>
            <div class="row">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.note) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.note) }}
                </div>
            </div>
        </div>
        <div class="large-6 columns">
            <p class="form-hint-text">Enter other information below</p>
            <div class="row">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.check_no) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.check_no) }}
                </div>
            </div>
            <div class="row">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.check_date) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.check_date) }}
                </div>
            </div>
            <div class="row">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.bank_description) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.bank_description) }}
                    {{ form_widget(form.bank) }}
                </div>
            </div>
        </div>

    </div>
    <hr>
    <div class="row max-width-initial">
        <div class="small-12 columns no-padding-right">
            <div class="button-container clearfix text-right">
                {% if action == 'u' and (userData.type == 'Super Admin' or 'Admin Add Inventory Payment Delete' in userData.accesses) %}
                    <a href="javascript:void(0)" class="ask-continue button alert href-addInventoryPayment-action float-right" data-axn="d"
                       data-message="Are you sure you want to delete this record?"
                       style="margin-left: 10px; margin-right: 0;"
                    >Delete</a>
                {% endif %}
                <a href="javascript:void(0)" class="button just-continue href-addInventoryPayment-action float-right" data-axn="{{ action }}"
                        data-message="Are you sure you want to save this information?"
                        style="margin-left: 10px; margin-right: 0;"
                >Save</a>
                <a href="javascript:void(0)" class="button secondary" data-close style="margin-left: 10px; margin-right: 0;">Close</a>
            </div>
        </div>
    </div>
    {{ form_widget(form.addInventory) }}
    {{ form_widget(form.action) }}
    {{ form_widget(form.id) }}
    {{ form_widget(form._token) }}
</form>