Commit Graph

26 Commits

Author SHA1 Message Date
PhilRunninger
0d83f19e33 Fix percent change calculation for price adjustment.
I shouldn't be coding on zero hours sleep!
2023-05-17 10:04: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
PhilRunninger
480adef789 Update some 2022 references to 2024, and fix round() function calls. 2023-04-05 12:37:35 -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
551a4867d6 increment route fiscal years 2021-04-05 19:22:20 +00: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
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
pt
ff3e18edc7 add sort to month name 2020-02-16 22:23:38 -05:00
pt
e7ce48405b increment year 2020-02-15 03:26:04 -05:00
pt
c602564cb7 couple minor issues 2020-02-15 02:55:33 -05:00
pt
a83708a7ca overhaul month_vp 2020-02-15 01:03:45 -05:00
Paul Trowbridge
7008f57f66 make sure days are between 1 and 28 2019-04-16 13:26:39 +00:00
Paul Trowbridge
d3332cc778 include promo code in base mix 2019-04-03 12:17:54 -04:00
fleetside72
752e65de05 rework addmonth routes to accomodate -0- in the base 2019-04-03 04:27:57 -04:00
Trowbridge
b05d68f8ec dont sum up diext and discounts 2019-03-20 01:31:51 -04:00
Paul Trowbridge
c536dee56d break out add-month volume and price impact 2019-03-14 11:59:35 -04:00
Paul Trowbridge
932c95e83c dont use iterdet anymore since not in osm. iter = source + behavior 2019-03-14 10:47:29 -04:00
Trowbridge
0ce9056d7c fix up volume and price 2019-03-13 13:53:19 -04:00
Paul Trowbridge
284a4abffc label console messaging 2019-03-12 17:45:35 -04:00
Paul Trowbridge
1b7f8c4f50 add monthly volume and price combo edit 2019-03-12 17:40:20 -04:00