
<div class="page-content-wrapper">
    <div class="page-content all">
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN EXAMPLE TABLE PORTLET-->

                <div class="portlet box blue">
                    <div class="portlet-title">
                        <div class="caption fright">
                            <i class="fa fa-cogs fright" style="margin-left: 5px;"></i>التحويلات الخارجية
                        </div>
                        <div class="actions fleft">
                            <a href="{$hosturl}/controllers/{$controllname}.php?ac=external_transfer"
                               class="btn btn-default btn-sm"> <i class="fa fa-plus"></i> إضافة  </a>
                        </div>
                    </div>
                    <div class="portlet-body">

                        <div class="row rtl">
                            <div class="col-md-2 wds9">
                                <div class="form-group">
                                    <label class="control-label ls2">تاريخ من </label>
                                    <input type="text" class="form-control datepicker"  style=" border: 1px solid #000000;"
                                           readonly="readonly"  id="dateFrom"   value="{$today}"/>
                                </div>
                            </div>

                            <div class="col-md-2 wds9">
                                <div class="form-group">
                                    <label class="control-label ls2">تاريخ إلى </label>
                                    <input type="text" class="form-control datepicker"  style=" border: 1px solid #000000;"
                                           readonly="readonly"  id="dateTo"   value="{$today}"/>
                                </div>
                            </div>

                            <div class="col-md-2 wds11">
                                <div class="form-group">
                                    <label class="control-label ls2">رقم الحالة  </label>
                                    <input type="text"  id="statusNoRemote"
                                           class="form-control  txtc searchPatRemote positiveNo "  data-alert="no"  >
                                </div>
                            </div>

                            <div class="col-md-5 wds25">
                                <div class="form-group">
                                    <label class="control-label ls2">إسم  الحالة  </label>
                                    <input type="hidden" class="form-control"    id="patientIdRemote" >
                                </div>
                            </div>




                            <div class="col-md-1">
                                <a class="btn btn-primary btn-sm"   id="searchExternalBtn"
                                   style="    margin-top: 21px;"  >
                                    <i class="fa fa-search"></i> بحث  </a>
                            </div>

                        </div>


                        <div class="portlet-body form" id="financialDiv">
                            <table class="table table-striped table-bordered table-hover rtl" id="sample_3">
                                <thead>
                                    <tr>
                                        <th class="wds5">م </th>
                                        <th>رقم  الحالة </th>
                                        <th>اسم الحالة </th>
                                        <th>التاريخ   </th>
                                        <th>توصيف العملية  </th>
                                        <th>التكلفة    </th>
                                        <th>المرفقات     </th>
                                        <th> المستخدم   </th>
                                        <th width="5%">Print</th>
                                        <th width="5%">تعديل </th>
                                        {if $allowDelBtn  == 1}<th width="5%">حذف </th>   {/if}
                                    </tr>
                                </thead>
                                <tbody>
                                    {assign var=m value=1}
                                    {foreach $external_transfer as $single}
                                    <tr class="odd gradeX">
                                        <td>{$m}</td>
                                        <td>{$single.statusno}</td>
                                        <td>{$single.patientName}</td>
                                        <td>{$single.transfer_date}</td>
                                        <td>{$single.discription}</td>
                                        <td>{$single.cost}</td>
                                        <td>
                                            {if $single.img}
                                            <a class="btn btn-xs blue" target="_blank"   title="تنزيل "
                                               href="{$hosturl}/../upload/transferimg/{$single.img}">
                                                <i class="fa fa-download"></i>  </a>
                                            {/if}
                                        </td>
                                        <td>{$single.userName}</td>
                                        <td>
                                            <a class="btn btn-default btn-xs printTrExternal"
                                               data-id="{$single.id}" ><i class="fa fa-print"></i> Print
                                            </a>
                                        </td>
                                        <td>
                                            <a href="{$hosturl}/controllers/{$controllname}.php?ac=externalEdit&id={$single.id}"
                                               class="btn green btn-block btn-xs"><i class="fa fa-pencil"></i> Edit</a>
                                        </td>
                                        {if $allowDelBtn  == 1}
                                        <td>
                                            <a class="btn grey-cascade btn-xs deletemsgEX" data-id="{$single.id}"
                                               data-tableName="external_transfer"
                                               data-link="{$controllname}"  data-fn="del"><i class="fa fa-times"></i>Delete </a>
                                        </td>
                                        {/if}
                                    </tr>
                                    {capture assign=m}{$m+1}{/capture}
                                    {/foreach}
                                </tbody>

                            </table>
                        </div>
                        <div id="printDiv"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>




<div id="talks-loading" style="z-index: 3000;position: absolute;top: 7%;right: 2%;left: 6%;display:none; height: 65%; background-color: rgba(0, 0, 0,0.27); padding-top: 10%;" align="center">
    <img src="{$hosturl}/../upload/loading.gif">
</div>




