Rename internal variable
[misc/kostenrechnung] / masks / overview_stunden.php
1 <?php
2
3 include_once($_SESSION['sys']['basedir'].'/lib/overview_utils.php');
4
5 if (empty($_SESSION['overview_stunden.year'])) $_SESSION['overview_stunden.year'] = 0;
6
7 $mask = array(
8               'table' => 'einsatz',
9               'title' => 'Stundenübersicht nach Kostenstellen',
10               'join' => array('arbeitsarten ON einsatz.arbeiten = arbeitsarten.id',
11                               'gebiet ON einsatz.gebiet = gebiet.id',
12                               'kostenstellen ON einsatz.kostenstelle = kostenstellen.id',
13                               'personal ON einsatz.personal = personal.id',
14                               'gerate ON einsatz.geraet = gerate.id',
15                               'anbaugeraete ON einsatz.anbaugeraet = anbaugeraete.id',
16                               ),
17               'where' => "arbeitsarten.arbeitsart <> 'Urlaub' AND arbeitsarten.arbeitsart <> 'Krank' AND arbeitsarten.arbeitsart <> 'Sonstige Fehltage'"
18                        . " AND date_part('year', datum) = " . $_SESSION['overview_stunden.year'],
19               'select' => array(
20                                 'title' => 'Auswahl',
21                                 'options' => discover_years(),
22                                 'default' => 'Jahr wählen',
23                                 'selected' => $_SESSION['overview_stunden.year'],
24                                 'onchange' => "setvar(this,'year',select_year_calback,select_year_status)",
25                                 ),
26               'variables' => array(
27                                    'year' => array(),
28                                    ),
29               'list' => array(
30                               'id' => array(
31                                             'name' => 'ID',
32                                             'visible' => false,
33                                             'width' => 40,
34                                             'sql' => 'einsatz.id',
35                                             ),
36                               'datum' => array(
37                                             'name' => 'Datum',
38                                             'type' => 'date',
39                                             'width' => 70,
40                                             ),
41                               'gebiet' => array(
42                                             'name' => 'Gebiet',
43                                             'sql' => "gebiet.gebiet",
44                                             'width' => 150,
45                                             'specs' => "filterUI: 's'",
46                                             ),
47                               'kostenstelle' => array(
48                                             'name' => 'Kostenstelle',
49                                             'sql' => "kostenstellen.kostenstelle",
50                                             'width' => 150,
51                                             'specs' => "filterUI: 's'",
52                                             ),
53                               'arbeitsarten' => array(
54                                             'name' => 'Arbeiten',
55                                             'sql' => "arbeitsarten.arbeitsart",
56                                             'width' => 150,
57                                             'specs' => "filterUI: 's'",
58                                             ),
59                               'personal' => array(
60                                             'name' => 'Mitarbeiter',
61                                             'sql' => "personal.vorname || ' ' || personal.name",
62                                             'width' => 150,
63                                             'specs' => "filterUI: 's'",
64                                             ),
65                               'stunden' => array(
66                                             'name' => 'Mitarbeiterstunden',
67                                             'type' => 'number',
68                                             'specs' => "decPlaces: 2, ClassName: 'alignright', suffix: '&nbsp;', canSort: false",
69                                             'width' => 60,
70                                             ),
71                               'geraet' => array(
72                                             'name' => 'Gerät',
73                                             'sql' => "gerate.geraet",
74                                             'width' => 150,
75                                             'specs' => "filterUI: 's'",
76                                             ),
77                               'anbaugeraet' => array(
78                                             'name' => 'Anbaugerät',
79                                             'sql' => "anbaugeraete.anbaugeraet",
80                                             'width' => 150,
81                                             'specs' => "filterUI: 's'",
82                                             ),
83                               'geraetstunden' => array(
84                                             'name' => 'Gerätstunden',
85                                             'type' => 'number',
86                                             'specs' => "decPlaces: 2, ClassName: 'alignright', suffix: '&nbsp;', canSort: false",
87                                             'width' => 60,
88                                             ),
89                               'gesamtstunden' => array(
90                                             'name' => 'Gesamtstunden',
91                                             'type' => 'number',
92                                             'specs' => "decPlaces: 2, ClassName: 'alignright', suffix: '&nbsp;', canSort: false",
93                                             'width' => 60,
94                                             'sql' => 'stunden + geraetstunden',
95                                             ),
96                               'stdlfdm' => array(
97                                             'name' => 'Stunden pro lfdm',
98                                             'type' => 'number',
99                                             'specs' => "decPlaces: 2, ClassName: 'alignright', suffix: '&nbsp;', canSort: false",
100                                             'width' => 60,
101                                             'sql' => '(stunden + geraetstunden) / laenge',
102                                             ),
103                               ),
104               );
105
106 ?>