clean-up minor errors, running now
This commit is contained in:
parent
f83746b892
commit
e49c051383
@ -12,7 +12,7 @@ target AS (select target_vol vincr, target_prc pincr)
|
||||
where_clause
|
||||
-----------------additional params-------------------
|
||||
AND calc_status||flag <> 'CLOSEDREMAINDER' --exclude short ships when building order adjustments
|
||||
AND adj_orderdate <= adj_shipdate
|
||||
AND order_date <= ship_date
|
||||
|
||||
)
|
||||
,flagv AS (
|
||||
@ -176,11 +176,11 @@ target AS (select target_vol vincr, target_prc pincr)
|
||||
,r_rate --master data
|
||||
,c_currency --master data
|
||||
,c_rate --master data
|
||||
,units*s.factor
|
||||
,value_loc*s.factor
|
||||
,value_usd*s.factor
|
||||
,cost_loc*s.factor
|
||||
,cost_usd*s.factor
|
||||
,units*s.factor units
|
||||
,value_loc*s.factor value_loc
|
||||
,value_usd*s.factor value_usd
|
||||
,cost_loc*s.factor cost_loc
|
||||
,cost_usd*s.factor cost_usd
|
||||
,calc_status --0
|
||||
,flag --0
|
||||
,order_date --history date mix
|
||||
@ -225,8 +225,6 @@ FROM
|
||||
END mod_price
|
||||
)
|
||||
--select * from pscale
|
||||
,(CASE WHEN s.factor = 0 THEN b.units * s.mod_price/b.r_rate ELSE b.value_loc*s.factor END)::numeric value_loc
|
||||
,(CASE WHEN s.factor = 0 THEN b.units * s.mod_price/b.r_rate ELSE b.value_loc_pl*s.factor END)::numeric value_loc_pl
|
||||
,pricing AS (
|
||||
SELECT
|
||||
fspr
|
||||
|
Loading…
Reference in New Issue
Block a user