summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-01 00:01:28 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-01 00:01:28 +0000
commitdee53de4b185f59aa154b18138c594a01b445067 (patch)
treeeac17e9b4f823f176cb010fa5bc0129510d4b8d6
parent195c197fb516435e3a752fc8083e687bd8fe30fd (diff)
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
-rw-r--r--LedgerSMB/PriceMatrix.pm3
1 files changed, 2 insertions, 1 deletions
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 = ?