<?php /* Smarty version Smarty-3.1.11, created on 2024-09-04 10:22:54
         compiled from "../views/obgy/reports/financialprint.html" */ ?>
<?php /*%%SmartyHeaderCode:12608339366d80ace006ad6-77798158%%*/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 => 1700706950,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '12608339366d80ace006ad6-77798158',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'organizations' => 0,
    'login_role' => 0,
    'share' => 0,
    'referDrShow' => 0,
    'allData' => 0,
    'data' => 0,
    'i' => 0,
    'showBranchCol' => 0,
    'totalCost' => 0,
    'totalDiscount' => 0,
    'totalCash' => 0,
    'totalVisa' => 0,
    'totalDept' => 0,
    'totalOldCash' => 0,
    'totalOldVisa' => 0,
    'totalRefundCash' => 0,
    'totalRefundVisa' => 0,
    'totalC' => 0,
    'totalV' => 0,
    'totalDrFees' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_66d80ace0fcb30_54528022',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_66d80ace0fcb30_54528022')) {function content_66d80ace0fcb30_54528022($_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['organizations']->value==3){?>
                    <th>   Contract Price      </th>
                    <?php }?>


                    <?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){?>
                    <td>RFC</td>
                    <td>Refer Dr.</td>
                    <td>Doctor</td>
                    <?php }?>
                    <td>Visit Dr</td>
                    <td>Dr Fee</td>

                    <?php if ($_smarty_tpl->tpl_vars['referDrShow']->value==1&&$_smarty_tpl->tpl_vars['share']->value!=1){?>  <th>   Refer Dr</th> <?php }?>

                    <td>   Notes    </td>
                    <td>   User name  </td>
                    <td>   Visit Date</td>
                    <?php if ($_smarty_tpl->tpl_vars['share']->value==2){?>  <td>   Visit Hour</td> <?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>

                    <?php if ($_smarty_tpl->tpl_vars['showBranchCol']->value==1){?>    <td> <?php echo $_smarty_tpl->tpl_vars['data']->value['branch_name'];?>
</td>      <?php }?> 

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

                    <?php if ($_smarty_tpl->tpl_vars['organizations']->value==3){?>
                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value['contract_price'];?>
</td>
                    <?php }?>

                    <?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['drFees'];?>
</td>

                    <?php if ($_smarty_tpl->tpl_vars['referDrShow']->value==1&&$_smarty_tpl->tpl_vars['share']->value!=1){?>  <td>    <?php echo $_smarty_tpl->tpl_vars['data']->value['refer'];?>
</td> <?php }?>


                    <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="wds15"> Cost</td>
                <td class="wds15"> Discount</td>
                <td class="wds15"> Cash</td>
                <td class="wds15"> Visa</td>
                <td class="wds15"> Debt</td>
                <td class="wds10"> Dr Fee</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>
                <td></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>
                <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>
                <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>
                <td><?php echo $_smarty_tpl->tpl_vars['totalDrFees']->value;?>
 </td>
            </tr>
        </table>
        <?php }?>   <?php }?>
    </div><?php }} ?>