} if ($leave['signature_by'] != 0 and $leave['status'] == 1) { // Approved // TODO: What about when recalled ? if (!$employees_afms[$leave['employee_afm']]['absend']) { // We have not found out if he is currently absent $leave_start = date('Y-m-d', strtotime($leave['date_starts'])); $leave_end = date('Y-m-d', strtotime($leave['date_ends'])); if ($today > $leave_start && $today < $leave_end) { $employees_afms[$leave['employee_afm']]['absend'] = true; } } } } foreach ($employees as $employee) { $leave_user_stats = get_leave_user_stats((object) $employee); $leave_details = get_analytics_data($leave_user_stats); ?> <tr> <td><?php echo $employee['last_name']; ?> </td> <td><?php echo $employee['first_name']; ?> </td> <td><?php echo $leave_details['current'][0] . ' / ' . $leave_details['current'][1]; ?> </td>
</p> </div> <?php if ($class == 'info') { ?> <div class="alert alert-info" style="margin-top: 10px;"> Η αίτηση δεν έχει επεξεργαστεί ακόμα. Οι ημέρες της άδειας δεν συνυπολογίζονται στο υπόλοιπο αδειών. </div> <?php } ?> </div> </div> </div> <?php $leave_user_stats = get_leave_user_stats($leave_user); $leave_details = get_analytics_data($leave_user_stats); ?> <div class="col-lg-3"> <div class="panel panel-yellow"> <div class="panel-heading"> Στοιχεία Αδειών </div> <div class="col-lg-12"> <div class="form-group"> <label>Υπόλοιπο Ημερών Άδειας</label> <p class="form-control-static"><?php echo $leave_user_stats->remaining_leaves; ?> </p> </div>