summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-24 02:47:46 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-24 02:47:46 +0000
commit4e1902377b63a53dbd1df8d0f07c2537b77ec94d (patch)
treeef5f38930c1be7e48633d204d66b3860ef64ea20
parenta0ca5fa5615f963b479f7083db9c10f1fa1e9d29 (diff)
Fixed pricegroup query
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@283 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r--LedgerSMB/PriceMatrix.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/LedgerSMB/PriceMatrix.pm b/LedgerSMB/PriceMatrix.pm
index ad2d3b08..a2de4baf 100644
--- a/LedgerSMB/PriceMatrix.pm
+++ b/LedgerSMB/PriceMatrix.pm
@@ -57,7 +57,9 @@ sub price_matrix_query {
UNION
- SELECT p.*, g.pricegroup
+ SELECT p.parts_id, p.customer_id, p.pricegroup_id,
+ p.pricebreak, p.sellprice, p.validfrom,
+ p.valid_to, p.curr, g.pricegroup
FROM partscustomer p
LEFT JOIN pricegroup g ON (g.id = p.pricegroup_id)
WHERE p.parts_id = ?
@@ -65,7 +67,9 @@ sub price_matrix_query {
UNION
- SELECT p.*, g.pricegroup
+ SELECT p.parts_id, p.customer_id, p.pricegroup_id,
+ p.pricebreak, p.sellprice, p.validfrom,
+ p.valid_to, p.curr, g.pricegroup
FROM partscustomer p
LEFT JOIN pricegroup g ON (g.id = p.pricegroup_id)
JOIN customer c ON (c.pricegroup_id = g.id)
@@ -74,7 +78,9 @@ sub price_matrix_query {
UNION
- SELECT p.*, '' AS pricegroup
+ SELECT p.parts_id, p.customer_id, p.pricegroup_id,
+ p.pricebreak, p.sellprice, p.validfrom,
+ p.valid_to, p.curr, g.pricegroup
FROM partscustomer p
WHERE p.customer_id = 0
AND p.pricegroup_id = 0