<?php /* Smarty version Smarty-3.1.11, created on 2024-08-12 09:39:33
         compiled from "../views/obgy/visits/advance_payment.html" */ ?>
<?php /*%%SmartyHeaderCode:96436831866b9ae25bacd41-38167406%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '802918c282d10206f755022e38f0246298c0d4e5' => 
    array (
      0 => '../views/obgy/visits/advance_payment.html',
      1 => 1721884959,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '96436831866b9ae25bacd41-38167406',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'lastAdvAll' => 0,
    'patientId' => 0,
    'advancePaysCount' => 0,
    'advancePays' => 0,
    'data' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_66b9ae25cc1d23_51505531',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_66b9ae25cc1d23_51505531')) {function content_66b9ae25cc1d23_51505531($_smarty_tpl) {?><div class="portlet box grey-cascade">
    <div class="portlet-title">
        <div class="caption fright">تحصيل من مريض 
            <?php if ($_smarty_tpl->tpl_vars['lastAdvAll']->value>3){?>
            <a class="label  label-success getLastAdvAll"   id="getLastAdvAll" 
               data-patientId="<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
"    >عرض الكل  (<?php echo $_smarty_tpl->tpl_vars['lastAdvAll']->value;?>
)</a> 
            <?php }?>
        </div>
        <div class="tools  fleft">
            <a href="#" class="collapse" title="تصغير / تكبير"></a>
        </div>
    </div>
    <div class="portlet-body">
        <div class="row">
            <div id="ultrasoundgynaDiv">
                <div class="row">
                    <div class="portlet-body form" >
                        <div class="form-body">

                            <table class="table table-bordered  table-hover rtl" style="margin-bottom: 5px;">
                                <tr>
                                    <th  class="wds7">  كاش </th>
                                    <td class="wds10">
                                        <input  class="form-control positivefloat"  type="text"  id="advanceCash" value="0" >
                                    </td>
                                    <th  class="wds7">  فيزا </th>
                                    <td class="wds10">
                                        <input  class="form-control positivefloat"  type="text"  id="advanceVisa" value="0">
                                    </td>
                                    <th  class="wds7">  ملاحظة  </th>
                                    <td><input  class="form-control ltr"  type="text"  id="advanceNotes" value=""></td>
                                    <td class="wds10">
                                        <a class="btn btn-sm bg-blue " id="saveAdvancePay" >إضافة دفعة  </a>
                                        <span id="advancePayError" style="color:red;" > </span>
                                    </td>
                                </tr>
                            </table>

                            <?php if ($_smarty_tpl->tpl_vars['advancePaysCount']->value>0){?>
                            <table class="table table-bordered table-striped table-hover rtl" style="margin-bottom: 0px;">
                                <thead>
                                    <tr>
                                        <th class="wds9">تاريخ الدفع  </th>
                                        <th class="wds10"> كاش   </th>
                                        <th class="wds10">فيزا    </th>
                                        <th>  ملاحظات  </th>
                                        <th class="wds5">   </th>
                                    </tr>

                                    <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['advancePays']->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>
                                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value['pay_date'];?>
</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['visitNote'];?>
</td>
                                        <td>
                                            <?php if ($_smarty_tpl->tpl_vars['data']->value['printserial']>0&&$_smarty_tpl->tpl_vars['data']->value['detectionvalue_cash']>0){?> 
                                            <a class="label  label-success printAdvReceipt"  data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value['advanceId'];?>
" ><i class="fa fa-print"></i></a>
                                            <?php }?>
                                        </td>
                                    </tr>

                                    <?php } ?>
                                </thead>
                                <tbody>

                                </tbody>
                            </table>

                            <?php }?>


                            
                            <script>
                                $(".positivefloat").forcepositivefloat();
                            </script>


                            


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