Remove incorrect calculation percent change factor for value.
This was causing a double dipping of value changes. Along with this
change was a manual purge of the changes that mistakenly were made.
Luckily they were easy to find:
l.doc->>'type' = 'scale_vp'
iter = 'adj price'
This commit is contained in:
parent
3fa2cb07f5
commit
e87c0ecc62
@ -246,7 +246,7 @@ FROM
|
|||||||
WHEN (SELECT coalesce(sum(value_loc),0) FROM volume) = 0 -- Get a per-unit pincr value
|
WHEN (SELECT coalesce(sum(value_loc),0) FROM volume) = 0 -- Get a per-unit pincr value
|
||||||
THEN (SELECT pincr::numeric FROM target) / (SELECT nullif(sum(units),0) FROM volume)
|
THEN (SELECT pincr::numeric FROM target) / (SELECT nullif(sum(units),0) FROM volume)
|
||||||
ELSE -- Find percent change for existing value_loc
|
ELSE -- Find percent change for existing value_loc
|
||||||
(SELECT pincr::numeric FROM target) / (SELECT nullif(sum(value_loc * r_rate),0) FROM volume)
|
(SELECT pincr::numeric FROM target) / (SELECT nullif(sum(value_loc),0) FROM volume) - 1
|
||||||
END factor
|
END factor
|
||||||
)
|
)
|
||||||
-- select * from pscale
|
-- select * from pscale
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user