Wallpapers use new pricing listprice, external products use old version (#151)
This commit is contained in:
@@ -225,5 +225,17 @@ export function searchByFieldValue(fieldid: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getProductListPrice() {
|
export function getProductListPrice() {
|
||||||
return 'SELECT listprice FROM v_listprices WHERE market_id = ? AND printproduct_id = ?';
|
// Temporary solution during partial release of new pricing system.
|
||||||
|
// Wallpapers read price from new pricing system's listprice view, external products use the old view.
|
||||||
|
return `
|
||||||
|
SELECT CASE
|
||||||
|
WHEN groupid IN (1,3) THEN new.listprice
|
||||||
|
ELSE old.listprice
|
||||||
|
END AS listprice
|
||||||
|
FROM v_listprices_new new
|
||||||
|
JOIN "product-printproducts" pp ON new.printproduct_id = printid
|
||||||
|
JOIN v_listprices old USING (market_id, printproduct_id)
|
||||||
|
WHERE new.market_id = ? AND new.printproduct_id = ?
|
||||||
|
`;
|
||||||
|
// return 'SELECT listprice FROM v_listprices WHERE market_id = ? AND printproduct_id = ?';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user