<?php /* Smarty version Smarty-3.1.11, created on 2024-12-01 08:02:57
         compiled from "../views/obgy/organizations/org_fin_print.html" */ ?>
<?php /*%%SmartyHeaderCode:83689865266d80cc37763c6-89222843%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '8cc8eae5edd8947dcbe43373f848286b23b60c24' => 
    array (
      0 => '../views/obgy/organizations/org_fin_print.html',
      1 => 1733023891,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '83689865266d80cc37763c6-89222843',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_66d80cc37d2ce5_20235445',
  'variables' => 
  array (
    'fdate' => 0,
    'todate' => 0,
    'orgName' => 0,
    'allData' => 0,
    'i' => 0,
    'data' => 0,
    'totalCost' => 0,
    'totalVat' => 0,
    'totalDue' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_66d80cc37d2ce5_20235445')) {function content_66d80cc37d2ce5_20235445($_smarty_tpl) {?>
<style>
    center {
        margin-top: 15px;
    }

    th {
        background-color: #2D2D2D !important;
        background: #2D2D2D !important;
        border: 0px solid #000000 !important;
        border-width: 1px 1px 1px 1px !important;
        font-size: 15px !important;
        font-family: Arial !important;
        font-weight: bold !important;
        text-align: center !important;
    }

    td {
        border: 1px solid #000000 !important;
        padding: 0px 3px !important;
        font-size: 13px !important;
        font-family: tahoma !important;
        color: #000000 !important;
    }

</style>



<center><h4 class="modal-title">Customer debit note</h4></center>

<table class="table table-hover portlet light bg-inverse" id="repTable" style="width: 100%;">
    <thead>
        <tr>
            <th>   From</th>
            <td><?php echo $_smarty_tpl->tpl_vars['fdate']->value;?>
</td>
            <th>   To</th>
            <td><?php echo $_smarty_tpl->tpl_vars['todate']->value;?>
</td>
        </tr>

        <tr>
            <th>   Customer</th>
            <td colspan="3"><?php echo $_smarty_tpl->tpl_vars['orgName']->value;?>
</td>
        </tr>
    </thead>
</table>

<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><?php echo $_smarty_tpl->tpl_vars['data']->value['patient_name'];?>
</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>

<?php }} ?>