From 75cd6e04d19be5042b79fdc01d5d74d31d79abfb Mon Sep 17 00:00:00 2001 From: Joey Schulze Date: Sun, 15 Jan 2012 11:06:42 +0100 Subject: [PATCH] Display net price as well The Metro receipt only contains net values --- artikel.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/artikel.php b/artikel.php index 07d0caf..14766c4 100644 --- a/artikel.php +++ b/artikel.php @@ -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, -- 2.20.1