From dee53de4b185f59aa154b18138c594a01b445067 Mon Sep 17 00:00:00 2001 From: tetragon Date: Wed, 1 Nov 2006 00:01:28 +0000 Subject: Convert query to using new defaults table form git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@436 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/PriceMatrix.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LedgerSMB/PriceMatrix.pm b/LedgerSMB/PriceMatrix.pm index 0a92562c..c604e982 100644 --- a/LedgerSMB/PriceMatrix.pm +++ b/LedgerSMB/PriceMatrix.pm @@ -50,7 +50,8 @@ sub price_matrix_query { SELECT p.id AS parts_id, 0 AS customer_id, 0 AS pricegroup_id, 0 AS pricebreak, p.sellprice, NULL AS validfrom, NULL AS validto, - (SELECT substr(curr,1,3) FROM defaults) AS curr, + (SELECT substr(value,1,3) FROM defaults WHERE + setting_key = 'curr') AS curr, '' AS pricegroup FROM parts p WHERE p.id = ? -- cgit v1.2.3