Display net price as well
authorJoey Schulze <joey@infodrom.org>
Sun, 15 Jan 2012 10:06:42 +0000 (11:06 +0100)
committerJoey Schulze <joey@infodrom.org>
Sun, 15 Jan 2012 10:06:42 +0000 (11:06 +0100)
The Metro receipt only contains net values

artikel.php

index 07d0caf..14766c4 100644 (file)
@@ -45,7 +45,6 @@ function price_popup_open()
     var form_id = document.getElementById('edit_id');
     var artikel = document.getElementById('form_artikel');
     artikel.value = form_id.value;
-    Debug.write('id: ' + form_id.value);
 
     price_popup.openPopup(100,300);
 }
@@ -90,7 +89,6 @@ function add_price(obj)
     if (!source) return false;
 
     var parms = 'source=' + source.innerHTML + '&callback=price&';
-    Debug.write(parms+Form.serialize(obj.form));
     ajax_request('function', parms+Form.serialize(obj.form), add_price_callback);
 
     preis.value = '';
@@ -134,6 +132,14 @@ $mask = array(
                                            'width' => 300,
                                            'specs' => "filterUI: 't'",
                                            ),
+                             'netto' => array(
+                                           'name' => 'netto',
+                                           'width' => 60,
+                                           'type' => 'number',
+                                           'specs' => "decPlaces: 2, ClassName: 'alignrightpad', filterUI: 't'",
+                                           'sql' => '(SELECT preis FROM metro_artikel_preis ' .
+                                                    'WHERE artikel = metro_artikel.id ORDER BY datum DESC LIMIT 1)',
+                                           ),
                              'preis' => array(
                                            'name' => 'Preis',
                                            'width' => 60,