New forms
authorJoey Schulze <joey@infodrom.org>
Sun, 7 Mar 2010 12:12:21 +0000 (13:12 +0100)
committerJoey Schulze <joey@infodrom.org>
Sun, 7 Mar 2010 12:12:21 +0000 (13:12 +0100)
masks/akkord_geraete.php [new file with mode: 0644]
masks/akkord_mitarbeiter.php [new file with mode: 0644]

diff --git a/masks/akkord_geraete.php b/masks/akkord_geraete.php
new file mode 100644 (file)
index 0000000..80911ff
--- /dev/null
@@ -0,0 +1,57 @@
+<?php
+
+include_once($_SESSION['sys']['basedir'].'/lib/overview_utils.php');
+
+if (empty($_SESSION['akkord_geraete.year'])) $_SESSION['akkord_geraete.year'] = 0;
+
+$mask = array(
+             'table' => 'einsatz',
+             'title' => 'Akkordstunden für Geräte',
+             'join' => array('gerate ON einsatz.geraet = gerate.id',
+                             'anbaugeraete ON einsatz.anbaugeraet = anbaugeraete.id',
+                             'arbeitsarten ON einsatz.arbeiten = arbeitsarten.id',
+                             'kostenstellen ON einsatz.kostenstelle = kostenstellen.id',
+                             ),
+             'where' => "arbeitsarten.arbeitsart <> 'Urlaub' AND arbeitsarten.arbeitsart <> 'Krank' AND arbeitsarten.arbeitsart <> 'Sonstige Fehltage'"
+                      . " AND date_part('year', datum) = " . $_SESSION['akkord_geraete.year']
+                      . " AND akkord = 1"
+                      . " GROUP BY gerate.id,gerate.geraet,arbeitsarten.arbeitsart",
+             'select' => array(
+                               'title' => 'Auswahl',
+                               'options' => discover_years(),
+                               'default' => 'Jahr wählen',
+                               'selected' => $_SESSION['akkord_geraete.year'],
+                               'onchange' => "setvar(this,'year',select_year_calback,select_year_status)",
+                               ),
+             'variables' => array(
+                                  'year' => array(),
+                                  ),
+             'list' => array(
+                             'id' => array(
+                                           'name' => 'ID',
+                                           'visible' => false,
+                                           'sql' => 'gerate.id',
+                                           ),
+                             'geraet' => array(
+                                           'name' => 'Gerät',
+                                           'sql' => "gerate.geraet",
+                                           'width' => 170,
+                                           'specs' => "filterUI: 's'",
+                                           ),
+                             'arbeitsart' => array(
+                                           'name' => 'Arbeitsart',
+                                           'sql' => "arbeitsarten.arbeitsart",
+                                           'width' => 150,
+                                           'specs' => "filterUI: 's'",
+                                           ),
+                             'stunden' => array(
+                                           'name' => 'Stunden',
+                                           'type' => 'number',
+                                           'specs' => "decPlaces: 2, ClassName: 'alignright', suffix: '&nbsp;', canSort: false",
+                                           'width' => 90,
+                                           'sql' => 'sum(geraetstunden)',
+                                           ),
+                             ),
+             );
+
+?>
diff --git a/masks/akkord_mitarbeiter.php b/masks/akkord_mitarbeiter.php
new file mode 100644 (file)
index 0000000..b228872
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+
+include_once($_SESSION['sys']['basedir'].'/lib/overview_utils.php');
+
+if (empty($_SESSION['akkord_mitarbeiter.year'])) $_SESSION['akkord_mitarbeiter.year'] = 0;
+
+$mask = array(
+             'table' => 'einsatz',
+             'title' => 'Akkordstunden für Mitarbeiter',
+             'join' => array('personal ON einsatz.personal = personal.id',
+                             'gerate ON einsatz.geraet = gerate.id',
+                             'anbaugeraete ON einsatz.anbaugeraet = anbaugeraete.id',
+                             'arbeitsarten ON einsatz.arbeiten = arbeitsarten.id',
+                             'kostenstellen ON einsatz.kostenstelle = kostenstellen.id',
+                             ),
+             'where' => "arbeitsarten.arbeitsart <> 'Urlaub' AND arbeitsarten.arbeitsart <> 'Krank' AND arbeitsarten.arbeitsart <> 'Sonstige Fehltage'"
+                      . " AND date_part('year', datum) = " . $_SESSION['akkord_mitarbeiter.year']
+                      . " AND akkord = 1"
+                      . " GROUP BY personal.id,personal.name,personal.vorname,personal.persstdsatz,arbeitsarten.arbeitsart",
+             'select' => array(
+                               'title' => 'Auswahl',
+                               'options' => discover_years(),
+                               'default' => 'Jahr wählen',
+                               'selected' => $_SESSION['akkord_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' => 'personal.id',
+                                           ),
+                             'personal' => array(
+                                           'name' => 'Mitarbeiter',
+                                           'sql' => "vorname || ' ' || name",
+                                           'width' => 150,
+                                           'specs' => "filterUI: 's'",
+                                           ),
+                             'arbeitsart' => array(
+                                           'name' => 'Arbeitsart',
+                                           'sql' => "arbeitsarten.arbeitsart",
+                                           'width' => 150,
+                                           'specs' => "filterUI: 's'",
+                                           ),
+                             'stunden' => array(
+                                           'name' => 'Stunden',
+                                           'type' => 'number',
+                                           'specs' => "decPlaces: 2, ClassName: 'alignright', suffix: '&nbsp;', canSort: false",
+                                           'sql' => 'sum(stunden)',
+                                           'width' => 70,
+                                           ),
+                             'gesamtkosten' => array(
+                                           'name' => 'Kosten',
+                                           'type' => 'number',
+                                           'specs' => "decPlaces: 2, ClassName: 'alignright', suffix: '&nbsp;', canSort: false",
+                                           'width' => 90,
+                                           'sql' => 'sum(stunden) * personal.persstdsatz',
+                                           'visible' => false,
+                                           ),
+                             ),
+             );
+
+?>