Commit Graph

29 Commits

Author SHA1 Message Date
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
28c14ece67 include plan and diff ase baseline iterations 2021-07-16 09:40:34 -04:00
66b74e31cb update all routes to round to 2 decimals for units, value, and cost 2021-04-19 09:20:52 -04:00
Trowbridge
df02a31000 the module is stored as key type in the json 2020-02-25 15:08:01 -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
Trowbridge
e49c051383 clean-up minor errors, running now 2020-02-13 13:08:02 -05:00
Trowbridge
f83746b892 swap out returning columns 2020-02-13 12:48:51 -05:00
Trowbridge
fb7fdc7959 swap out columns on price adjust 2020-02-13 12:47:25 -05:00
Trowbridge
5e4690a1f4 swap out value fields 2020-02-13 12:47:01 -05:00
Paul Trowbridge
ef914f3d5e insert to log and swap out columns on volume scale 2020-02-13 12:26:13 -05:00
Trowbridge
994b076321 swap out fb_qty or units 2020-02-13 12:21:30 -05:00
Trowbridge
610c78f36f swap out basemix columns 2020-02-13 12:19:45 -05:00
Paul Trowbridge
04276a89cb swap out iterdef with module, and point to osm_pool 2020-02-13 12:18:32 -05:00
Paul Trowbridge
bf03eff862 vupd was scaling from scratch instead of just cleaning up the volume increase to match the dollar target 2019-04-04 12:19:40 -05:00
Paul Trowbridge
22841d3671 fix issue with price adjustment 2019-04-03 14:07:49 -05:00
Paul Trowbridge
d3332cc778 include promo code in base mix 2019-04-03 12:17:54 -04:00
fleetside72
833ec511c1 handle price change on no base sales 2019-04-03 03:00:38 -04:00
Trowbridge
b05d68f8ec dont sum up diext and discounts 2019-03-20 01:31:51 -04:00
Paul Trowbridge
4ba6aaa2d0 adjust scale_vp route to create 2 iteration for v and p respectively 2019-03-14 12:08:37 -04:00
Paul Trowbridge
932c95e83c dont use iterdet anymore since not in osm. iter = source + behavior 2019-03-14 10:47:29 -04:00
Paul Trowbridge
0e3bc60dd7 update volume and price, as well as description on other routes 2019-03-13 23:32:12 -04:00
Paul Trowbridge
34b53e8eef add route to modify price and volume at the same time 2019-03-13 09:44:41 -04:00