<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h6 class="text-center"><strong> الارشيف</strong> </h6>
            </div>
            <div class="panel-body">
                <form class="form-inline hidden-print " action="maintennanceArchiveController.php?do=all" method="post">

                    <div class="form-group">
                        <label class="sr-only">سيريال الفاتورة</label>
                        <select class="select2 wdt100"  name="receiptSerial" id="receiptSerial" >
                            <option value="-1"> اختر </option>
                            {foreach $allReceiptSerials as $myData}
                            <option value="{$myData->receiptserial}">{$myData->receiptserial}</option>
                            {/foreach}
                        </select>
                    </div>

                    <div class="form-group">
                        <label class="sr-only"> السيريال الخاص</label>
                        <select class="select2 wdt100"  name="ourserial" id="ourserial" >
                            <option value="-1"> اختر </option>
                            {foreach $serials as $myData}
                            <option value="{$myData->ourserial}">{$myData->ourserial}</option>
                            {/foreach}
                        </select>
                    </div>


                    <div class="form-group">
                        <label class="sr-only"> العميل</label>
                        <select class="select2 wdt100"  name="clientid" id="clientid" >
                            <option value="-1"> اختر </option>
                            {foreach $clients as $myData}
                            <option value="{$myData->clientid}">{$myData->clientname}</option>
                            {/foreach}
                        </select>
                    </div>



                    <!--<div class="form-group" >
                      <label class="sr-only">من التاريخ</label>
                      <input type="text" class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd" name="from" >
                    </div>
                    <div class="form-group">
                      <label class="sr-only">إلى التاريخ</label>
                      <input type="text" class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd" name="to" >
                    </div>-->

                    <button type="submit" class="btn btn-primary">بحث</button>

                </form>
                <br/>
            </div>
        </div>
    </div>
</div>


{if count($archiveData)>0}
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h6 class="text-center"><strong> النتائج</strong> </h6>
            </div>
            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-condensed table-black">
                        <thead>
                            <tr>
                                <td><strong>اسم العميل</strong></td>
                                <td class="text-center"><strong>اسم الجهاز</strong></td>
                                <td class="text-center"><strong>سيريال الفاتورة</strong></td>
                                <td class="text-center"><strong> السيريال الخاص</strong></td>
                                <td class="text-center"><strong> سيريال القطعة</strong></td>
                                <td class="text-center"><strong> نوع الصيانة</strong></td>
                            </tr>
                        </thead>
                        <tbody>
                            {assign var="i" value="1"}
                            {foreach $archiveData as $myarchiveData}
                            <tr>
                                <td>{$myarchiveData->clientname}</td>
                                <td class="text-center">{$myarchiveData->productName}</td>
                                <td class="text-center">{$myarchiveData->receiptserial}</td>
                                <td class="text-center">{$myarchiveData->ourserial}</td>
                                <td class="text-center">{$myarchiveData->productserial}</td>
                                <td class="text-center">
                                    {if $myarchiveData->granttype == 0}
                                    صيانة
                                    {else if $myarchiveData->granttype == 1}
                                    ضمان عميل
                                    {else if $myarchiveData->granttype == 2}
                                    ضمان شركة
                                    {/if}
                                </td>
                            </tr>
                            {assign var="i" value=$i+1}
                            {/foreach}

                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
{/if}