{% extends '@RxConnexion/Admin/content.html.twig' %}
{% block content %}
    <div class="row max-width-initial">
        <div class="small-12 columns">
            <div class="content-container">
                <div class="content-container-content">
                    <div class="row max-width-initial">
                        <div class="large-12 columns">
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Date From</label>
                                    <input type="text" class="date" id="date_from" value="{{ 'now'|date('m/d/Y') }}" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Date To</label>
                                    <input type="text" class="date" id="date_to" value="{{ 'now'|date('m/d/Y') }}" />
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Patient</label>
                                    <input type="text" id="form-patient-fullName" />
                                    <input type="hidden" id="form-patient-id" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Company</label>
                                    <select class="js-multiple-company" name="" id="companies" multiple="multiple" style="">
                                        {% for companies in company %}
                                            <option value="{{ companies.id }}">{{ companies.description }}</option>
                                        {% endfor %}
                                    </select>
                                    <input type="hidden" id="form-company-id" />
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Billing Branch</label>
                                    <select class="js-multiple-branches" name="" id="branches" multiple="multiple" style="">
                                        {% for branches in branch %}
                                            <option value="{{ branches.id }}">{{ branches.description }}</option>
                                        {% endfor %}
                                    </select>
                                    <input type="hidden" id="form-branch-id" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Billing Address</label>
                                    <select class="js-multiple-branchAddress" name="" id="branchAddress" multiple="multiple" style="">
                                        {% for branches in branch %}
                                            <option value="{{ branches.id }}">{{ branches.description }}</option>
                                        {% endfor %}
                                    </select>
                                    <input type="hidden" id="form-branch-address-id" />
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Item Type</label>
                                    <select name="All" id="form-item-type">
                                        <option value="" selected>All</option>
                                        <option value="cpap_package">CPAP Package</option>
                                        <option value="accessory">Accessory</option>
                                        <option value="medical_supplies">Medical Supplies</option>
                                        <option value="Part of CPAP Package">Part of CPAP Package</option>
                                    </select>
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Term</label>
                                    <select name="All" id="form-term">
                                        <option value="" selected>All</option>
                                        <option value="long_term">Long Term Rental</option>
                                        <option value="rent_to_own">Rent to Own</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    {%
                        include '@RxConnexion/Report/buttons.html.twig'
                        with {
                        'preview_url': 'main/report/report_invoice_itemised/preview',
                        'export_to_pdf_url': 'main/report/report_invoice_itemised/export_to_pdf',
                        'export_to_excel_url': 'main/report/report_invoice_itemised/export_to_excel',
                        'paramsIds': 'date_from|date_to|form-patient-id|form-company-id|form-branch-id|form-branch-address-id|form-term|form-item-type'
                    }
                    %}
                </div>
            </div>
        </div>
    </div>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script language="javascript">
        //<![CDATA[
        jQ('.js-multiple-branches, .js-multiple-company, .js-multiple-branchAddress').select2();
        jQ(document).ready(function(){
            invoice_itemised.settings.patient_autocomplete_url = '{{ path('patient_autocomplete') }}';
            report.init('{{ app.environment }}');
            invoice_itemised.init();
        });
        //]]>
    </script>
{% endblock %}