<?php /* Smarty version Smarty-3.1.11, created on 2024-08-26 07:50:53
         compiled from "../views/obgy/reports/financial.html" */ ?>
<?php /*%%SmartyHeaderCode:66963148266cc964d13b6c6-26361190%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '2f5a7d7d30e98e418de1d250988083f32dcb5ed2' => 
    array (
      0 => '../views/obgy/reports/financial.html',
      1 => 1628295730,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '66963148266cc964d13b6c6-26361190',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'today' => 0,
    'allPatients' => 0,
    'data' => 0,
    'showDate' => 0,
    'allData' => 0,
    'i' => 0,
    'hosturl' => 0,
    'totalCost' => 0,
    'totalDiscount' => 0,
    'totalCash' => 0,
    'totalVisa' => 0,
    'totalDept' => 0,
    'newPatients' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_66cc964d226f53_56645101',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_66cc964d226f53_56645101')) {function content_66cc964d226f53_56645101($_smarty_tpl) {?><div class="page-content-wrapper">
    <div class="page-content">
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN EXAMPLE TABLE PORTLET-->
                <div class="portlet box blue">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="fa fa-users"></i>Financial Report
                        </div>
                    </div>
                    <div class="portlet-body all">
                        <input type="hidden" id="reportPage" value="1"/>
                        <input type="hidden" id="tdate" value="<?php echo $_smarty_tpl->tpl_vars['today']->value;?>
">
                        <input type="hidden" id="controllName" value="financialreport"/>
                        <!--Begin Semen-->

                        <div class="row">
                            <div class="row clinick posre">
                                <div class="col-md-2 wds10">
                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                        <input type="text" class="form-control datepicker txtc " id="findate" value="<?php echo $_smarty_tpl->tpl_vars['today']->value;?>
"/>
                                        <label for="form_control_1">Date From </label>
                                    </div>
                                </div>

                                <div class="col-md-2 wds10">
                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                        <input type="text" class="form-control datepicker txtc " id="tofindate" value="<?php echo $_smarty_tpl->tpl_vars['today']->value;?>
"/>
                                        <label for="form_control_1">Date To </label>
                                    </div>
                                </div>

                                <div class="col-md-2 wds10">
                                    <div class="form-group">
                                        <label class="control-label ls2">Patient No</label>
                                        <input type="text" name="search" id="statusNo" 
                                               class="form-control searchPat txtc sbystno" >
                                    </div>
                                </div>


                                <div class="col-md-3">
                                    <div class="form-group">
                                        <label class="control-label ls2">Patient Name</label>

                                        <select class="form-control searchFin " id="patientName">
                                            <option value="">choose</option>
                                            <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allPatients']->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;
?>
                                            <option value="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" ><?php echo $_smarty_tpl->tpl_vars['data']->value->wifename;?>
</option>
                                            <?php } ?>
                                        </select>

                                    </div>
                                </div>

                                <div class="col-md-3">
                                    <div class="form-group">
                                        <label class="control-label ls2">Husband Name</label>

                                        <select class="form-control searchFin " id="husband">
                                            <option value="">choose</option>
                                            <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allPatients']->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;
?>
                                            <option value="<?php echo $_smarty_tpl->tpl_vars['data']->value->husdandname;?>
" ><?php echo $_smarty_tpl->tpl_vars['data']->value->husdandname;?>
</option>
                                            <?php } ?>
                                        </select>

                                    </div>
                                </div>

                                <div class="col-md-2 wds20">
                                    <div class="form-group">
                                        <label class="control-label ls2">Address</label>
                                        <input type="text" name="address" id="patAddress" 
                                               class="form-control  txtc" >
                                    </div>
                                </div>



                            </div>

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

                            <div class="portlet box white">
                                <div class="portlet-title">
                                    <div class="actions">

                                        <a class="btn btn-primary btn-sm" id="finSearchBtn" >
                                            <i class="fa fa-search"></i> Search </a>

                                        <a class="btn btn-default btn-sm" id="printfi" >
                                            <i class="fa fa-print"></i> Print </a>

                                    </div>
                                </div>

                                <div class="portlet-body form" id="financialDiv">
                                    <table class="table table-hover portlet light bg-inverse dataTable ">
                                        <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>
                            </div>
                        </div>

                    </div>

                    <!--End Semen-->


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

                </div>
            </div>
        </div>
    </div>
</div>

<div class="clearfix"></div>
<div id="financialPrint"></div>
<?php }} ?>