Display price for articles
[misc/hallinta-metro] / ordersatz_pos.php
index 2b4666c..83bd4d1 100644 (file)
@@ -102,6 +102,7 @@ $mask = array(
              'join' => array('metro_ordersatz_pos ON ordersatz = metro_ordersatz.id',
                              'metro_artikel ON artikel = metro_artikel.id'),
              'title' => get_title($_SESSION['ordersatz']),
+             'edit_title' => 'Ordersatz',
              'where' => sprintf('ordersatz = %d AND owner = %d AND done IS NULL', $_SESSION['ordersatz'], $_SESSION['sys']['uid']),
              'list' => array(
                              'id' => array(
@@ -118,6 +119,7 @@ $mask = array(
                                            'name' => 'Artnr',
                                            'width' => 60,
                                            'specs' => "filterUI: 't'",
+                                           'visible' => false,
                                            ),
                              'menge' => array(
                                            'name' => 'Menge',
@@ -126,9 +128,17 @@ $mask = array(
                                            ),
                              'bezeichnung' => array(
                                            'name' => 'Bezeichnung',
-                                           'width' => 260,
+                                           'width' => 300,
                                            'specs' => "filterUI: 't'",
                                            ),
+                             'preis' => array(
+                                           'name' => 'Preis',
+                                           'width' => 60,
+                                           'type' => 'number',
+                                           'specs' => "decPlaces: 2, ClassName: 'alignrightpad', filterUI: 't'",
+                                           'sql' => '(SELECT preis * ((100 + steuersatz)/100) FROM metro_artikel_preis ' .
+                                                    'WHERE artikel = metro_artikel.id ORDER BY datum DESC LIMIT 1)',
+                                           ),
                              'hersteller' => array(
                                            'name' => 'Hersteller',
                                            'width' => 80,
@@ -145,6 +155,7 @@ $mask = array(
                                            'width' => 80,
                                            'specs' => "ClassName: 'aligncenter', filterUI: 's'",
                                            'control' => "new Rico.TableColumn.lookup(".grid_lookup_sql('metro_abteilung','id','name').", 0, '')",
+                                           'visible' => false,
                                            ),
                              'gang' => array(
                                            'name' => 'Gang',
@@ -152,6 +163,7 @@ $mask = array(
                                            'sql' => 'abteilung',
                                            'specs' => "ClassName: 'aligncenter', filterUI: 's'",
                                            'control' => "new Rico.TableColumn.lookup(".grid_lookup_sql('metro_abteilung','id','gang').", 0, '')",
+                                           'visible' => false,
                                            ),
                              ),
              'edit' => array(