title = "orders/report"
url = "/orders/report"
layout = "platform_main"
is_hidden = 0

[order]
==
<?php
function onStart(){
    $this["clients"] = Romanah\Gokbakja\Models\Client::get();
}
?>
==
{% put styles %}
<link href="{{'assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css'|theme}}" rel="stylesheet"
    type="text/css" />
<link href="{{'assets/libs/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css'|theme}}" rel="stylesheet"
    type="text/css" />
<link href="{{'assets/libs/datatables.net-select-bs4/css/select.bootstrap4.min.css'|theme}}" rel="stylesheet"
    type="text/css" />

<link href="{{'assets/libs/select2/css/select2.min.css'|theme}}" rel="stylesheet" type="text/css">
{% endput %}


<div class="container-fluid">
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-body">
                    <form data-request="onReportOrder" data-request-flash>
                        <div class="row">
                            <div class="col">
                                <div>
                                    <label class="form-label">Seneleri Saýlaň</label>

                                    <div class="input-daterange input-group" id="datepicker6"
                                        data-date-format="d.m.yyyy" data-date-autoclose="true" data-provide="datepicker"
                                        data-date-container='#datepicker6'>
                                        <input type="text" class="form-control" name="start"
                                            placeholder="Başlanýan sene" />
                                        <input type="text" class="form-control" name="end"
                                            placeholder="Gutarýan sene" />
                                    </div>
                                </div>
                            </div>
                            <div class="col">
                                <label class="form-label">Klent Saýlaň</label>
                                <select class="form-control select2" name="client_id">
                                    <option value="0">Saýla</option>
                                    {% for client in clients %}
                                    <option value="{{client.id}}">{{client.name}}</option>
                                    {% endfor %}
                                </select>
                            </div>

                            <div class="col">
                                <label class="form-label">Şertnama nomeri</label>
                                <input name="contract_no" class="form-control" placeholder="Şertnama nomeri">
                            </div>

                            <div class="col">
                                <label class="form-label">Bellik</label>
                                <input name="note" class="form-control" placeholder="Bellik">
                            </div>


                            <div class="col">
                                <button type="submit" class="btn btn-primary waves-effect waves-light"
                                    style="margin-top: 30px;width: 100%;">Hasabat</button>
                            </div>



                        </div>
                    </form>

                </div>
            </div>
        </div>

    </div>
    <div class="row">


    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-body">
                    <div class="row" id="all_amount_report">
                        <div class="col-md-6">
                            <h3 class="card-title" style="font-size: 22px;color: #1e2038;">Sargytlar Boýunça Umumy</h3>
                            <p class="card-title-desc" style="color: #6c6ff5;">Hasabat</p>
                        </div>

                    </div>


                    <table id="datatable-buttons" class="table table-striped table-bordered dt-responsive nowrap"
                        style="border-collapse: collapse; border-spacing: 0; width: 100%;" data-page-length='13'>
                        <thead>
                            <tr>
                                <th style="width: 5%;">№</th>
                                <th>Sargyt No</th>
                                <th>Klent</th>
                                <th>Şertnama nomer</th>
                                <th>Ýurdy</th>
                                <!-- <th>Mukdary</th> -->
                                <th>Bahasy</th>
                                <th>Tölenen</th>
                                <th>Bergisi</th>
                                <th>Senesi</th>
                                <th>Bellik</th>
                            </tr>
                        </thead>
                        <tbody id="orders_report_datas">


                        </tbody>
                        <tfoot>
                            <tr>
                                <th style="width: 5%;">№</th>
                                <th>Sargyt No</th>
                                <th>Klent</th>
                                <th>Şertnama nomer</th>
                                <th>Ýurdy</th>
                                <!-- <th>Mukdary</th> -->
                                <th>Bahasy</th>
                                <th>Tölenen</th>
                                <th>Bergisi</th>
                                <th>Senesi</th>
                                <th>Bellik</th>
                            </tr>
                        </tfoot>
                    </table>
                </div>



            </div>
        </div>
    </div>
</div>


{% partial 'dataTableJs' %}
{% put scripts %}
<script src="{{'assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js'|theme}}"></script>
<script src="{{'assets/libs/select2/js/select2.min.js'|theme}}"></script>
<script src="{{'assets/js/pages/form-advanced.init.js'|theme}}"></script>
{% endput %}
