Adjust form to new table einsatz and co.
[misc/kostenrechnung] / masks / overview_kostenstellen.php
1 <?php
2
3 include_once($_SESSION['sys']['basedir'].'/lib/overview_utils.php');
4
5 if (empty($_SESSION['overview_kostenstellen.year'])) $_SESSION['overview_kostenstellen.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                               'kostenstellen ON einsatz.kostenstelle = kostenstellen.id',
12                               ),
13               'where' => "arbeitsarten.arbeitsart <> 'Urlaub' AND arbeitsarten.arbeitsart <> 'Krank' AND arbeitsarten.arbeitsart <> 'Sonstige Fehltage'"
14                        . " AND date_part('year', datum) = " . $_SESSION['overview_kostenstellen.year'],
15               'select' => array(
16                                 'title' => 'Auswahl',
17                                 'options' => discover_years(),
18                                 'default' => 'Jahr wählen',
19                                 'selected' => $_SESSION['overview_kostenstellen.year'],
20                                 'onchange' => "setvar(this,'year',select_year_calback,select_year_status)",
21                                 ),
22               'variables' => array(
23                                    'year' => array(),
24                                    ),
25               'list' => array(
26                               'id' => array(
27                                             'name' => 'ID',
28                                             'visible' => false,
29                                             'sql' => 'einsatz.id',
30                                             ),
31                               'datum' => array(
32                                             'name' => 'Datum',
33                                             'type' => 'date',
34                                             'width' => 70,
35                                             ),
36                               'kostenstelle' => array(
37                                             'name' => 'Kostenstelle',
38                                             'sql' => "kostenstellen.kostenstelle",
39                                             'width' => 150,
40                                             'specs' => "filterUI: 's'",
41                                             ),
42                               'arbeitsarten' => array(
43                                             'name' => 'Arbeiten',
44                                             'sql' => "arbeitsarten.arbeitsart",
45                                             'width' => 150,
46                                             'specs' => "filterUI: 's'",
47                                             ),
48                               'stunden' => array(
49                                             'name' => 'Personalstunden',
50                                             'type' => 'number',
51                                             'specs' => "decPlaces: 2, ClassName: 'alignright', suffix: '&nbsp;', canSort: false",
52                                             'width' => 60,
53                                             ),
54                               'geraetstunden' => array(
55                                             'name' => 'Gerätstunden',
56                                             'type' => 'number',
57                                             'specs' => "decPlaces: 2, ClassName: 'alignright', suffix: '&nbsp;', canSort: false",
58                                             'width' => 60,
59                                             ),
60                               'gesamtstunden' => array(
61                                             'name' => 'Gesamtstunden',
62                                             'type' => 'number',
63                                             'specs' => "decPlaces: 2, ClassName: 'alignright', suffix: '&nbsp;', canSort: false",
64                                             'width' => 60,
65                                             'sql' => 'stunden + geraetstunden',
66                                             ),
67                               'stdlfdm' => array(
68                                             'name' => 'Stunden pro lfdm',
69                                             'type' => 'number',
70                                             'specs' => "decPlaces: 2, ClassName: 'alignright', suffix: '&nbsp;', canSort: false",
71                                             'width' => 60,
72                                             'sql' => '(stunden + geraetstunden) / laenge',
73                                             ),
74                               ),
75               );
76
77 ?>