Commit Graph

587 Commits

Author SHA1 Message Date
c46402c1cb commit: 2025-03-31 15:21:01 2025-03-31 15:21:01 -04:00
aa8367e6e7 commit: 2025-03-31 15:17:12 2025-03-31 15:17:12 -04:00
a5546ecea7 commit: 2025-03-31 15:12:57 2025-03-31 15:12:57 -04:00
89223b09dd commit: 2025-03-27 23:53:31 2025-03-27 23:53:31 -04:00
92f14f5726 snap season 2025-03-27 21:39:02 -04:00
4af21a1d65 add channel 2025-03-27 20:27:55 -04:00
d2f5f6bc51 commit: 2025-03-27 19:00:41 2025-03-27 19:00:41 -04:00
f54081f69d include guidance logic 2025-03-27 13:59:04 -04:00
eaba629002 only gross sales 2025-03-27 13:46:05 -04:00
4f675a62a3 aggregate to month level 2025-03-27 11:12:39 -04:00
c265917a56 fix gld join and snap dsm to be default rep 2025-03-26 22:37:29 -04:00
aa50440ec5 increase range 2025-03-26 22:22:33 -04:00
57adefbd4b updates 2025-03-26 22:12:57 -04:00
4edd2aee40 commit: 2025-03-20 02:09:17 2025-03-20 02:09:17 -04:00
1434021bfe commit: 2025-03-20 00:36:00 2025-03-20 00:36:00 -04:00
dde2e8d581 commit: 2025-03-20 00:35:32 2025-03-20 00:35:32 -04:00
f2f4dcedae commit: 2025-03-19 17:19:13 2025-03-19 17:19:13 -04:00
6b76d9d935 commit: 2025-03-19 15:42:11 2025-03-19 15:42:11 -04:00
2941e0f3a4 commit: 2025-03-19 15:31:38 2025-03-19 15:31:38 -04:00
2a6419b386 trim fs_line 2024-05-14 10:30:13 -04:00
b7309bb3f3 use the pounds from pool in case of fake parts 2024-05-14 09:06:24 -04:00
8fc5d0e689 round when moving to plan in case it was not already done 2024-05-14 08:51:42 -04:00
d9e78e285f lowercase kg 2024-05-14 08:49:23 -04:00
PhilRunninger
025b3b8c12 Update the minimum version number. 2024-04-01 18:09:24 -04:00
PhilRunninger
5033b753ff Make the obsolescence message work in and older version of node. 2024-04-01 18:06:23 -04:00
PhilRunninger
44dd489377 Use streamlined code to get pivot table key fields.
This allows me to get rid of unnecessary (and duplicated) code.
2024-04-01 17:54:09 -04:00
PhilRunninger
5b1333b8c1 Add file location of current workbook to obselescence message.
This is to help the user know where a functioning workbook (the one
they're currently in) needs to be located to continue working.
2024-04-01 17:52:02 -04:00
PhilRunninger
2df666a44f Allow getting the list of changes for director or segment pools. 2024-04-01 17:48:45 -04:00
PhilRunninger
2c46764be2 Updating the binary files recently changed. 2024-04-01 12:24:43 -04:00
PhilRunninger
1505221961 Limit who can use the Shipments sheet. 2024-04-01 12:24:14 -04:00
PhilRunninger
1cf13e4f57 Fix rounding of percent change. 2024-04-01 12:22:50 -04:00
PhilRunninger
ae6b21b197 Simplify parsing the (different) JSON sent to shift_ship_date.sql. 2024-04-01 12:07:30 -04:00
PhilRunninger
9933e66c77 Add code to do ship_date shifting. Workbook changes not finished yet. 2024-04-01 03:14:44 -04:00
PhilRunninger
22c2375f44 Add a mechanism to self-upgrade the workbook.
It's not completely seamless, but it should work adequately well. The
workbook (aka client) inserts the workbook version into the http request
body. The server code compares that version number against its minimum
supported client version.

If the client is too old, an error message is sent back to the client.

When the client receives the "Obsolete" error message, it launches the
https://<server>:<port>/template URL in the default browser, which
enables the user to save the downloaded new workbook file.
2024-03-22 18:33:04 -04:00
PhilRunninger
2454393a1d DRY up the WinHttpRequest calls. One sub now does it all.
Instead of having multiple locations with the same code, the web
interface code now lives in its own module, and is called from multiple
locations.
2024-03-20 17:21:08 -04:00
PhilRunninger
c7789f868c Fix the pscale adjustment factor when adding month data.
Two things were wrong with this code:
1. The exchange rate conversion was backward. Since we work in USD, I
   removed the conversion and used value_usd instead.
2. The calculation of pscale.factor was incorrect. If the old value is
   1000, and we need to get to 1020, the record to be inserted must have
   a value of 20, thus the value for factor needs to be:
   (1020 - 1000) / 1000  =  (1020 / 1000) - 1  =  0.02
   0.02 * 1000  =  20, which is inserted in the new record.

   The subtraction was missing before, which of course caused WAY wrong
   numbers that should have been caught a long time ago. It was doing:
   1020 / 1000  =  1.02
   1.02 * 1000 = 1020 was inserted, doubling the intended adjustment.
2024-03-19 16:24:04 -04:00
PhilRunninger
aa13911c02 Make the VBA handle pivot fields in the filters section.
Tread the PivotTable filters the same as the row headers, making them
part of the WHERE clause in the SQL statement.
2024-03-19 16:21:18 -04:00
PhilRunninger
4c1584af3d Restore the BASIS and BASELINE lists, removing "baseline" from them.
There were too many other locations that needed to be found and changed,
that it was easier to just do:
    update osm_pool set iter='plan' to iter='baseline'
and be done with it. I also informed Jim to make the same change in his
baseline creation scripts.
2024-03-18 21:24:28 -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
b73403aef7 Preselect the tag on the Month View sheet if there's only one. 2024-03-15 13:17:09 -04:00
PhilRunninger
b10a3ac655 Add a function to treat 1x1 ranges as an array, not a scalar value.
The Range.Value function does not consistently return a 2-D array. If
the range is a single cell, it returns just the value in that cell. When
initializing a Userform listbox, it needs to be an array, so this
function was born.
2024-03-15 10:09:56 -04:00
PhilRunninger
a821f15c32 Update DSM, Tags, Basis, and Baseline lists.
I got DSM list from ubm.rlarp.osm_pool, not CMSInterfaceIn.lgdat.CODE.
Made the list of Tags contain just "Volume".
Added "baseline" to the Basis and Baseline lists.
2024-03-15 10:06:57 -04:00
PhilRunninger
f70a733624 Not exactly sure what changes were made here. Bringing repo up to date.
VBA changes will be easier to track after the recent addition to the
repo of the exported code.
2024-03-13 09:04:25 -04:00
PhilRunninger
aabbf8210b Make SQL changes to advance to the next season. 2024-03-13 09:03:16 -04:00
PhilRunninger
337f5425e2 Save the exported VBA code in the repo. This is its initial commit. 2024-03-13 08:55:39 -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
cc7726758b Show more of the response in the journal. 2024-03-13 08:45:21 -04:00
PhilRunninger
e87c0ecc62 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'
2023-09-12 20:54:24 -04:00
PhilRunninger
3fa2cb07f5 Batch error messages and identify period to which they apply.
This happens on the Monthly view, and it's possible to get multiple
error messages, even among other successful month adjustments. There was
no way of knowing which month was the offending one or if any had
succeeded when an error was shown.

This change collects all the error messages into one message with the
period so that it's more intuitive and less obtrusive.
2023-08-31 17:07:58 -04:00
PhilRunninger
7bd8cc2674 If no history, hide form before showing message. 2023-08-31 17:07:17 -04:00