Update module to new Hallinta system
[misc/hallinta-metro] / ordersatz.php
index 01b5c09..e099839 100644 (file)
@@ -31,12 +31,12 @@ $mask = array(
                              'name' => array(
                                            'name' => 'Name',
                                            'width' => 290,
-                                           'specs' => "filterUI: 't'",
+                                           'filter' => 't',
                                            ),
                              'koch' => array(
                                            'name' => 'Kochbetreuer',
                                            'width' => 100,
-                                           'specs' => "filterUI: 't'",
+                                           'filter' => 't',
                                            'visible' => false,
                                            ),
                              'datum' => array(
@@ -48,7 +48,7 @@ $mask = array(
                                            'name' => 'Aktion',
                                            'width' => 90,
                                            'control' => $href,
-                                           'specs' => "ClassName: 'aligncenter'",
+                                           'specs' => array('ClassName' => 'aligncenter'),
                                            'sql' => "'bearbeiten'",
                                            ),
                              ),
@@ -109,7 +109,8 @@ function ordersatz_insert($id)
 {
   global $db;
 
-  $sql = sprintf("INSERT INTO metro_ordersatz_pos (ordersatz,artikel,sys_user,sys_edit) SELECT %d,id,%s,now() FROM metro_artikel",
+  $sql = sprintf("INSERT INTO metro_ordersatz_pos (ordersatz,artikel,sys_user,sys_edit) SELECT %d,id,%s,now() " .
+                "FROM metro_artikel WHERE removed = 0",
                 $id, $db->quote($_SESSION['sys']['login']));
 
   $sth = $db->query($sql);