Adjust form to new table einsatz and co.
[misc/kostenrechnung] / masks / geraete.php
1 <?php
2
3 $mask = array(
4               'table' => 'gerate',
5               'title' => 'Geräte',
6               'join' => array('geraetetypen ON gerate.geraetetyp = geraetetypen.id'),
7               'sort' => 1,
8               'list' => array(
9                               'id' => array(
10                                             'name' => 'ID',
11                                             'visible' => false,
12                                             'sql' => 'gerate.id',
13                                             ),
14                               'geraet' => array(
15                                             'name' => 'Gerät',
16                                             'width' => 200,
17                                             ),
18                               'geraetetyp' => array(
19                                             'name' => 'Gerätetyp',
20                                             'width' => 70,
21                                             'sql' => 'geraetetypen.name',
22                                             ),
23                               'gerstdsatz' => array(
24                                             'name' => 'Stundensatz',
25                                             'type' => 'number',
26                                             'specs' => "decPlaces: 2, ClassName: 'alignright', canSort: false",
27                                             'width' => 50,
28                                             ),
29                               'geraetkst_intern' => array(
30                                             'name' => 'interne Kosten',
31                                             'type' => 'number',
32                                             'specs' => "decPlaces: 2, ClassName: 'alignright', canSort: false",
33                                             'width' => 60,
34                                             ),
35                               'geraetkst_extern' => array(
36                                             'name' => 'externe Kosten',
37                                             'type' => 'number',
38                                             'specs' => "decPlaces: 2, ClassName: 'alignright', canSort: false",
39                                             'width' => 60,
40                                             ),
41                               ),
42               'edit' => array(
43                               'geraet' => array(
44                                             'name' => 'Gerät',
45                                             'type' => 'text',
46                                             'size' => 24,
47                                             'required' => true,
48                                             ),
49                               'geraetetyp' => array(
50                                             'name' => 'Gerätetyp',
51                                             'type' => 'select',
52                                             'options' => 'SELECT id,name AS text FROM geraetetypen ORDER BY name',
53                                             ),
54                               'gerstdsatz' => array(
55                                             'name' => 'Stundensatz',
56                                             'type' => 'decimal',
57                                             'size' => 15,
58                                             'required' => true,
59                                             ),
60                               'geraetkst_intern' => array(
61                                             'name' => 'Gerätekosten intern',
62                                             'type' => 'decimal',
63                                             'size' => 15,
64                                             'required' => true,
65                                             ),
66                               'geraetkst_extern' => array(
67                                             'name' => 'Gerätekosten extern',
68                                             'type' => 'decimal',
69                                             'size' => 15,
70                                             'required' => true,
71                                             ),
72                               ),
73               );
74
75 ?>