<?php /* Smarty version Smarty-3.1.11, created on 2024-08-28 03:18:46
         compiled from "../views/obgy/reports/financialsearch.html" */ ?>
<?php /*%%SmartyHeaderCode:152379013166cef986b71e55-45671492%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'f83b529eecc53e4d2876c83b609495ced0cc1414' => 
    array (
      0 => '../views/obgy/reports/financialsearch.html',
      1 => 1628295786,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '152379013166cef986b71e55-45671492',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'showDate' => 0,
    'allData' => 0,
    'data' => 0,
    'i' => 0,
    'hosturl' => 0,
    'totalCost' => 0,
    'totalDiscount' => 0,
    'totalCash' => 0,
    'totalVisa' => 0,
    'totalDept' => 0,
    'newPatients' => 0,
    'fdate' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_66cef986c00675_43571345',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_66cef986c00675_43571345')) {function content_66cef986c00675_43571345($_smarty_tpl) {?><table class="table table-hover portlet light bg-inverse" id="repTable">
    <caption class="txtc"> Visits </caption>
    <thead>
        <tr>
            <th style="width: 10px !important;">#</th>
            <th>   Patient Name </th>
            <th>Patient Number</th>
            <?php if ($_smarty_tpl->tpl_vars['showDate']->value&&$_smarty_tpl->tpl_vars['showDate']->value==1){?>  <th>Visit Date</th>  <?php }?>
            <th>Type</th>
            <th>   Total      </th>
            <th>   Discount   </th>
            <th>   Cash </th>
            <th>   Visa  </th>
            <th>   Debt </th>
        </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['newPat']==1){?> style="background-color: #d8eac6;"  <?php }?>>
            <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
            <td>
                <a href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patienthistory.php?ac=show&patientid=<?php echo $_smarty_tpl->tpl_vars['data']->value['patientid'];?>
" target="_new"><?php echo $_smarty_tpl->tpl_vars['data']->value['wifename'];?>
</a>
            </td>
            <td><?php echo $_smarty_tpl->tpl_vars['data']->value['statusno'];?>
</td>
            <?php if ($_smarty_tpl->tpl_vars['showDate']->value&&$_smarty_tpl->tpl_vars['showDate']->value==1){?>  <td>   <?php echo $_smarty_tpl->tpl_vars['data']->value['visitdate'];?>
  </td>  <?php }?> 
            <td><?php echo $_smarty_tpl->tpl_vars['data']->value['type'];?>
</td>
            <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>
        </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>

    <tfoot>
        <tr>
            <th>Total </th>
            <td></td>
            <td></td>
            <?php if ($_smarty_tpl->tpl_vars['showDate']->value&&$_smarty_tpl->tpl_vars['showDate']->value==1){?> <td></td>  <?php }?>
            <td></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>
    </tfoot>
</table>

<div class="clearfix"></div>

<table class="table table-hover portlet light bg-inverse dataTable " >
    <caption class="txtc" style="background-color: #d8eac6;" >New Patients </caption>
    <thead>
        <tr>
            <th style="width: 10px !important;">#</th>
            <th>   Patient Name</th>
            <th>   Patient No.</th>
            <th>Address</th>
            <th>   Register  Date</th>
        </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['newPatients']->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 ">
            <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
            <td>
                <a href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patienthistory.php?ac=show&patientid=<?php echo $_smarty_tpl->tpl_vars['data']->value['patientid'];?>
" target="_new">
                    <?php if (!empty($_smarty_tpl->tpl_vars['data']->value['wifename'])&&$_smarty_tpl->tpl_vars['data']->value['wifename']!=''){?>
                    <?php echo $_smarty_tpl->tpl_vars['data']->value['wifename'];?>

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

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

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

            </td>
        </tr>
        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['i']->value+1;?>
<?php $_tmp2=ob_get_clean();?><?php $_smarty_tpl->tpl_vars["i"] = new Smarty_variable($_tmp2, null, 0);?>
        <?php } ?>
    </tbody>
</table>




<div id="long" class="modal fade modal-scroll" tabindex="-1" data-replace="true">
    <div class="modal-dialog wds75">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close hidden-print" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title"></h4>
            </div>
            <div class="modal-body printtable" id="printd">
                <center><h4 class="modal-title">Financial Report</h4></center>
                <center><h5 class="modal-title"><?php echo $_smarty_tpl->tpl_vars['fdate']->value;?>
</h5></center>
                <table class="table table-hover portlet light bg-inverse" id="controllprop">
                    <thead>
                        <tr>
                            <th>Patient Number</th>
                            <th>
                                Patient Name
                            </th>
                            <th>
                                Cost
                            </th>
                        </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 gradeX">
                            <td><?php echo $_smarty_tpl->tpl_vars['data']->value['statusno'];?>
</td>
                            <td>
                                <?php echo $_smarty_tpl->tpl_vars['data']->value['wifename'];?>

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

                            </td>
                        </tr>
                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['i']->value+1;?>
<?php $_tmp3=ob_get_clean();?><?php $_smarty_tpl->tpl_vars["i"] = new Smarty_variable($_tmp3, null, 0);?>
                        <?php } ?>
                        <?php if (!empty($_smarty_tpl->tpl_vars['allData']->value)){?>
                        <tr class="odd gradeX">
                            <th colspan="2">Total Cost</th>
                            <td><?php echo $_smarty_tpl->tpl_vars['totalCost']->value;?>
</td>
                        </tr>
                        <?php }?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>




<script type="text/javascript" >
    $('#repTable').dataTable();
    $('.dataTable').dataTable();
</script>
<?php }} ?>