1 c) Gesamtstundenaufwand pro Mitarbeiter
authorJoey Schulze <joey@infodrom.org>
Fri, 5 Mar 2010 10:37:36 +0000 (11:37 +0100)
committerJoey Schulze <joey@infodrom.org>
Fri, 5 Mar 2010 10:37:36 +0000 (11:37 +0100)
masks/overview_mitarbeiter.php [new file with mode: 0644]

diff --git a/masks/overview_mitarbeiter.php b/masks/overview_mitarbeiter.php
new file mode 100644 (file)
index 0000000..652541d
--- /dev/null
@@ -0,0 +1,74 @@
+<?php
+
+$jscode[] = <<<EOC
+
+function select_year_calback(data)
+{
+  grid_update(grid);
+}
+
+function select_year_status(obj, value, html)
+{
+  if (value.length)
+    info('Jahr ' + value + ' ausgewählt');
+  else
+    info('');
+}
+EOC;
+
+include_once($_SESSION['sys']['basedir'].'/lib/overview_utils.php');
+
+if (empty($_SESSION['overview_mitarbeiter.year'])) $_SESSION['overview_mitarbeiter.year'] = 0;
+
+$mask = array(
+             'table' => 'einsatz',
+             'title' => 'Gesamtstundenaufwand pro Mitarbeiter',
+             'join' => array('personal ON einsatz.personal = personal.id',
+                             'arbeitsarten ON einsatz.arbeiten = arbeitsarten.id',
+                             ),
+             'where' => "arbeitsarten.arbeitsart <> 'Urlaub' AND arbeitsarten.arbeitsart <> 'Krank' AND arbeitsarten.arbeitsart <> 'Sonstige Fehltage'"
+                      . " AND date_part('year', datum) = " . $_SESSION['overview_mitarbeiter.year'],
+             'select' => array(
+                               'title' => 'Auswahl',
+                               'options' => discover_years(),
+                               'default' => 'Jahr wählen',
+                               'selected' => $_SESSION['overview_mitarbeiter.year'],
+                               'onchange' => "setvar(this,'year',select_year_calback,select_year_status)",
+                               ),
+             'variables' => array(
+                                  'year' => array(),
+                                  ),
+             'list' => array(
+                             'id' => array(
+                                           'name' => 'ID',
+                                           'visible' => false,
+                                           'sql' => 'einsatz.id',
+                                           ),
+# Personal, Arbeitsarten, Stunden
+                             'datum' => array(
+                                           'name' => 'Datum',
+                                           'type' => 'date',
+                                           'width' => 70,
+                                           ),
+                             'personal' => array(
+                                           'name' => 'Mitarbeiter',
+                                           'sql' => "personal.vorname || ' ' || personal.name",
+                                           'width' => 150,
+                                           'specs' => "filterUI: 's'",
+                                           ),
+                             'arbeitsarten' => array(
+                                           'name' => 'Arbeiten',
+                                           'sql' => "arbeitsarten.arbeitsart",
+                                           'width' => 150,
+                                           'specs' => "filterUI: 's'",
+                                           ),
+                             'stunden' => array(
+                                           'name' => 'Stunden',
+                                           'type' => 'number',
+                                           'specs' => "decPlaces: 2, ClassName: 'alignright', suffix: '&nbsp;', canSort: false",
+                                           'width' => 60,
+                                           ),
+                             ),
+             );
+
+?>