diff --git a/sql/quote_review.pg.sql b/sql/quote_review.pg.sql index 1fac56b..1be3f2f 100644 --- a/sql/quote_review.pg.sql +++ b/sql/quote_review.pg.sql @@ -69,9 +69,9 @@ lq AS MATERIALIZED ( -- if more than a pallet use the target price ELSE CASE WHEN units_each >= 8*mpck THEN (lq.upperpricelimit + lq.lowerpricelimit) / 2 -- if more than a pallet use the target price - ELSE CASE WHEN units_each >= 4*mpck THEN lq.upperpricelimit + ELSE CASE WHEN units_each >= 2*mpck THEN lq.upperpricelimit -- if more than a pallet use the target price - ELSE lq.upperpricelimit * 1.15 + ELSE lq.upperpricelimit * 1.05 END END END ELSE CASE WHEN i.pricegroup ~ '(Hanger|Dish)' THEN