Format name differently
[misc/kostenrechnung] / masks / akkord_mitarbeiter.php
1 <?php
2
3 include_once($_SESSION['sys']['basedir'].'/lib/overview_utils.php');
4
5 if (empty($_SESSION['akkord_mitarbeiter.year'])) $_SESSION['akkord_mitarbeiter.year'] = 0;
6
7 $mask = array(
8               'table' => 'einsatz',
9               'title' => 'Akkordstunden für Mitarbeiter',
10               'join' => array('personal ON einsatz.personal = personal.id',
11                               'gerate ON einsatz.geraet = gerate.id',
12                               'anbaugeraete ON einsatz.anbaugeraet = anbaugeraete.id',
13                               'arbeitsarten ON einsatz.arbeiten = arbeitsarten.id',
14                               'kostenstellen ON einsatz.kostenstelle = kostenstellen.id',
15                               ),
16               'where' => "arbeitsarten.arbeitsart <> 'Urlaub' AND arbeitsarten.arbeitsart <> 'Krank' AND arbeitsarten.arbeitsart <> 'Sonstige Fehltage'"
17                        . " AND date_part('year', datum) = " . $_SESSION['akkord_mitarbeiter.year']
18                        . " AND akkord = 1"
19                        . " GROUP BY personal.id,personal.name,personal.vorname,personal.persstdsatz,arbeitsarten.arbeitsart",
20               'select' => array(
21                                 'title' => 'Auswahl',
22                                 'options' => discover_years(),
23                                 'default' => 'Jahr wählen',
24                                 'selected' => $_SESSION['akkord_mitarbeiter.year'],
25                                 'onchange' => "setvar(this,'year',select_year_calback,select_year_status)",
26                                 ),
27               'variables' => array(
28                                    'year' => array(),
29                                    ),
30               'list' => array(
31                               'id' => array(
32                                             'name' => 'ID',
33                                             'visible' => false,
34                                             'sql' => 'personal.id',
35                                             ),
36                               'personal' => array(
37                                             'name' => 'Mitarbeiter',
38                                             'sql' => "name || ', ' || vorname",
39                                             'width' => 150,
40                                             'specs' => "filterUI: 's'",
41                                             ),
42                               'arbeitsart' => array(
43                                             'name' => 'Arbeitsart',
44                                             'sql' => "arbeitsarten.arbeitsart",
45                                             'width' => 150,
46                                             'specs' => "filterUI: 's'",
47                                             ),
48                               'stunden' => array(
49                                             'name' => 'Stunden',
50                                             'type' => 'number',
51                                             'specs' => "decPlaces: 2, ClassName: 'alignright', suffix: '&nbsp;', canSort: false",
52                                             'sql' => 'sum(stunden)',
53                                             'width' => 70,
54                                             ),
55                               'gesamtkosten' => array(
56                                             'name' => 'Kosten',
57                                             'type' => 'number',
58                                             'specs' => "decPlaces: 2, ClassName: 'alignright', suffix: '&nbsp;', canSort: false",
59                                             'width' => 90,
60                                             'sql' => 'sum(stunden) * personal.persstdsatz',
61                                             'visible' => false,
62                                             ),
63                               ),
64               );
65
66 ?>