<?php /* Smarty version Smarty-3.1.11, created on 2023-11-05 00:13:48
         compiled from "../views/obgy/reports/financialprint.html" */ ?>
<?php /*%%SmartyHeaderCode:15953332726546c21cf21165-54842559%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '81ea25fe01b67faf00ad3a8d67114a70dfc29e0f' => 
    array (
      0 => '../views/obgy/reports/financialprint.html',
      1 => 1638661956,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '15953332726546c21cf21165-54842559',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'login_role' => 0,
    'share' => 0,
    'allData' => 0,
    'data' => 0,
    'i' => 0,
    'totalCost' => 0,
    'totalDiscount' => 0,
    'totalCash' => 0,
    'totalVisa' => 0,
    'totalDept' => 0,
    'totalOldCash' => 0,
    'totalOldVisa' => 0,
    'totalRefundCash' => 0,
    'totalRefundVisa' => 0,
    'totalC' => 0,
    'totalV' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_6546c21d11c478_74601506',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_6546c21d11c478_74601506')) {function content_6546c21d11c478_74601506($_smarty_tpl) {?>

<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>


<div class="prntbl2">
    
    <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>

    
    <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>
                    <td style="width: 10px !important;">#</td>
                    <td>  Rec. No. </td>
                    <td>   Patient Name</td>
                    <td>   Patient No.</td>
                    <td>   Type</td>
                    <?php if ($_smarty_tpl->tpl_vars['login_role']->value!=19){?>
                    <td>   Total      </td>
                    <td>   Discount   </td>
                    <td>   Cash </td>
                    <td>   Visa  </td>
                    <td>   Debt </td>
                    <?php }?>

                    <?php if ($_smarty_tpl->tpl_vars['share']->value==1){?>
                    <th>RFC</th>
                    <th>Refer Dr.</th>
                    <th>Doctor</th>
                    <?php }?>
                    <td>Visit Doctor</td>


                    <td>   Notes    </td>
                    <td>   User name  </td>
                    <td>   Visit Date</td>
                    <?php if ($_smarty_tpl->tpl_vars['share']->value==2){?>  <th>   Visit Hour</th> <?php }?>
                </tr>
            </thead>
            <tbody>
                <?php $_smarty_tpl->tpl_vars["i"] = new Smarty_variable("1", null, 0);?>
                <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['data']->key => $_smarty_tpl->tpl_vars['data']->value){
$_smarty_tpl->tpl_vars['data']->_loop = true;
?>
                <tr class="odd " <?php if ($_smarty_tpl->tpl_vars['data']->value['detectionid']==9999){?> style="background-color: #efc9cc;"  <?php }?>>
                    <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value['printserial'];?>
</td>
                    <td>
                        <?php if ($_smarty_tpl->tpl_vars['data']->value['for_husband']==1){?>
                        <?php echo $_smarty_tpl->tpl_vars['data']->value['husdandname'];?>

                        <?php }elseif($_smarty_tpl->tpl_vars['data']->value['for_husband']==2){?>
                        طفل    /  <?php echo $_smarty_tpl->tpl_vars['data']->value['wifename'];?>

                        <?php }else{ ?>
                        <?php echo $_smarty_tpl->tpl_vars['data']->value['wifename'];?>

                        <?php }?>
                    </td>
                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value['statusno'];?>
</td>

                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value['type'];?>
</td>

                    <?php if ($_smarty_tpl->tpl_vars['login_role']->value!=19){?>
                    <td>
                        <?php echo $_smarty_tpl->tpl_vars['data']->value['totaldetectionvalue'];?>

                    </td>
                    <td>
                        <?php echo $_smarty_tpl->tpl_vars['data']->value['discount'];?>

                    </td>
                    <td>
                        <?php echo $_smarty_tpl->tpl_vars['data']->value['detectionvalue_cash'];?>

                    </td>
                    <td>
                        <?php echo $_smarty_tpl->tpl_vars['data']->value['detectionvalue_visa'];?>

                    </td>
                    <td>
                        <?php echo $_smarty_tpl->tpl_vars['data']->value['restdetectionvalue'];?>

                    </td>
                    <?php }?>

                    <?php if ($_smarty_tpl->tpl_vars['share']->value==1){?>
                    <td>  
                        <?php echo $_smarty_tpl->tpl_vars['data']->value['rfc'];?>

                    </td>
                    <td>
                        <?php echo $_smarty_tpl->tpl_vars['data']->value['refer'];?>

                    </td>

                    <?php if ($_smarty_tpl->tpl_vars['data']->value['for_husband']==1){?>
                    <td>
                        <?php echo $_smarty_tpl->tpl_vars['data']->value['h_doctor'];?>

                    </td>
                    <?php }else{ ?>
                    <td>
                        <?php echo $_smarty_tpl->tpl_vars['data']->value['doctor'];?>

                    </td>
                    <?php }?>
                    <?php }?>

                    <td> <?php echo $_smarty_tpl->tpl_vars['data']->value['visitDoctor'];?>
</td>

                    <td>
                        <?php echo $_smarty_tpl->tpl_vars['data']->value['vnotes'];?>

                    </td>
                    <td>
                        <?php echo $_smarty_tpl->tpl_vars['data']->value['insert_user'];?>

                    </td>
                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value['visitdate'];?>
</td>
                    <?php if ($_smarty_tpl->tpl_vars['share']->value==2){?>
                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value['visitHour'];?>
</td>
                    <?php }?>
                </tr>
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['i']->value+1;?>
<?php $_tmp1=ob_get_clean();?><?php $_smarty_tpl->tpl_vars["i"] = new Smarty_variable($_tmp1, null, 0);?>
                <?php } ?>
            </tbody>
        </table>

        <?php if ($_smarty_tpl->tpl_vars['login_role']->value!=19){?>
        <?php if (!empty($_smarty_tpl->tpl_vars['allData']->value)){?>
        <table class="table table-hover portlet light bg-inverse ">
            <tr>
            <tr>
                <td class="wds15"> </td>
                <td class="wds17"> Cost</td>
                <td class="wds17"> Discount</td>
                <td class="wds17"> Cash</td>
                <td class="wds17"> Visa</td>
                <td class="wds17"> Debt</td>
            </tr>
            </tr>
            <tr>
                <td>New Visits</td>
                <td> <?php echo $_smarty_tpl->tpl_vars['totalCost']->value;?>
</td>
                <td> <?php echo $_smarty_tpl->tpl_vars['totalDiscount']->value;?>
</td>
                <td> <?php echo $_smarty_tpl->tpl_vars['totalCash']->value;?>
</td>
                <td> <?php echo $_smarty_tpl->tpl_vars['totalVisa']->value;?>
</td>
                <td> <?php echo $_smarty_tpl->tpl_vars['totalDept']->value;?>
</td>
            </tr>
            <tr>
                <td>Old Debts</td>
                <td> </td>
                <td> </td>
                <td> <?php echo $_smarty_tpl->tpl_vars['totalOldCash']->value;?>
</td>
                <td> <?php echo $_smarty_tpl->tpl_vars['totalOldVisa']->value;?>
</td>
                <td></td>
            </tr>
            <tr  style="background-color: #efc9cc;"  >
                <td>Refund</td>
                <td> </td>
                <td> </td>
                <td> <?php echo $_smarty_tpl->tpl_vars['totalRefundCash']->value;?>
</td>
                <td> <?php echo $_smarty_tpl->tpl_vars['totalRefundVisa']->value;?>
</td>
                <td></td>
            </tr>
            <tr>
                <td>Total</td>
                <td> </td>
                <td> </td>
                <td> <?php echo $_smarty_tpl->tpl_vars['totalC']->value;?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['totalV']->value;?>
 </td>
                <td> </td>
            </tr>
        </table>
        <?php }?>   <?php }?>
    </div><?php }} ?>