query("SELECT * FROM branch WHERE deleted_at IS NULL".$user_branch_permission_sql) ; if ( $get_branch->num_rows > 0 ){ while ( $row_branch = $get_branch->fetch_assoc() ){ $branch[$row_branch['branch_id']] = $row_branch['branch_name'] ; } } include 'HR/hr-attendance-format-2-update.php' ; include 'HR/hr-attendance-format-2-data.php' ; $boolean_role = false ; $boolean_edit = false ; if ( permissionCheck($row_user,"attendance-list-edit") ){ $boolean_role = true ; if ( $edit == 'yes' ){ $boolean_edit = true ; } } // active page $active_main_menu = 'hr' ; $active_sub_menu = 'hr-attendance' ; $active_menu = 'hr-attendance-list' ; // start header here include 'requires/page_header.php' ; include 'requires/page_top.php' ; // reset sort by type $sort_by_type = ( $sort_by_type == 'DESC' ? 'ASC' : 'DESC' ) ; // get all attendance list $array_list = [] ; $get_attendaces = $mysqli->query("SELECT list_id, list_work_day, list_ot_day, list_late, list_early_out, list_time_off, list_type_remark, staff_id, list_date, list_attendance_remark FROM staff_attendance_list WHERE deleted_at IS NULL AND list_date LIKE '".$date_time."%'") ; if ( $get_attendaces->num_rows > 0 ){ while ( $row_list = $get_attendaces->fetch_assoc() ){ $array_list[$row_list['staff_id']][$row_list['list_date']] = $row_list ; } } // get all requires $tier_list = [] ; $mysqli_tier = $mysqli->query("SELECT a.tier_id, b.title FROM profile_tier a LEFT JOIN profile_tier_translation b ON ( a.tier_id = b.tier_id ) WHERE a.deleted_at IS NULL AND b.lang = 'en' ORDER BY a.sortable ASC") ; if ( $mysqli_tier->num_rows > 0 ){ while ( $row_tier = $mysqli_tier->fetch_assoc() ){ $tier_list[] = $row_tier ; } } ?>