update CTE names, remove volume filter
This commit is contained in:
parent
b3122a50bb
commit
0c394b2557
@ -52,11 +52,6 @@ target AS (select target_increment incr)
|
|||||||
-----------------scenario----------------------------
|
-----------------scenario----------------------------
|
||||||
where_clause
|
where_clause
|
||||||
-----------------additional params-------------------
|
-----------------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 calc_status||flag <> 'CLOSEDREMAINDER' --exclude short ships when building order adjustments
|
||||||
AND order_date <= ship_date
|
AND order_date <= ship_date
|
||||||
GROUP BY
|
GROUP BY
|
||||||
@ -175,8 +170,8 @@ target AS (select target_increment incr)
|
|||||||
,log.doc->>'comment' "comment"
|
,log.doc->>'comment' "comment"
|
||||||
,log.doc->>'type' module
|
,log.doc->>'type' module
|
||||||
FROM
|
FROM
|
||||||
volume b
|
basemix b
|
||||||
CROSS JOIN pscale s
|
CROSS JOIN scale s
|
||||||
CROSS JOIN log
|
CROSS JOIN log
|
||||||
WHERE
|
WHERE
|
||||||
s.factor <> 0 or s.mod_price <> 0
|
s.factor <> 0 or s.mod_price <> 0
|
||||||
|
Loading…
Reference in New Issue
Block a user