<div class="page-content-wrapper">
    <div class="page-content">
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN EXAMPLE TABLE PORTLET-->
                <div class="portlet box blue">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="fa fa-users"></i>Payment Rest Report
                        </div>
                    </div>
                    <div class="portlet-body all">
                        <input type="hidden" id="reportPage" value="1"/>
                        <input type="hidden" id="tdate" value="{$today}">
                        <input type="hidden" id="controllName" value="financialreport"/>
                        <!--Begin Semen-->

                        <div class="row">
                            <div class="row clinick posre">
                                <div class="col-md-2 wds10">
                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                        <input type="text" class="form-control datepicker txtc " id="findate" value="{$today}"/>
                                        <label for="form_control_1">Date From </label>
                                    </div>
                                </div>

                                <div class="col-md-2 wds10">
                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                        <input type="text" class="form-control datepicker txtc " id="tofindate" value="{$today}"/>
                                        <label for="form_control_1">Date To </label>
                                    </div>
                                </div>

                                <div class="col-md-2 wds10">
                                    <div class="form-group">
                                        <label class="control-label ls2">Patient No</label>
                                        <input type="text" name="search" id="statusNo" 
                                               class="form-control searchPat txtc sbystno" >
                                    </div>
                                </div>


                                <div class="col-md-3">
                                    <div class="form-group">
                                        <label class="control-label ls2">Patient Name</label>

                                        <select class="form-control searchFin " id="patientName">
                                            <option value="">choose</option>
                                            {foreach  $allPatients as $data}
                                            <option value="{$data->id}" >{$data->wifename}</option>
                                            {/foreach}
                                        </select>

                                    </div>
                                </div>

                                <div class="col-md-3">
                                    <div class="form-group">
                                        <label class="control-label ls2">Husband Name</label>

                                        <select class="form-control searchFin " id="husband">
                                            <option value="">choose</option>
                                            {foreach  $allPatients as $data}
                                            <option value="{$data->husdandname}" >{$data->husdandname}</option>
                                            {/foreach}
                                        </select>

                                    </div>
                                </div>

                                <div class="col-md-2 wds20">
                                    <div class="form-group">
                                        <label class="control-label ls2">Address</label>
                                        <input type="text" name="address" id="patAddress" 
                                               class="form-control  txtc" >
                                    </div>
                                </div>



                            </div>

                            <div class="clearfix"></div>

                            <div class="portlet box white">
                                <div class="portlet-title">
                                    <div class="actions">

                                        <a class="btn btn-primary btn-sm" id="paymentSearchBtn" >
                                            <i class="fa fa-search"></i> Search </a>

                                        <a class="btn btn-default btn-sm" id="printPayment" >
                                            <i class="fa fa-print"></i> Print </a>

                                    </div>
                                </div>

                                <div class="portlet-body form" id="financialDiv">
                                    <table class="table table-hover portlet light bg-inverse dataTable ">
                                        <caption class="txtc"> Visits </caption>
                                        <thead>
                                            <tr>
                                                <th style="width: 10px !important;">#</th>
                                                <th>   Patient Name </th>
                                                <th>Patient Number</th>
                                                <th>Visit Date</th> 
                                                <th>Type</th>
                                                <th>   Total      </th>
                                                <th>   Debt </th>
                                                <th>   Notes </th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            {assign var="i" value="1"}
                                            {foreach $visits as $data}
                                            <tr class="odd " >
                                                <td>{$i}</td>
                                                <td>
                                                    <a href="{$hosturl}/controllers/patienthistory.php?ac=show&patientid={$data.patientid}" target="_new">{$data.wifename}</a>
                                                </td>
                                                <td>{$data.statusno}</td>
                                                <td>   {$data.visitdate}  </td>  
                                                <td>{$data.type}</td>
                                                <td>  {$data.totaldetectionvalue} </td>
                                                <td> {$data.dept} </td>
                                                <td> {$data.vnotes} </td>
                                            </tr>
                                            {assign var="i" value={$i+1}}
                                            {/foreach}
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="clearfix"></div>
<div id="financialPrint"></div>
