diff --git a/build/build_forecast.sql b/build/build_forecast.sql index 8c5cbb6..7013588 100644 --- a/build/build_forecast.sql +++ b/build/build_forecast.sql @@ -145,9 +145,9 @@ gld AS ( WHERE ( --base period orders booked.... - o.odate BETWEEN '2020-06-01' AND '2021-04-04' + o.odate BETWEEN '2020-06-01' AND '2021-04-11' --...or any open orders currently booked before cutoff.... - OR (o.calc_status IN ('OPEN','BACKORDER') and o.odate < '2021-04-04') + OR (o.calc_status IN ('OPEN','BACKORDER') and o.odate < '2021-04-11') --...or anything that shipped in that period OR o.fspr BETWEEN '2101' AND '2110' ) @@ -294,7 +294,7 @@ gld AS ( LEFT OUTER JOIN gld ss ON greatest(least(o.sdate,gld.edat),gld.sdat) + interval '1 year' BETWEEN ss.sdat AND ss.edat WHERE - o.odate BETWEEN '2020-04-05' AND '2020-05-31' + o.odate BETWEEN '2020-04-12' AND '2020-05-31' AND fs_line = '41010' AND calc_status <> 'CANCELED' ------exclude actuals for now and use forecast to get the plug for the rest of the year diff --git a/build/rebuild_forecast.sh b/build/rebuild_forecast.sh index a489a3e..16fbcd7 100644 --- a/build/rebuild_forecast.sh +++ b/build/rebuild_forecast.sh @@ -2,7 +2,7 @@ $PG -f build_forecast.sql $PG -f snap_itemm.sql $PG -f snap_cost_current.sql $PG -f snap_customer.sql -$PG -f snap_fc.sql +$PG -f snap_fx.sql $PG -f build_pool.sql $PG -f convert_pool_all.sql $PG -c "CALL rlarp.osm_stack_refresh();"