summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB')
-rw-r--r--LedgerSMB/PriceMatrix.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/LedgerSMB/PriceMatrix.pm b/LedgerSMB/PriceMatrix.pm
index a2de4baf..0a92562c 100644
--- a/LedgerSMB/PriceMatrix.pm
+++ b/LedgerSMB/PriceMatrix.pm
@@ -59,7 +59,7 @@ sub price_matrix_query {
SELECT p.parts_id, p.customer_id, p.pricegroup_id,
p.pricebreak, p.sellprice, p.validfrom,
- p.valid_to, p.curr, g.pricegroup
+ p.validto, p.curr, g.pricegroup
FROM partscustomer p
LEFT JOIN pricegroup g ON (g.id = p.pricegroup_id)
WHERE p.parts_id = ?
@@ -69,7 +69,7 @@ sub price_matrix_query {
SELECT p.parts_id, p.customer_id, p.pricegroup_id,
p.pricebreak, p.sellprice, p.validfrom,
- p.valid_to, p.curr, g.pricegroup
+ p.validto, 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)
@@ -80,8 +80,9 @@ sub price_matrix_query {
SELECT p.parts_id, p.customer_id, p.pricegroup_id,
p.pricebreak, p.sellprice, p.validfrom,
- p.valid_to, p.curr, g.pricegroup
+ p.validto, p.curr, g.pricegroup
FROM partscustomer p
+ LEFT JOIN pricegroup g ON (g.id = p.pricegroup_id)
WHERE p.customer_id = 0
AND p.pricegroup_id = 0
AND p.parts_id = ?