{foreach $allvisit as  $day => $dayVisits}
<table class="table table-bordered table-striped table-hover rtl"  >
    <caption class="txtc bold" style="background-color: #666;color: white;"> 
        {$day} 
    </caption>
    <thead>
        <tr>
            <th class="wds5 txtc">Ptn No </th>
            <th class="txtc">Ptn Name</th>
            <th class="txtc">Operation</th>  
            <th class="txtc">Place</th>  
            <th class="txtc">Notes</th>  
            <th class="txtc">Husband</th>  
            <th class="txtc"> Address </th>
            <th class="wds10 txtc"> Tel  </th>
            <th class="wds10 txtc"> Date </th>
            <th class="wds3 txtc"> </th>
            <th class="wds3 txtc"> </th>
        </tr>
    </thead>
    <tbody>
        {assign var=i value=1}
        {foreach $dayVisits as $row}
        <tr>
            <td> {$row.patientNo}</td>
            <td> {$row.patientName}</td>
            <td> {$row.operation}</td>
            <td> {$row.place}</td>
            <td> {$row.notes}</td>
            <td> {$row.husbandName}</td>
            <td> {$row.address}</td>
            <td> {$row.phone}</td>
            <td> {$row.opdate}</td>
            <td><a class=" bg-green dltbtn  editOpVisit" data-visitId="{$row.id}" id="editOpVisit{$row.id}">
                    <i class="fa fa-pencil"></i>
                </a>
            </td>
            <td>
                <a class="deleteOpVisitAjax bg-red dltbtn"  data-today="0"  id="deleteOpvisit{$row.id}" data-id="{$row.id}" 
                   data-link="op_wait_list" data-fn="del">
                    <i class="fa fa-close"></i>
                </a>
            </td>
        </tr>
        {capture assign=i}{$i+1}{/capture}
        {/foreach}
    </tbody>
</table>
{/foreach}
