<?php /* Smarty version Smarty-3.1.11, created on 2024-11-16 18:22:11
         compiled from "../views/obgy/reports/financiallabprint.html" */ ?>
<?php /*%%SmartyHeaderCode:11603438736738c6b3bcae79-12805078%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '012955ac4c706eb0ec0852c53e1d45f6fe68653a' => 
    array (
      0 => '../views/obgy/reports/financiallabprint.html',
      1 => 1711328171,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '11603438736738c6b3bcae79-12805078',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'login_role' => 0,
    'allData' => 0,
    'totalTotals' => 0,
    'data' => 0,
    'totalDiscount' => 0,
    'totalRemain' => 0,
    'totalVat' => 0,
    'totalPaid' => 0,
    'i' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_6738c6b3d44c69_44025538',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_6738c6b3d44c69_44025538')) {function content_6738c6b3d44c69_44025538($_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 Lab Report</h4>
        </center>
        <table class="table">
            <thead>
                <tr>
                    <td style="width: 10px !important;">#</td>
                    <th> Visit Date</th>
                    <th> Refer Dr</th>
                    <th> Patient Name</th>
                    <th> Patient No.</th>
                    <th class=""> Patient National ID.</th>
                    <th> Phone No.</th>
                    <td> Rec. No. </td>
                    <?php if ($_smarty_tpl->tpl_vars['login_role']->value!=19){?>
                    <th> Total </th>
                    <th> Discount </th>
                    <th> Remain </th>
                    <th> VAT </th>
                    <th> Paid </th>
                    <?php }?>
                </tr>
            </thead>
            <tbody>
                <?php $_smarty_tpl->tpl_vars["i"] = new Smarty_variable("1", null, 0);?>
                <?php $_smarty_tpl->tpl_vars["totalTotals"] = new Smarty_variable("0", null, 0);?>
                <?php $_smarty_tpl->tpl_vars["totalDiscount"] = new Smarty_variable("0", null, 0);?>
                <?php $_smarty_tpl->tpl_vars["totalRemain"] = new Smarty_variable("0", null, 0);?>
                <?php $_smarty_tpl->tpl_vars["totalVat"] = new Smarty_variable("0", null, 0);?>
                <?php $_smarty_tpl->tpl_vars["totalPaid"] = new Smarty_variable("0", 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;
?>

                <?php $_smarty_tpl->tpl_vars["totalTotals"] = new Smarty_variable($_smarty_tpl->tpl_vars['totalTotals']->value+$_smarty_tpl->tpl_vars['data']->value['totaldetectionvalue'], null, 0);?>
                <?php $_smarty_tpl->tpl_vars["totalDiscount"] = new Smarty_variable($_smarty_tpl->tpl_vars['totalDiscount']->value+$_smarty_tpl->tpl_vars['data']->value['discount'], null, 0);?>
                <?php $_smarty_tpl->tpl_vars["totalRemain"] = new Smarty_variable($_smarty_tpl->tpl_vars['totalRemain']->value+$_smarty_tpl->tpl_vars['data']->value['restdetectionvalue'], null, 0);?>
                <?php $_smarty_tpl->tpl_vars["totalVat"] = new Smarty_variable($_smarty_tpl->tpl_vars['totalVat']->value+$_smarty_tpl->tpl_vars['data']->value['vat_value'], null, 0);?>
                <?php $_smarty_tpl->tpl_vars["totalPaid"] = new Smarty_variable($_smarty_tpl->tpl_vars['totalPaid']->value+$_smarty_tpl->tpl_vars['data']->value['detectionvalue_cash']+$_smarty_tpl->tpl_vars['data']->value['detectionvalue_visa'], null, 0);?>
                <tr class="odd " <?php if ($_smarty_tpl->tpl_vars['data']->value['detectionid']==9999||$_smarty_tpl->tpl_vars['data']->value['billType']==1){?> style="background-color: #efc9cc;"
                    <?php }elseif($_smarty_tpl->tpl_vars['data']->value['customer_add']==1){?> style="background-color: #f1f16d;" <?php }?>>
                    <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value['visitdate'];?>
</td>
                    <td> <?php echo $_smarty_tpl->tpl_vars['data']->value['refer'];?>
</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>
                    <td class=""><?php echo $_smarty_tpl->tpl_vars['data']->value['wifenationalid'];?>
</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value['phone'];?>
</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value['printserial'];?>
</td>
                    <?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['restdetectionvalue'];?>

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

                    </td>
                    <td>
                        <?php echo sprintf("%.2f",($_smarty_tpl->tpl_vars['data']->value['detectionvalue_cash']+$_smarty_tpl->tpl_vars['data']->value['detectionvalue_visa']));?>

                    </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>
            <tfoot>
                <tr>
                    <td colspan="8">
                        Total
                    </td>
                    <td><?php echo $_smarty_tpl->tpl_vars['totalTotals']->value;?>
</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['totalDiscount']->value;?>
</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['totalRemain']->value;?>
</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['totalVat']->value;?>
</td>
                    <td><?php echo sprintf("%.2f",$_smarty_tpl->tpl_vars['totalPaid']->value);?>
</td>
                </tr>
            </tfoot>
        </table>
    </div><?php }} ?>