Display price for articles
authorJoey Schulze <joey@infodrom.org>
Sat, 14 Jan 2012 17:26:35 +0000 (18:26 +0100)
committerJoey Schulze <joey@infodrom.org>
Sat, 14 Jan 2012 17:26:35 +0000 (18:26 +0100)
artikel.php
ordersatz_pos.php

index 90c2689..76398ad 100644 (file)
@@ -17,18 +17,25 @@ $mask = array(
                              'menge' => array(
                                            'name' => 'Menge',
                                            'width' => 60,
                              'menge' => array(
                                            'name' => 'Menge',
                                            'width' => 60,
-                                           'specs' => "ClassName: 'alignrightpad', filterUI: 't'",
+                                           'specs' => "ClassName: 'alignrightpad'",
                                            ),
                              'bezeichnung' => array(
                                            'name' => 'Bezeichnung',
                                            ),
                              'bezeichnung' => array(
                                            'name' => 'Bezeichnung',
-                                           'width' => 345,
+                                           'width' => 300,
                                            'specs' => "filterUI: 't'",
                                            ),
                                            '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' => 100,
                                            'specs' => "filterUI: 't'",
                              'hersteller' => array(
                                            'name' => 'Hersteller',
                                            'width' => 100,
                                            'specs' => "filterUI: 't'",
-                                           'visible' => false,
                                            ),
                              'abteilung' => array(
                                            'name' => 'Abteilung',
                                            ),
                              'abteilung' => array(
                                            'name' => 'Abteilung',
index efa99d7..83bd4d1 100644 (file)
@@ -128,9 +128,17 @@ $mask = array(
                                            ),
                              'bezeichnung' => array(
                                            'name' => 'Bezeichnung',
                                            ),
                              'bezeichnung' => array(
                                            'name' => 'Bezeichnung',
-                                           'width' => 260,
+                                           'width' => 300,
                                            'specs' => "filterUI: 't'",
                                            ),
                                            '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,
                              'hersteller' => array(
                                            'name' => 'Hersteller',
                                            'width' => 80,