<?php /* Smarty version Smarty-3.1.11, created on 2024-12-01 05:34:21
         compiled from "../views/obgy/organizations/org_fin_search.html" */ ?>
<?php /*%%SmartyHeaderCode:97651539766d808cdd92e53-31159538%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'e5c96a15d9d4501a545d06837d0a513df83d7fdf' => 
    array (
      0 => '../views/obgy/organizations/org_fin_search.html',
      1 => 1733023897,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '97651539766d808cdd92e53-31159538',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_66d808cddf3085_41687185',
  'variables' => 
  array (
    'allData' => 0,
    'i' => 0,
    'data' => 0,
    'hosturl' => 0,
    'totalCost' => 0,
    'totalVat' => 0,
    'totalDue' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_66d808cddf3085_41687185')) {function content_66d808cddf3085_41687185($_smarty_tpl) {?><table class="table table-hover portlet light bg-inverse" id="repTable" style="width: 100%;">
    <thead>
        <tr>
            <th style="width: 10px !important;">#</th>
            <th>   Pt. Code</th>
            <th>   Reg. Date</th>
            <th >   Pt. Ref No.</th>
            <th>   Pt. Name</th>
            <th style="text-align:left ;">
                <span style="float:left ; width: 80%;">Service</span>
                <span style="float:right ; width: 20%;">Price</span>
            </th>
            <!--th>   Service      </th>
            <th>   Service    Price  </th-->
            <th>   Amount Due   </th>
            <th>   Vat   </th>
            <th>  Total  Amount Due   </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 " >
            <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['data']->value['code'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['data']->value['visitdate'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['data']->value['statusno'];?>
</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['patient_name'];?>
    </a>
            </td>
            <td><?php echo $_smarty_tpl->tpl_vars['data']->value['testsWithPrice'];?>
</td>
            <!--td><?php echo $_smarty_tpl->tpl_vars['data']->value['tests'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['data']->value['price'];?>
</td-->
            <td><?php echo $_smarty_tpl->tpl_vars['data']->value['cost'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['data']->value['vat'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['data']->value['total'];?>
</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>
</table>

<div id="totalDiv">
    <?php if (!empty($_smarty_tpl->tpl_vars['allData']->value)){?>
    <table class="table table-hover portlet light bg-inverse ">
        <tr>
        <tr>
            <th>   Amount Due      </th>
            <td><?php echo $_smarty_tpl->tpl_vars['totalCost']->value;?>
 </td>
            <th>   Vat     </th>
            <td><?php echo $_smarty_tpl->tpl_vars['totalVat']->value;?>
 </td>
            <th>  Total  Amount Due     </th>
            <td><?php echo $_smarty_tpl->tpl_vars['totalDue']->value;?>
 </td>
        </tr>
    </table>
    <?php }?>
</div>



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