require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php"); $APPLICATION->SetTitle('Отчеты'); $month = $_GET['m']; session_start(); if($month) { session_start(); $_SESSION['month'] = $month; } elseif(isset($_SESSION['month'])) { $month = $_SESSION['month']; } else $month = date('m'); $time_begin = date('Y').'-'.$month.'-01 00:00:00'; $number_month = cal_days_in_month(CAL_GREGORIAN, $month, date('Y')); $time_end = date('Y').'-'.$month.'-' . $number_month . ' 23:59:59'; $time_begin = strtotime($time_begin . " -2 hours"); $time_end = strtotime($time_end . " -2 hours"); $engineers = Service::GetEngineerList(); $records = Register::GetRecords($total_records, 'UF_DATE', 'asc', [3,8], $time_begin, $time_end, 0, 1000000, 0, 0, 0, 0, [], 0, 6); // echo '
'; // print_r($records); // echo ''; $reports = array(); foreach($engineers as $key=>$e) { $records = Register::GetRecords($total_records, 'UF_DATE', 'asc', [8], $time_begin, $time_end, 0, 1000000, 0, 0, 0, 0, [], 0, $key); $reports[$key] = ""; } foreach($engineers as $key=>$e) { $records = Register::GetRecords($total_records, 'UF_DATE', 'asc', [8], $time_begin, $time_end, 0, 1000000, 0, 0, 0, 0, [], 0, $key); foreach($records as $rec) { $tt = $rec['control_list']; $reports[$key] .= str_replace(' ', '', trim($rec['recom'])); foreach($tt as $t) { $reports[$key] .= str_replace(' ', '', trim($t['value'])); } } } foreach($engineers as $key=>$e) { $reports[$key] = strlen($reports[$key]); } $months = array( '01' => 'январь', '02' => 'февраль', '03' => 'март', '04' => 'апрель', '05' => 'май', '06' => 'июнь', '07' => 'июль', '08' => 'август', '09' => 'сентябрь', '10' => 'октябрь', '11' => 'ноябрь', '12' => 'декабрь' ); $curMonth = $months[$month] . ' ' . date('Y'); ?> $e): $records = Register::GetRecords($total_records, 'UF_DATE', 'asc', [3,8], $time_begin, $time_end, 0, 1000000, 0, 0, 0, 0, [], 0); $report_count = 0; $files_count = 0; $asMain = 0; $asDop = 0; $allMove = 0; $mvTrouble = 0; ?> $records_counts[$key] = count($records); $report_counts[$key] = $report_count; $files_counts[$key] = $files_count; $asMains[$key] = $asMain; $asDops[$key] = $asDop; $allMoves[$key] = $allMove; $mvTroubles[$key] = $mvTrouble; ?>
Сервисный инженер | Кол-во выездов как основной | Кол-во выездов как вспомогательный | Количество выездов итого | Написано отчетов | Написано символов | Прикреплено фото/файлов |
---|---|---|---|---|---|---|
Warning: Undefined variable $e in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 151 |
Warning: Undefined variable $asMains in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 152 Warning: Undefined variable $key in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 152 Warning: Trying to access array offset on value of type null in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 152 |
Warning: Undefined variable $asDops in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 153 Warning: Undefined variable $key in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 153 Warning: Trying to access array offset on value of type null in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 153 |
Warning: Undefined variable $allMoves in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 154 Warning: Undefined variable $key in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 154 Warning: Trying to access array offset on value of type null in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 154 |
Warning: Undefined variable $report_counts in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 155 Warning: Undefined variable $key in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 155 Warning: Trying to access array offset on value of type null in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 155 |
Warning: Undefined variable $reports in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 156 Warning: Undefined variable $key in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 156 Warning: Trying to access array offset on value of type null in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 156 |
Warning: Undefined variable $files_counts in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 157 Warning: Undefined variable $key in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 157 Warning: Trying to access array offset on value of type null in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 157 |
Дата | Куда ездил | ||
---|---|---|---|
Warning: Undefined variable $e in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 171 |
|||
class="red red_light"> Warning: Undefined variable $rec in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 177 Warning: Trying to access array offset on value of type null in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 177 |
class="red red_light" colspan="3">
Warning: Undefined variable $rec in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 180 Warning: Trying to access array offset on value of type null in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 180 Warning: Undefined variable $rec in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 182 Warning: Trying to access array offset on value of type null in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 182 |
||
Написано отчетов: Warning: Undefined variable $report_counts in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 188 Warning: Undefined variable $key in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 188 Warning: Trying to access array offset on value of type null in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 188 |
Внесено символов в журнал: Warning: Undefined variable $reports in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 189 Warning: Undefined variable $key in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 189 Warning: Trying to access array offset on value of type null in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 189 |
Прикреплено фото/файлов: Warning: Undefined variable $files_counts in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 190 Warning: Undefined variable $key in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 190 Warning: Trying to access array offset on value of type null in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 190 |
Аварийных выездов: Warning: Undefined variable $mvTroubles in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 191 Warning: Undefined variable $key in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 191 Warning: Trying to access array offset on value of type null in D:\ktt\ttepla.com\public_html\service\report\service_engineers.php on line 191 |
Записи не найдены |