# Features — forecast (RGBC Forecast Control)

Evidence date: 2026-10-14.

Source: `git@bitbucket.org:overdrive/forecast.git`, `master` at `6aac1d2` (2026-09-01).

Status labels: **Current** (code path exists and is wired), **Partial** (UI or class exists but the path does not finish the job), **Removed from the request path** (code remains, call is commented or compiled out), **Not present**.

No feature flag file exists. "Removed" below means the current `master` request path does not run it. Git history before `e13eb5e` (2023-01-23) is not in this clone, so earlier deletions cannot be listed from commits.

## Identity and shell

| Feature | Status | Evidence |
|---|---|---|
| RGBC Forecast Control title, logo, red heading | Current | `Index.aspx`, `Admin.Master`, `content/rgbc_logo.jpg` |
| Footer version `1.0.3` dated 4 April 2012, `[Dev]` or `[Live]` | Current as a label | `Admin.Master.vb`. Assembly version is `1.0.0.1` and was not kept in step |
| Horizontal menu: Home, Planning, Adjustments, Reports, Open Season, My Brands, Sandbox, Logout | Current | `Admin.Master` |
| Sandbox hidden unless `strUserGroup` is `Dev` | Current | `Admin.Master.vb` removes the item before Logout |
| Busy image while a page works | Current | `content/ajax-loader.gif`, `jsShowLoading` |
| Home "Forecast Report by Focus Brands" | Removed from the request path | `Home.aspx.vb` builds arguments for daily grouping 3 and does not call `getForecastReport` |
| Help page | Partial | `Help.aspx` is an empty content page |
| Planning help: demo spreadsheet and screenshot | Current | `HelpPlanning.aspx`, `content/Jack_2011_Planning_Demo.201010.xls`, `content/Planning_aspx.jpg` |
| `AdjustmentsComments.aspx` | Partial | Empty page. Notes go to `Comments.aspx` |

## Access

| Feature | Status | Evidence |
|---|---|---|
| Login button using the Windows identity | Current | `Index.aspx`, `LogginUser` |
| Active Directory message when the user row is missing | Current | `Index.aspx.vb` |
| Session expiry message `M=1` | Current | `Index.aspx.vb`, redirect from `Admin.Master.vb` |
| Usage log on successful login | Current | `INSERT INTO mstUsageLog` |
| View / edit / special flags | Current as session fields | `blnView`, `blnEdit`, `blnSpecial` |
| RSM brand and region limits | Current | `Adjustments.aspx.vb` |
| My Brands self-only list for non-special users | Current | `MyBrands.aspx.vb` |
| Password, 2FA, self-registration, user admin UI | Not present | No page collects a password or edits `mstUser` except `strRegion` |
| Debug auto-login as `SILICON\PJ` | Current in the debug compile only | `Admin.Master.vb` |

## Planning

| Feature | Status | Evidence |
|---|---|---|
| Plan a brand for a fiscal year after the current one | Current | `Planning.aspx.vb` |
| Block save for the current or past fiscal year | Current | Message "Can only generate Forecast for future Fiscals!" |
| Sales rhythm grids and growth percentages | Current | `getTotalSales`, `getYTDSales`, `LoadSalesRhythm` |
| Copy rhythm from another brand | Current | `ddlBrandCopy`, `LoadSalesRhythm` |
| Calculate / re-calculate plan totals from a target | Current | `setPlanning_RegionTotal`, `btnCalculate` |
| Save plan, replace adjustments, queue `BrandQF` | Current | `btnSave_Click` |
| Run `QFGen` inside the save request | Removed from the request path | Calls commented in `btnSave_Click` |
| One-hour confirmation dialog | Current as text | `Planning.aspx` `confirmSave`. The request only writes SQL and a job row |
| Planning limited to special users | Current | Redirect when `blnSpecial` is false |

## Adjustments

| Feature | Status | Evidence |
|---|---|---|
| Load planned/historic, stats, adjusted, and actual grids | Current | `Adjustments.aspx.vb` `LoadBrand` |
| Variance grids | Removed from the request path | `GetVarianceFullYear1` and `GetVarianceFullYear2` bindings are commented out |
| Save cell changes while an open season covers today | Current | `Save`, `mstOpenSeason` check |
| Lock the model outside the season | Current for the Save button | "Model Locked." Apply can still be enabled for special users |
| Apply button queues `BrandQF` | Current | `Apply` |
| Calculate Regions from a changed Global value and last-year contribution | Current | `RecalcRegions`. Disabled when group is `RSM` |
| Unapplied cells styled and left editable | Current | `colourDataRow` when applied is false |
| Lock cells before the current `yyyyMM` | Removed from the effective path | Condition includes `And False` (`Branding.vb`, comment 2015-05-29) |
| Excel export of the adjustment grid | Current | `Export` |
| Double-click notes dialog | Current | `jsViewComments` → `Comments.aspx`. Depends on `showModalDialog` |
| RSM sees only assigned brands and own region | Current | `ddlBrand_PreRender`, `ddlRegion_PreRender` |

