Adjust form to new table einsatz and co.
[misc/kostenrechnung] / masks / materialien.php
1 <?php
2
3 $mask = array(
4               'table' => 'materialien',
5               'title' => 'Materialien',
6               'sort' => 1,
7               'join' => array('einheiten ON materialien.einheit = einheiten.id'),
8               'list' => array(
9                               'id' => array(
10                                             'name' => 'ID',
11                                             'visible' => false,
12                                             'sql' => 'materialien.id',
13                                             ),
14                               'material' => array(
15                                             'name' => 'Material',
16                                             'width' => 270,
17                                             'specs' => "filterUI: 't'",
18                                             ),
19                               'einheit' => array(
20                                             'name' => 'Einheit',
21                                             'width' => 70,
22                                             'sql' => 'einheiten.einheit',
23                                             'specs' => 'canSort: false',
24                                             ),
25                               'preis' => array(
26                                             'name' => 'Preis',
27                                             'type' => 'number',
28                                             'specs' => "decPlaces: 2, ClassName: 'alignright', canSort: false",
29                                             'width' => 50,
30                                             ),
31                               ),
32               'edit' => array(
33                               'material' => array(
34                                             'name' => 'Material',
35                                             'type' => 'text',
36                                             'size' => 24,
37                                             'required' => true,
38                                             ),
39                               'einheit' => array(
40                                             'name' => 'Einheit',
41                                             'type' => 'select',
42                                             'options' => 'SELECT id,einheit AS text FROM einheiten ORDER BY einheit',
43                                             'size' => 10,
44                                             ),
45                               'preis' => array(
46                                             'name' => 'Preis',
47                                             'type' => 'decimal',
48                                             'size' => 10,
49                                             'comment' => 'immer brutto',
50                                             'required' => true,
51                                             ),
52                               ),
53               );
54
55 ?>