
<style>
    @media print{
        .dataTables_info , .dataTables_paginate , .dataTables_length , .dataTables_filter{
            display: none;
        }
    }
</style>
<div class="row">
    <div class="container">

        <ol class="breadcrumb">
            <li><a href="#">العيادات</a></li>
            <li><a href="rb_doc_kashf.php?do=">كشف</a></li>
            <li class="active">عرض  الكشوفات</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading">عرض   الكشوفات</div>
            <div class="panel-body">


                <!---------(Spry.Widget.Form.validate(this))-------->
                <!-- Nav tabs -->
                <ul class="nav nav-tabs hidden-print">
                    <li class="active"><a href="#info" data-toggle="tab">زيارات اليوم</a></li>
                    <li><a href="#props" data-toggle="tab">تم الكشف</a></li>
                </ul>



                <!-- Tab panes -->
                <div class="tab-content">


                    {if empty($data)}


                    <div class="tab-pane active hidden-print" id="info"><!-- start the 1st tab -->

                        <table class="table table-black">
                            <thead>
                                <tr>

                                    <th> <h1>لا توجد زيارات اليوم</h1></th>
                            <th> <a href="rb_kashf.php" class="btn btn-default btn-lg "> اضافة كشف جديد</a>  </th>

                            </tr>
                            </thead>
                        </table>





                    </div><!-- end the 1st tab -->


                    {else}
                    <div class="tab-pane active" id="info"><!-- start the 1st tab -->
                        <a href="rb_kashf.php" class="btn btn-default btn-sm "> اضافة كشف جديد</a> 

                        <table class="table table-black">
                            <thead>
                                <tr>

                                    <th>اسم العميل</th>
                                    <th>اسم الطبيب</th>
                                    <th class="hidden-print">دخول</th>

                                </tr>
                            </thead>
                            <tbody>


                                {assign var="i" value = 1}

                                {foreach $data as $myalldata}


                                <tr>

                                    {if $myalldata->entered eq 0}

                                    <td>{$myalldata->custname}</td>
                                    <td>{$myalldata->docname}</td>
                                    <td class="noprint hidden-print">
                                        <a href="rb_doc_kashf.php?do=addnew&id={$myalldata->id}" class="btn btn-default btn-lg editicon"></a>
                                    </td>

                                    {/if}
                                </tr>
                                {assign var="i" value= $i+1 }
                                {/foreach}


                            </tbody>
                        </table>

                    </div><!-- end the 1st tab -->
                    {/if}
                    <div class="tab-pane" id="props"><!-- start the 2nd tab -->


                        <!-- search -->

                        <form class="form-inline hidden-print" action="javascript:;" method="post">
                            <div class="form-group">
                                <label class="sr-only">من التاريخ</label>
                                <input type="text" class="form-control awdatepicker" autocomplete="off"   id='datefrom' data-date-format="yyyy-mm-dd" name="datefrom" >
                            </div>
                            <div class="form-group">
                                <label class="sr-only">إلى التاريخ</label>
                                <input type="text" class="form-control awdatepicker" autocomplete="off"  id="dateto"  data-date-format="yyyy-mm-dd" name="dateto" >
                            </div>

                            <div class="form-group">
                                <label class="sr-only">الفرع</label>
                                <select class="select2 wdt300"  name="branchId" id="branchId" >
                                    <option value="-1">اختر الفرع</option>
                                    <option value="0">كل الفروع</option>
                                    {foreach $branchData as $branch}
                                    <option value="{$branch->branchId}">{$branch->branchName}</option>
                                    {/foreach}
                                </select>
                            </div>

                            <button id='search' type="submit" class="btn btn-primary">بحث</button>
                        </form>
                        <div id='mytbody'>

                            <table class="dataTableClass  table table-black">
                                <thead>
                                    <tr>
                                        <th><span style="margin-right: 10px;margin-top: 10;"> رقم الكشف</span></th>
                                        <th><span style="margin-right: 10px;margin-top: 10;">اسم العميل</span></th>
                                        <th><span style="margin-right: 10px;margin-top: 10;">اسم الطبيب</span></th>
                                        <th><span style="margin-right: 10px;margin-top: 10;">سعر الكشف</span></th>
                                        <th><span style="margin-right: 10px;margin-top: 10;">نوع الكشف</span></th>
                                        <th><span style="margin-right: 10px;margin-top: 10;">التاريخ</span></th>

                                        <th  class="hidden-print"><span style="margin-right: 10px;margin-top: 10;">التفاصيل</span></th>
                                        <th class="hidden-print"><span style="margin-right: 10px;margin-top: 10;">تعديل</span> </th>
                                        <th  class="hidden-print"> <span style="margin-right: 10px;margin-top: 10;">حذف</span> </th>
                                    </tr>
                                </thead>
                                <tbody >
                                    {assign var="i" value= 1 }
                                    {foreach $doctorkashf as $mydata}
                                    <tr>
                                        <td>{$mydata->kashfid}</td>
                                        <td>{$mydata->clientName}</td>
                                        <td>{$mydata->docName}</td>
                                        
                                        {foreach $allKashf as $kash_data}
                                            {if $mydata->kashfid eq $kash_data->id}
                                                <td>{$kash_data->kashfvalue}</td>
                                                <td>{$kash_data->kashftype}</td>
                                            {/if}
                                        {/foreach}    
                                        

                                        <td>{$mydata->date}</td>
                                        <td class="noprint hidden-print">
                                            <a style="padding-top: 3px;padding-bottom: 1px;padding-left: 6px;padding-right: 6px;" href="rb_doc_kashf.php?do=details&id={$mydata->id}&custid={$mydata->customerid}" class="btn btn-default btn-lg glyphicon glyphicon-eye-open"></a>
                                        </td>
                                <input type="hidden" name="custid" value="{$mydata->customerid}"/>

                                <td class="noprint hidden-print">
                                    <a href="rb_doc_kashf.php?do=edit&id={$mydata->id}" class="btn btn-default btn-lg editicon"></a>
                                </td>


                                <td class="hidden-print">

                                    <a href="rb_doc_kashf.php?do=delete&id={$mydata->id}" name="dd" type="button" class="btn btn-default btn-lg deleteicon conformdel1" data-position="menuurController.php?do=delete&id={$myalldata->menuurlid}" ></a>


                                </td>


                                </tr>
                                {assign var="i" value= $i+1 }

                                {/foreach}

                                </tbody>
                        </div>
                        </table>
                    </div>
                    <!--==============================-->

                </div><!-- end the 2nd tab -->
            </div><!-- end of tabs -->
            <!--==============================-->

            <!--==============================-->
        </div>

    </div>

</div>
</div>
