<?php /* Smarty version Smarty-3.1.11, created on 2025-02-12 03:41:36
         compiled from "../views/default/employeeenddayview/show.html" */ ?>
<?php /*%%SmartyHeaderCode:50834696067abfc50499576-04000664%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '9488c797c7323b66db8fba9c5abe38c25e4b20ac' => 
    array (
      0 => '../views/default/employeeenddayview/show.html',
      1 => 1672089198,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '50834696067abfc50499576-04000664',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'youtubes' => 0,
    'allEmployee' => 0,
    'data' => 0,
    'employeeHistory' => 0,
    'i' => 0,
    'totalLate' => 0,
    'totalAbsent' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_67abfc50576930_09874304',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_67abfc50576930_09874304')) {function content_67abfc50576930_09874304($_smarty_tpl) {?>


<div class="row">
    <div class="container">

        <ol class="breadcrumb">
            <li><a href="#">اداره الموظفين</a></li>
            <!--<li><a href="employeesubgroups.php?do=show">مجموعات الموظفين الفرعية</a></li>-->
            <li class="active">تفاصيل حضور وانصراف موظف</li>
        </ol>


        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h3 class="panel-title">تفاصيل حضور وانصراف موظف</h3>
                <a href="<?php echo $_smarty_tpl->tpl_vars['youtubes']->value[180]->url;?>
" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>
            </div>
            <div class="panel-body">


                <form class="form-horizontal" method="post" action="employeeendday.php?do=closedayshow">

                    <div class="form-group">
                        <label class="col-lg-2 control-label">الشهر</label>
                        <div class="col-lg-4">
                            <input name="theDay" id="theDay" type="text" class="form-control awdatepicker" autocomplete="off" data-date-format="yyyy-mm">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-2 control-label">الموظف</label>
                        <div class="col-lg-4">
                            <select class="select2" name="empid" id="empid">
                                <option></option>
                                <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allEmployee']->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->employeeId;?>
"><?php echo $_smarty_tpl->tpl_vars['data']->value->employeeName;?>
</option>
                                <?php } ?>
                            </select>
                        </div>
                    </div>



                    <!-- =================================================   -->

                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button type="submit"  class="btn btn-primary pull-left">بحث</button>
                        </div>
                    </div>


                </form>
                <?php if (isset($_smarty_tpl->tpl_vars['employeeHistory']->value)){?>
                <div id="resultDiv">
                    <br/>
                    <hr/>
                    <br/>
                    <table class="table">
                        <thead>
                            <tr>
                                <td>#</td>
                                <td>اليوم</td>
                                <td>الحضور</td>
                                <td>الانصراف</td>
                                <td>التاخير بالدقائق	</td>
                                <td>التاخير باذن	</td>
                                <td>قيمة التاخير </td>
                                <td>غائب </td>
                                <td>غائب باذن </td>
                                <td>قيمة الغياب </td>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                            <?php $_smarty_tpl->tpl_vars['totalLate'] = new Smarty_variable(0, null, 0);?>
                            <?php $_smarty_tpl->tpl_vars['totalAbsent'] = 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['employeeHistory']->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['i']->value;?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['data']->value->day;?>
</td>

                                <?php if ($_smarty_tpl->tpl_vars['data']->value->isAbsent!=1){?><!-- not absent he has show up -->
                                <td><?php echo $_smarty_tpl->tpl_vars['data']->value->attendanceTime;?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['data']->value->departureTime;?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['data']->value->latePeriod;?>
</td>
                                <td>
                                    <?php if ($_smarty_tpl->tpl_vars['data']->value->lateHasPermission==1){?>
                                    <span style="color: green;font-weight: bold;">باذن</span>
                                    <?php }else{ ?>
                                    <span style="color: red;font-weight: bold;">بدون اذن</span>
                                    <?php }?>
                                </td>
                                <td><?php echo $_smarty_tpl->tpl_vars['data']->value->lateDiscount;?>
<?php $_smarty_tpl->tpl_vars['totalLate'] = new Smarty_variable($_smarty_tpl->tpl_vars['totalLate']->value+$_smarty_tpl->tpl_vars['data']->value->lateDiscount, null, 0);?></td>
                                <td>-</td>
                                <td>-</td>
                                <td>-</td>
                                <?php }else{ ?><!-- absent -->
                                <td>-</td>
                                <td>-</td>
                                <td>-</td>
                                <td>-</td>
                                <td>-</td>
                                <td>
                                    <?php if ($_smarty_tpl->tpl_vars['data']->value->isAbsent==1){?>
                                    <span style="color: red;font-weight: bold;">غائب</span>
                                    <?php }else{ ?>
                                    -
                                    <?php }?>
                                </td>
                                <td>
                                    <?php if ($_smarty_tpl->tpl_vars['data']->value->absentHasPermission==1){?>
                                    <span style="color: green;font-weight: bold;">باذن</span>
                                    <?php }else{ ?>
                                    <span style="color: red;font-weight: bold;">بدون اذن</span>
                                    <?php }?>
                                </td>
                                <td><?php echo $_smarty_tpl->tpl_vars['data']->value->absentDiscount;?>
<?php $_smarty_tpl->tpl_vars['totalAbsent'] = new Smarty_variable($_smarty_tpl->tpl_vars['totalAbsent']->value+$_smarty_tpl->tpl_vars['data']->value->absentDiscount, null, 0);?></td>
                                <?php }?>

                            </tr>
                            <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable($_smarty_tpl->tpl_vars['i']->value+1, null, 0);?>
                            <?php } ?>
                        </tbody>
                    </table>
                    <br/>

                    <div class="col-lg-4 "><!-- col-lg-offset-8 -->
                        <div class="well well-sm">
                            <h4 class="text-center">مجموع قيم التاخير:  <span><?php echo $_smarty_tpl->tpl_vars['totalLate']->value;?>
</span></h4>
                        </div>
                    </div>
                    <div class="col-lg-4 "><!-- col-lg-offset-8 -->
                        <div class="well well-sm">
                            <h4 class="text-center">مجموع قيم الغياب:  <span><?php echo $_smarty_tpl->tpl_vars['totalAbsent']->value;?>
</span></h4>
                        </div>
                    </div>

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




    </div>
</div>

<?php }} ?>