Skip to content
This repository was archived by the owner on Jan 13, 2026. It is now read-only.

Commit 3ad9fc8

Browse files
authored
Merge pull request #236 from pdecrete/master_schtransport_maintenance
Add protocol details in statistics excel export
2 parents 6fd1571 + 38cf8bf commit 3ad9fc8

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

yii2/modules/schooltransport/controllers/StatisticController.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ public function exportExcel($startdate = null, $enddate = null, $savePathFile =
155155
$row = 1;
156156
$column = 1;
157157
$edulevel = ['PRIMARY' => 'ΠΡΩΤΟΒΑΘΜΙΑ', 'SECONDARY' => 'ΔΕΥΤΕΡΟΒΑΘΜΙΑ'];
158-
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, 'Α/Α', DataType::TYPE_STRING);
158+
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, 'Α/Α', DataType::TYPE_STRING);
159+
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, 'Πρωτόκολλο Έγκρισης ΠΔΕ', DataType::TYPE_STRING);
160+
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, 'Ημερομηνία Πρωτοκόλλου Έγκρισης ΠΔΕ', DataType::TYPE_STRING);
159161
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, 'Σχολικό Έτος', DataType::TYPE_STRING);
160162
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, 'Σχολείο', DataType::TYPE_STRING);
161163
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, 'Κατηγορία Προγράμματος', DataType::TYPE_STRING);
@@ -168,12 +170,15 @@ public function exportExcel($startdate = null, $enddate = null, $savePathFile =
168170
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, 'Ημερομηνία Επιστροφής', DataType::TYPE_STRING);
169171
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, 'Βαθμίδα Εκπαίδευσης', DataType::TYPE_STRING);
170172
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, 'Διεύθυνση Εκπαίδευσης', DataType::TYPE_STRING);
173+
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, 'Πρωτόκολλο Διεύθυνσης Εκπ/σης Σχολείου', DataType::TYPE_STRING);
171174
foreach ($transports as $transport) {
172175
$row++;
173176
$column = 1;
174177
$startyear = Statistic::getSchoolYearOf(DateTime::createFromFormat('Y-m-d', $transport['transport_startdate']));
175-
$directorate = Directorate::findOne(['directorate_id' => $transport['directorate_id']]);
176-
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, $row-1, DataType::TYPE_NUMERIC);
178+
$directorate = Directorate::findOne(['directorate_id' => $transport['directorate_id']]);
179+
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, $row-1, DataType::TYPE_NUMERIC);
180+
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, $transport['transport_pde_protocol'], DataType::TYPE_STRING);
181+
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, $transport['transport_dateprotocolcompleted'], DataType::TYPE_STRING);
177182
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, (string)$startyear . '-' . (string)($startyear+1), DataType::TYPE_STRING);
178183
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, $transport['school_name'], DataType::TYPE_STRING);
179184
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, $transport['programcategory_programtitle'], DataType::TYPE_STRING);
@@ -186,6 +191,7 @@ public function exportExcel($startdate = null, $enddate = null, $savePathFile =
186191
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, Yii::$app->formatter->asDate($transport['transport_enddate'], 'dd-MM-Y'), DataType::TYPE_STRING);
187192
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, $edulevel[$directorate['directorate_stage']], DataType::TYPE_STRING);
188193
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, $directorate['directorate_name'], DataType::TYPE_STRING);
194+
$worksheet->setCellValueExplicitByColumnAndRow($column++, $row, $transport['transport_localdirectorate_protocol'], DataType::TYPE_STRING);
189195
}
190196
$writer = new Xls($spreadsheet);
191197
if ($savePathFile === null) {

0 commit comments

Comments
 (0)