diff --git a/route_sql/scale_pd.sql b/route_sql/scale_pd.sql index 8f61076..b119180 100644 --- a/route_sql/scale_pd.sql +++ b/route_sql/scale_pd.sql @@ -52,11 +52,6 @@ target AS (select target_increment incr) -----------------scenario---------------------------- where_clause -----------------additional params------------------- - AND CASE (SELECT flag FROM flagv) - WHEN 'scale all' THEN true - WHEN 'scale copy' THEN iter = 'copy' - WHEN 'scale new part' THEN module = 'new basket' - END AND calc_status||flag <> 'CLOSEDREMAINDER' --exclude short ships when building order adjustments AND order_date <= ship_date GROUP BY @@ -175,8 +170,8 @@ target AS (select target_increment incr) ,log.doc->>'comment' "comment" ,log.doc->>'type' module FROM - volume b - CROSS JOIN pscale s + basemix b + CROSS JOIN scale s CROSS JOIN log WHERE s.factor <> 0 or s.mod_price <> 0