db3dc8bc73
increment sql
2025-04-04 13:43:47 -04:00
PhilRunninger
241994cb56
Use a pre-authorized, fixed exchange rate of 0.7409 for forecasting.
2024-03-18 21:23:07 -04:00
PhilRunninger
aabbf8210b
Make SQL changes to advance to the next season.
2024-03-13 09:03:16 -04:00
PhilRunninger
f8f1433546
Make debugging statements in SQL files more informative.
...
I added the CTE's name as the new first column of the
`SELECT * FROM <cte>` statement.
2024-03-13 08:50:50 -04:00
PhilRunninger
f0ec96fe2a
Change WHERE clause to remove tag[= or <>]'open-orders' condition.
...
Now that we think we know what we're doing, I'm using a more rigorous
approach to defining iterations and tags, and this condition is no
longer necessary, and in fact, may be harmful. This I'm removing it.
The initial load of data will have these values.
iter | tag | purpose
--------|-------------|-------------------------------------------------
plan | baseline | Adjustments will be made to these values only.
actuals | open-orders | Ordered before 2024 season, still open.
actuals | booked | Ordered in 2024 season so far
2023-08-29 20:02:46 -04:00
PhilRunninger
47d1baffc5
Handle the case where baseline is zero (units or value).
...
This happens when a customer places identical orders and specifies that
they be shipped in different seasons. We end up with one order shipped
in 2023 and one open for 2024. Under our current operating procedures,
open orders are subtracted from shipped orders and are presented as
baseline for the next forecast. The zero that appears in the baseline in
this case was causing all kinds of issues in the SQL scripts for
inserting the adjustments, ranging from finding zero rows to adjust to
division by zero.
Another change required to correct this was updating the iter value of
the open orders from 'actuals' to 'copy':
UPDATE rlarp.osm_pool
SET iter = 'copy'
WHERE tag = 'open-orders'
2023-05-17 05:28:21 -04:00
PhilRunninger
86225ea7e5
Get pounds to update for each forecast adjustment.
...
Lots of cleanup here too, removing large swaths of code that are no
longer needed. Many improvements the Excel workbook, which is kept in
Teams, not git. These changes may or may not have had accompanying VBA
changes.
2023-04-27 16:54:37 -04:00
12c17b0be6
adjust rep source to rlarp.repc, adjust join logic to match current osm definition
2023-04-05 13:02:53 -04:00
PhilRunninger
480adef789
Update some 2022 references to 2024, and fix round() function calls.
2023-04-05 12:37:35 -04:00
PhilRunninger
ed5975daf7
Switch source table from rlarp.itemmv to "CMS.CUSLG".itemm
2023-03-01 17:55:30 -05:00
66b74e31cb
update all routes to round to 2 decimals for units, value, and cost
2021-04-19 09:20:52 -04:00
d13519c07c
trim part number coming from CMS listing in spreadsheet with whitespace at end
2021-04-14 15:26:36 +00:00
ab7af8d2ed
redefine segment
2021-04-13 16:10:04 -04:00
551a4867d6
increment route fiscal years
2021-04-05 19:22:20 +00:00
Paul Trowbridge
85db8616e5
shipto incorrectly referencing billto
2020-03-18 15:32:04 -04:00
pt
10d20e050e
use basline fx and new budget period fx rates
2020-02-26 23:55:20 -05:00
Trowbridge
8838fdbcbc
add in currency
2020-02-26 17:07:49 -05:00
Trowbridge
43a194b116
add terms to base mix
2020-02-26 17:07:35 -05:00
Paul Trowbridge
fb1fcabb00
coalesce DBA and coalesce FX for local
2020-02-26 10:35:41 -05:00
Trowbridge
ebc169e34a
direct not hooking up due to change to using just the name
2020-02-25 16:57:08 -05:00
Paul Trowbridge
ffee472954
make date ranges inclusive of lsat date
2020-02-25 16:50:39 -05:00
Trowbridge
df02a31000
the module is stored as key type in the json
2020-02-25 15:08:01 -05:00
Trowbridge
787cc9452f
remove white space in month formatting
2020-02-25 10:11:40 -05:00
Trowbridge
879319b889
change how currency is handled and add sort to month
2020-02-25 10:01:09 -05:00
Trowbridge
ff1304be3c
add substance column and move some files out of the route folder that aren't actually being used by routes
2020-02-19 13:25:28 -05:00
Trowbridge
cbc2caa41d
add module back in
2020-02-18 17:10:49 -05:00
Trowbridge
69346646bd
change module to be the comment
2020-02-18 15:35:56 -05:00
Trowbridge
d3a4a45d53
change comment to be the tag
2020-02-18 14:47:46 -05:00
Trowbridge
7635380ccc
ensure not to load null comments
2020-02-14 17:00:44 -05:00
Paul Trowbridge
db13f3d38c
routes that make adjustments need to return comment info
2020-02-14 15:52:16 -05:00
Trowbridge
18558674c0
change key name to message
2020-02-14 14:41:51 -05:00
pt
6e8f026770
forgot to swap out alias
2020-02-14 00:15:11 -05:00
Paul Trowbridge
8aeecc845b
use materialized view of itemm and use date range object to facilitate join
2020-02-13 23:54:11 -05:00
Paul Trowbridge
8d1cd1ade6
functional but joining to itemm is very expensive
2020-02-13 17:29:13 -05:00
Trowbridge
acca526dca
overhaul new basket
2020-02-13 16:41:39 -05:00
Paul Trowbridge
7008f57f66
make sure days are between 1 and 28
2019-04-16 13:26:39 +00:00
Paul Trowbridge
62473aee92
bug: ship to group join was predicated on bill_to customer
2019-03-27 09:14:50 -05:00
Paul Trowbridge
66483b6967
new items are relabeled as volume
2019-03-24 15:59:29 -04:00
Paul Trowbridge
d968237ea7
calc status cannot be null due to inclusion in where clause
2019-03-22 10:50:18 -04:00
Paul Trowbridge
ad8639a4c8
insert statement was wrong
2019-03-22 04:53:05 -04:00
Paul Trowbridge
0a9a56c6c2
parameterize where clause
2019-03-22 04:51:44 -04:00
Trowbridge
a8f8a8cffb
parameterize for route prep
2019-03-22 04:42:13 -04:00
Trowbridge
dfcd85f98b
currency, fsline
2019-03-22 04:24:01 -04:00
Trowbridge
7d1adcf779
link in some more offline meta
2019-03-22 04:16:07 -04:00
Trowbridge
46a299c1a3
bring in offline meta and use initial part
2019-03-22 04:04:13 -04:00
Trowbridge
6faa31c46b
bring in some customer master
2019-03-22 04:03:42 -04:00
Paul Trowbridge
966b072f72
get fuctional through basemix
2019-03-22 03:33:45 -04:00
Trowbridge
f18b35364d
start work on setting up a new basket route
2019-03-22 00:41:30 -04:00