diff options
| author | Thomas Hackl <hackl@data-quest.de> | 2021-10-07 09:10:38 +0000 |
|---|---|---|
| committer | Thomas Hackl <hackl@data-quest.de> | 2021-10-07 09:10:38 +0000 |
| commit | 7580842a16382cbf2ba50f227eacafd4869c1eba (patch) | |
| tree | 4db07df081715b434c287e3824289df88e16ea84 /app/controllers/resources/export.php | |
| parent | 754d05d19fc3fdc6a38e5ba9fe232c0abfc88d0c (diff) | |
TIC 11438 Export-Buchungstypen
Diffstat (limited to 'app/controllers/resources/export.php')
| -rw-r--r-- | app/controllers/resources/export.php | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/app/controllers/resources/export.php b/app/controllers/resources/export.php index f522008..87d6d8a 100644 --- a/app/controllers/resources/export.php +++ b/app/controllers/resources/export.php @@ -119,6 +119,16 @@ class Resources_ExportController extends AuthenticatedController $this->range_id = Request::get('range_id'); } + // All available booking types. + $this->booking_types = [ + 0 => _('Buchung'), + 1 => _('Reservierung'), + 2 => _('Sperrbuchung'), + 3 => _('Planungsbuchung') + ]; + $this->selected_booking_types = Request::intArray('bookingtypes') ?: + Config::get()->RESOURCES_EXPORT_BOOKINGTYPES_DEFAULT; + //Build sidebar $sidebar = Sidebar::get(); @@ -214,6 +224,16 @@ class Resources_ExportController extends AuthenticatedController ); $this->end->setTime(23, 59, 59); } + + + // All available booking types. + $this->booking_types = [ + 0 => _('Buchung'), + 1 => _('Reservierung'), + 2 => _('Sperrbuchung'), + 3 => _('Planungsbuchung') + ]; + $this->selected_booking_types = Config::get()->RESOURCES_EXPORT_BOOKINGTYPES_DEFAULT; } @@ -317,11 +337,14 @@ class Resources_ExportController extends AuthenticatedController ] ); + $types = Request::intArray('bookingtypes') ?: + Config::get()->RESOURCES_EXPORT_BOOKINGTYPES_DEFAULT; + //Prepare data for export: foreach ($intervals as $interval) { $booking = $interval->booking; - if (!$booking instanceof ResourceBooking) { + if (!$booking instanceof ResourceBooking || !in_array($booking->booking_type, $types)) { continue; } $description = $booking->description; |
