
{literal}
<style>


    .prntbl2 {
        padding:0px !important;
        width:95% !important;
        margin:0px auto !important;
    }.prntbl2 table{
        border-collapse: collapse !important;
        width:100% !important;
        margin:0px !important;
        padding:0px !important;
    }
    .prntbl2 table th {
        background-color: #666 !important;
        background: #666 !important;
        border:1px solid #000000 !important;
        border-width:1px 1px 1px 1px !important;
        font-size:15px !important;
        font-family:Arial !important;
        font-weight:bold !important;
        color: #FFFFFF !important;
        text-align: center !important;
    }.prntbl2 tr:hover td{

    }
    .prntbl2 tr:nth-child(odd){background-color: #E0E0E0 !important;}
    .prntbl2 tr:nth-child(even)    { background-color:#ffffff !important; }
    .prntbl2 td{
        border:1px solid #000000 !important;
        padding: 0px 3px !important;
        font-size: 13px !important;
        font-family: Arial !important;
        color:#000000 !important;
        text-align: left !important;
    }


    .prntbl2 th, .prntbl2 tt, .prntbl2 td {
        line-height: 20px !important;
        padding: 1px 5px !important;


    }

    .prntbl2 span {
        font-weight: 700;
    }

</style>

{/literal}
<div class="prntbl2">
    {literal}
    <style>


        .prntbl2 {
            padding:0px !important;
            width:95% !important;
            margin:0px auto !important;
        }.prntbl2 table{
            border-collapse: collapse !important;
            width:100% !important;
            margin:0px !important;
            padding:0px !important;
        }
        .prntbl2 table th {
            background-color: #666 !important;
            background: #666 !important;
            border:1px solid #000000 !important;
            border-width:1px 1px 1px 1px !important;
            font-size:22px !important;
            font-family:Arial !important;
            font-weight:700 !important;
            color: #FFFFFF !important;
            text-align: center !important;
        }.prntbl2 tr:hover td{

        }
        .prntbl2 tr:nth-child(odd){background-color: #E0E0E0 !important;}
        .prntbl2 tr:nth-child(even)    { background-color:#ffffff !important; }
        .prntbl2 td{
            border:1px solid #000000 !important;
            padding: 0px 3px !important;
            font-size: 22px !important;
            font-family: Arial !important;
            color:#000000 !important;
            text-align: right !important;
            font-weight: 500 !important;
        }

        .prntbl2 caption{
            padding: 0px 3px !important;
            font-size: 22px !important;
            font-family: Arial !important;
            color:#000000 !important;
            text-align: center !important;
            font-weight: 700 !important;
        }


        .prntbl2 th, .prntbl2 tt, .prntbl2 td {
            line-height: 30px !important;
            padding: 1px 5px !important;


        }

        .prntbl2 span {
            font-weight: 700;
        }

    </style>

    {/literal}
    <div class="prntbl2">
        {foreach $days as $day}
        {foreach $day.dayDoctors as $doctor}
        {if $doctor.doctorVisitsCount > 0 }{$doctor.doctorVisitsCount}
        <table class="table table-hover portlet light bg-inverse rtl">
            <caption >
                زيارات   {$doctor.doctorName}  يوم   {$day.dayName}    {$day.dayDate} 
            </caption>
            <tbody>
                <tr>
                    <th>   م </th>  
                    <th>   RFC </th>
                    <th>   رقم الملف </th>
                    <th> اسم الحالة  </th>
                    {if $confirmed ==  1} 
                    <th class="txtc">وقت الوصول   </th>
                    <th>وقت الحضور  </th>
                    {else if $attended ==  1} 
                    <th class="txtc">وقت الوصول   </th>
                    <th class="txtc">وقت الحضور  </th>
                    <th class="txtc">وقت الكشف  </th>
                    {else}
                    <th>الوقت   </th>
                    {/if}

                    <th>  ملاحظات </th>
                    {if $attended ==  1} 
                    <th class="txtc"> الإنتظار  </th>
                    {/if}
                </tr>
                {assign var=i value=1}
                {foreach $doctor.doctorVisits as $visit}
                <tr>
                    <td> {$visit.visit_order}</td>
                    <td>{$visit.rfc}</td>
                    <td>{$visit.statusno}</td>
                    <td>     
                        <ul style="padding-right: unset;"> 
                            <li>{$visit.patientName}</li>
                            <li>{$visit.husbandName}</li>
                        </ul> 
                    </td>
                    {if $confirmed ==  1} 
                    <td>{$visit.arrivedTime}   </td>
                    <td>{$visit.recep_p_exit}   </td>
                    {else if $attended ==  1} 
                    <td>{$visit.arrivedTime}   </td>
                    <td>{$visit.recep_p_exit}   </td>
                    <td> {$visit.kashf_enterance}  </td>
                    {else}
                    <td>{$visit.visit_time}   </td>
                    {/if}
                    <td>{$visit.notes}</td>
                    {if $attended ==  1} 
                    <td style="direction: ltr;"> {$visit.waiting}</td>
                    {/if}
                </tr>
                {capture assign=i}{$i+1}{/capture}
                {/foreach}
            </tbody>
        </table>

        {if $attended ==  1} 
        <table class="table table-hover portlet light bg-inverse">
            <td> {$doctor.waitingAvg}</td>
            <th>متوسط وقت الإنتظار </th>
        </table>
        {/if}
        {/if}
        {/foreach}
        {/foreach}
    </div>