## Quantity forecast generation

| Feature | Status | Evidence |
|---|---|---|
| Formula: group QF × customer share × product share | Current as class logic | `QFGenerator.vb` header comment and `Generate` |
| Write `dwfQF` (`dblBudget9l`, percentages) | Current inside `QFGen.Generate` | Setting `dwfQFTable` = `dwfQF` |
| Mark adjustment applied when rounded totals match | Current | `blnApplied` update |
| Update `stkProductPeriod.dblQF` | Current inside `Generate` and `UpdateSTK` | Comment history: inactive 2010-10-08, active 2011-06-28 |
| Copy brand / copy product QF | Current as methods | `CopyBrand`, `CopyProductQF`. Not called from Planning save |
| Cron insert and duplicate removal | Current | `ProjectFunctions.vb` |
| Worker that reads `sysCronJob` | Not present | No `SELECT` from `sysCronJob` in this repository |
| Sandbox generate for year 2012 brand 64 | Removed from the effective path | `zSandbox.aspx.vb` `If False` |
| Sandbox cross-tab test for brand 6 | Current if a Dev user clicks the button | `btnTestXtab_Click` calls `doQueryXTab` and does not render the result |

## Reports

| Feature | Status | Evidence |
|---|---|---|
| Forecast Report by brand, principal, brand manager, daily grouping, my brands | Current | `BrandReport.getForecastReport` |
| RSM Report with the same filters plus region | Current | `BrandReport.getRsmReport`. Active brands only |
| Forecast report includes inactive brands | Current | `WHERE 1=1` with no `blnActive` filter |
| Show decimals | Current | `chkDecimal` passed into `colourDataRow` |
| Export `.xls` | Current | `ReportConsole.aspx.vb` `blnExport_Click` |
| Open or run in a new window via query string | Current | `lbRun_Click`, `lbOpen_Click` |
| Financial year required before run | Current | `valFinYear`, `RunReport` |

## Administration data

| Feature | Status | Evidence |
|---|---|---|
| Open season for all brands (`refBrandID = 0`) | Current | `OpenSeason.aspx.vb` |
| Per-brand open season create | Not present in the UI | Comment: "hard coded for now". Grid can still display a non-zero brand from existing rows |
| Duplicate season rejection | Not present | Branch is `If False` |
| Delete a season | Current | `SqlDataSource` delete on `OpenSeasonID` |
| Assign brands to a user | Current | `MyBrands.aspx.vb` |
| Set a user's region (`mstUser.strRegion`) | Current | Same save |
| Maintain users, groups, brands, principals, products | Not present | Read from SQL only |

## Customer group change (2026-08-28)

| Feature | Status | Evidence |
|---|---|---|
| Roll up by `strRegionDesc2` | Removed from the request path | Replaced in `b4c83ce`. Old SQL remains in comments in `Branding.vb` and `QFGenerator.vb` |
| Sync `strGroupName` and `strRegionOrder` from `mstCustomer` | Current | `Branding.New`, comment dated 20260828 |
| Dropdowns use `strGroupName` | Current | `Adjustments.aspx`, `Planning.aspx`, `ReportConsole.aspx`, `MyBrands.aspx` |

## Security and operations changes (2026-02)

| Feature | Status | Evidence |
|---|---|---|
| Connection strings removed from committed `Web.config` | Current | Empty `<connectionStrings>`, empty SQL settings |
| `.env` at the parent of the web application, overridable by process environment | Current | `SecureConfig.LoadEnvFile` |
| `EnvConnectionStrings` expression for `SqlDataSource` | Current | `EnvConnectionStringsExpressionBuilder.vb` |
| `TestDbConnection.aspx` | Current | Added in `f95e71a`. Not linked from the menu |
| `.env` gitignore | Current | `.gitignore` ignores `.env` and `*.env`. `.env.example` is committed |
| SonarQube pipeline | Current | `bitbucket-pipelines.yml`, key `overdrive_forecast` |

## Settings that change behaviour

| Setting | Value in repo | Effect |
|---|---|---|
| `intDecimals` | `1` | Decimal display width in `colourDataRow` and recalc |
| `intColumnWidthDefault` | `56` | Grid column width |
| `intColumnWidthRegion` | `105` | Region column width |
| `dwfQFTable` | `dwfQF` | Fact table `QFGen` writes |
| Session timeout | `720` minutes | Login lifetime |
| `executionTimeout` | `43200` seconds | Request may run 12 hours |

Provenance: **Implemented** in `Web.config`.
