commit: 2025-03-19 17:19:13

This commit is contained in:
Paul Trowbridge 2025-03-19 17:19:13 -04:00
parent 6b76d9d935
commit f2f4dcedae
5 changed files with 13 additions and 1 deletions

View File

@ -716,3 +716,8 @@ UPDATE rlarp.osmf SET iter = 'short ship' WHERE calc_status = 'CLOSED' AND flag
---identify goofy ship dates: causes disconnect with sales when splicing in a forecast that has this problem------------------- ---identify goofy ship dates: causes disconnect with sales when splicing in a forecast that has this problem-------------------
UPDATE rlarp.osmf SET iter = 'bad date' WHERE sdate < odate; UPDATE rlarp.osmf SET iter = 'bad date' WHERE sdate < odate;
--flag budget orders that are planned to book before the budget
UPDATE rlarp.osmf SET iter = 'py carryover' WHERE iter = 'copy' AND odate <= '2025-06-01';
--flag past due orders that are dropping out in shipments on current date

5
build/dump_all.pg.slq Normal file
View File

@ -0,0 +1,5 @@
SELECT
o.*
,o.lbs * o.fb_qty ext_lbs
FROM
rlarp.osmf o

0
build/dump_all.pg.sql Normal file
View File

View File

@ -5,6 +5,7 @@ SELECT
to_char(CASE WHEN extract(month FROM o.sdate) >= 6 THEN -5 ELSE 7 END + extract(month FROM o.sdate),'FM00')||' - '||to_char(o.sdate,'TMMon') ship_month, to_char(CASE WHEN extract(month FROM o.sdate) >= 6 THEN -5 ELSE 7 END + extract(month FROM o.sdate),'FM00')||' - '||to_char(o.sdate,'TMMon') ship_month,
version, version,
iter, iter,
calc_status,
sum(fb_val_loc * r_rate) value_loc sum(fb_val_loc * r_rate) value_loc
FROM FROM
rlarp.osmf o rlarp.osmf o
@ -17,7 +18,8 @@ GROUP BY
sseas, sseas,
to_char(CASE WHEN extract(month FROM o.sdate) >= 6 THEN -5 ELSE 7 END + extract(month FROM o.sdate),'FM00')||' - '||to_char(o.sdate,'TMMon'), to_char(CASE WHEN extract(month FROM o.sdate) >= 6 THEN -5 ELSE 7 END + extract(month FROM o.sdate),'FM00')||' - '||to_char(o.sdate,'TMMon'),
version, version,
iter iter,
calc_status
ORDER BY ORDER BY
oseas asc, oseas asc,
order_month asc order_month asc

View File