Fix r_currency and c_currency. They were swapped. :(
This commit is contained in:
parent
f0ec96fe2a
commit
123da3ea11
@ -20,7 +20,7 @@
|
||||
**
|
||||
** ALTER SEQUENCE rlarp.osm_log_id_seq RESTART 1;
|
||||
**
|
||||
** INSERT INTO rlarp.osm_log (doc)
|
||||
** INSERT INTO rlarp.osm_log (doc)
|
||||
** SELECT jsonb_build_object('user',current_user,'tag','baseline','type','build_pool','stamp',current_timestamp,'source','top level','message','DON''T UNDO')
|
||||
** c. Navigate to the ubm.rlarp.osm_pool table
|
||||
** d. Right-click, and choose Import Data.
|
||||
@ -90,8 +90,8 @@ FROM
|
||||
,[Request Month] AS [request_month]
|
||||
,[Promo Code] AS [promo]
|
||||
,[Financial Statement Line] as [fs_line]
|
||||
,[Inventory Currency] as [r_currency]
|
||||
,[Order Currency] as [c_currency]
|
||||
,[Order Currency] as [r_currency]
|
||||
,[Inventory Currency] as [c_currency]
|
||||
,PRICE.LPP_loc * BASE.Units AS [value_loc]
|
||||
,PRICE.LPP_USD * BASE.Units AS [value_usd]
|
||||
,[Standard Cost Local - Historic] AS [cost_loc]
|
||||
@ -634,9 +634,9 @@ SELECT
|
||||
,[Segment] AS [segm]
|
||||
,CASE WHEN [Major Group] LIKE '610%' THEN 'Fiber' ELSE 'Plastic' END [substance]
|
||||
,[Financial Statement Line] as [fs_line]
|
||||
,[Inventory Currency] as [r_currency]
|
||||
,[Inventory Currency] as [c_currency]
|
||||
,[Value USD]/nullif([Value Local],0) as [r_rate]
|
||||
,[Order Currency] as [c_currency]
|
||||
,[Order Currency] as [r_currency]
|
||||
,[Std Cost USD - Current]/nullif([Std Cost Local - Current],0) as [c_rate]
|
||||
,[Units] AS [units]
|
||||
,[value local] AS [value_loc]
|
||||
@ -668,6 +668,7 @@ UNION ALL
|
||||
--
|
||||
-- OPEN ORDERS GOING INTO THE BEGINNING OF 2024 SEASON --
|
||||
-- THESE WERE BACKED OUT OF THE 2024 BASELINE --
|
||||
|
||||
SELECT
|
||||
CASE
|
||||
WHEN [Ship Season] IS NULL THEN CAST([Promise Season] % 100 AS varchar) + LEFT([Promise Month], 2)
|
||||
@ -697,9 +698,9 @@ SELECT
|
||||
,[Segment] AS [segm]
|
||||
,CASE WHEN [Major Group] LIKE '610%' THEN 'Fiber' ELSE 'Plastic' END [substance]
|
||||
,[Financial Statement Line] as [fs_line]
|
||||
,[Inventory Currency] as [r_currency]
|
||||
,[Inventory Currency] as [c_currency]
|
||||
,[Value USD]/nullif([Value Local],0) as [r_rate]
|
||||
,[Order Currency] as [c_currency]
|
||||
,[Order Currency] as [r_currency]
|
||||
,[Std Cost USD - Current]/nullif([Std Cost Local - Current],0) as [c_rate]
|
||||
,[Units] AS [units]
|
||||
,[value local] AS [value_loc]
|
||||
@ -717,6 +718,7 @@ SELECT
|
||||
,[Ship Date] AS [ship_date]
|
||||
,[Ship Month] AS [ship_month]
|
||||
,[Ship Season] AS [ship_season]
|
||||
,[Promise Date]
|
||||
,'b24' AS [version]
|
||||
,'actuals' AS [iter]
|
||||
,1 AS [logid]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user