
{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: #2D2D2D !important;
        background: #2D2D2D !important;
        border:0px solid #000000 !important;
        border-width:0px 0px 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: tahoma !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: #2D2D2D !important;
            background: #2D2D2D !important;
            border:0px solid #000000 !important;
            border-width:0px 0px 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: tahoma !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">
        <center><h4 class="modal-title">Financial Report</h4></center>
        <table class="table table-hover portlet light bg-inverse" id="repTable">
            <thead>
                <tr>
                    <th style="width: 10px !important;">#</th>
                    <th>   Patient Name </th>
                    <th>Patient Number</th>
                    {if $showDate &&   $showDate == 1 }  <th>Visit Date</th>  {/if}
                    <th>Type</th>
                    <th>   Total      </th>
                    <th>   Discount   </th>
                    <th>   Cash </th>
                    <th>   Visa  </th>
                    <th>   Debt </th>
                </tr>
            </thead>
            <tbody>
                {assign var="i" value="1"}
                {foreach $allData as $data}
                <tr class="odd " {if $data.newPat == 1} style="background-color: #d8eac6;"  {/if}>
                    <td>{$i}</td>
                    <td>
                        {$data.wifename}
                    </td>
                    <td>{$data.statusno}</td>
                    {if $showDate &&   $showDate == 1 }  <td>   {$data.visitdate}  </td>  {/if} 
                    <td>{$data.type}</td>
                    <td>
                        {$data.totaldetectionvalue}
                    </td>
                    <td>
                        {$data.discount}
                    </td>
                    <td>
                        {$data.detectionvalue_cash}
                    </td>
                    <td>
                        {$data.detectionvalue_visa}
                    </td>
                    <td>
                        {$data.restdetectionvalue}
                    </td>
                </tr>
                {assign var="i" value={$i+1}}
                {/foreach}
                {if !empty($allData)}
                <tr class="odd ">
                    <th>Total </th>
                    <td></td>
                    <td></td>
                    {if $showDate &&   $showDate == 1 } <td></td>  {/if}
                    <td></td>
                    <td>{$totalCost}</td>
                    <td>{$totalDiscount}</td>
                    <td>{$totalCash}</td>
                    <td>{$totalVisa}</td>
                    <td>{$totalDept}</td>
                </tr>
                {/if}
            </tbody>
        </table>
    </div>