# Features — superbowl_cronjob

Evidence date: 2026-10-02. Revision: `master` `986893e` (2026-09-11).

No feature list exists in the source repository. Status below is from `frmCronjob.vb`, the process classes, `app.config`, `Scripts/`, and git history.

## Current features

| Feature | Status | Where |
|---|---|---|
| One-shot WinForms runner | Current | `frmCronjob_Load`: auto-run and close when `Debug` is false |
| Manual Run button | Current when `Debug` is true | `btnRun_Click`. Committed setting is `True` |
| 40 minute run cap | Current | `intOpperationTimeMax` |
| Repsly purchase-order import with LastID cursor | Current | `RepslyOrder_AM_Process`, `RepslyApiClient` |
| Upsert by `PurchaseOrderID` and replace line items | Current | `SaveOrder` |
| Promote `DocumentTypeName = FSR` into `fsrRequisition` | Current | `RepslyFSR_AM_Process` |
| Pink slip `RG` + 7-digit requisition id | Current | same class |
| Enqueue `FSR_NewRequisition` after promotion | Current | `INSERT INTO sysCronJob` in that class |
| Post non-FSR orders to Edward Snell | Current | `RepslyOrder_ESnell_Process`, `Augru` 279 |
| Post approved free-stock requisitions to Edward Snell | Current in code, **off** in committed config | `FsrOrder_ESnell_Process`, `FsrSapExportEnabled` |
| Delivery block `Z5` for free-stock delivery; `ZG` + `COLL` for collection | Current | `IdocGenerator.BuildFsrSoapXml`. Merge `986893e` |
| SAP retry count, last error, last SOAP payload on `fsrRequisition` | Current in code; columns come from a script the app does not run | `Scripts/AlterFsrRequisition_SapColumns.sql` |
| Failure mail when SAP retries are exhausted | Current when the gate is on | `SapFailureNotifyEmail` |
| `sysCronJob` drain | Current | `frmCronjob.Run` |
| Brand quantity forecast job | Current | `Case "BrandQF"`, `QFGen.GenerateBrand` |
| Product-code archive job | Current | `Case "ArchiveProduct"` |
| Free-stock new and approved emails with PDF | Current | `FSR_NewRequisition`, `FSR_RequisitionApproved` |
| Purchase-order email chain and Sage CSV | Current | `POR_1*` through `POR_3Receipted`, `Export_Process` |
| Vendor application email chain and activation mail | Current | `POR_NewVendor` through `POR_Activate`, `vendorDone.rdlc` |
| Noon reminders for aged Pending FSR and POR | Current if a run falls in 12:00–12:19 | `PreProcess` |
| Noon vendor Pending reminder | Present in code; SQL is missing a space before `WHERE` | `ProcessPendingVendors` |
| File log listener plus `stgSuperbowlLog` | Current | `app.config` `FileLog`; `ProjectFunctions.WriteLog` |
| Release UNC paths on Hennessy and Ruinart | Current in the `#Else` compile branch | `frmCronjob_Load` |

## Completed (landed, still on the run path)

Treated as completed history rather than a separate product mode. All of these still execute at `986893e` unless noted.

| Feature | When | Evidence |
|---|---|---|
| Initial cron host, PO completion mail | 2021-02-10 | `3022d91`, `fa35ee9` |
| Vendor application jobs and resend mail | 2022-02 | `06a39c8`, `2116185`, `f12ad97`, `3c12f67` |
| Vendor report | 2022-04-29 | `1e7dafe` |
| Vendor notification change | 2023-05-29 | `ce672a6` |
| Repsly order sync and ESnell content type | 2026-03-04 to 2026-03-16 | `b3aa617`, `3e2fb98` |
| Material number without trailing S/F; order reason 279 | 2026-03-18 to 2026-03-20 | `fbdf69c`, `3ca2689` |
| Rep name and email on the IDOC, then rep name removed from one path | 2026-03-31 to 2026-04-01 | `fc1fbe0`, `ea32d27` |
| Repsly FSR promotion and bill-to mapping | 2026-04-17 to 2026-04-22 | `4f5159b` through `cea5d0b` |
| RGBC free-stock SAP integration and SOAP audit | 2026-07-14 to 2026-08-24 | `249f985`, `afc0754`, `a09b35b` |
| Free-stock delivery `Lifsk` `Z5` | 2026-09-11 | `bb5b170`, merged as `986893e` |

Older behaviour (2013–2019 free-stock and purchase-order processes) is described only in comments inside `frmCronjob.vb`. Those dates are before the first git commit (`3022d91`, 2021-02-10). Provenance: **Documented in comments**, code still present.

## Planned

| Item | Status | Evidence |
|---|---|---|
| Phase 1 test against Repsly Live | Marked `pending` in the plan | `.cursor/plans/repsly_order_integration_faa35b01.plan.md` |
| Phase 2 test against the ESnell QA endpoint | Marked `pending` in the plan | same file |
| Turn on free-stock SAP export after Augru 285 exists in SAP QA | Written as an operator step, not done in config | `Scripts/AlterFsrRequisition_SapColumns.sql`; `FsrSapExportEnabled` is `False` |

The plan's statement "no HTTP/SOAP APIs today" is obsolete. Those clients exist on `master`. Provenance: **Discrepancy** between the plan file and the code.

## In development

No branch is ahead of `master` with unmerged product work. `origin/feature/fsr-delivery-block-z5` matches the commit that pull request #4 merged.

## Recently changed

Relative to the 2023-05-29 revision the onboarding scan recorded (`ce672a6`):

- Repsly import, FSR promotion, and both Edward Snell exporters were added.
- File-share constants in the release compile branch name Hennessy and Ruinart (comment 2024-11-27). That comment's date has no matching git commit; the path strings are on `master` now.
- `FsrSapExportEnabled` and the `Z5` delivery block were added.

## Deprecated or removed from the run path

| Feature | Status | Where |
|---|---|---|
| CSV import of free-stock requisitions from the ADM share | Class remains. Nothing constructs `FreeStockRequisition_AM_Process` | `FreeStockRequisition_AM_Process.vb` |
| CSV import of purchase-order requisitions | Construction is commented out in `PreProcess` | `frmCronjob.vb` around the `proPOR` lines |
| Call-cycle changes | Committed then reverted | `86c37f7` reverted by `c4937c2` (2023-03-01) |
| Stagnant Approved / Completed vendor chasers | Commented out inside `ProcessPendingVendors` | templates 65 and 66 left in comments |
| SonarQube project file and `sonarqube_scan.bat` | Listed on the scan host. Not in git history | **Unknown** |

## Queue job catalogue

Implemented `Select Case` labels, which differ from some header comments:

`BrandQF`, `ArchiveProduct`, `FSR_NewRequisition`, `FSR_RequisitionApproved`, `POR_1NewRequisition`, `POR_2ApprovedRequisition`, `POR_3Receipted`, `POR_2DeclinedRequisition`, `POR_CompletedRequisition`, `POR_2CancelledRequisition`, `POR_NewVendor`, `POR_VendorDeclined`, `POR_ApprovedVendor`, `POR_VendorCompleted`, `POR_VendorInCompleted`, `POR_FinanceApproved`, `POR_VendorDone`, `POR_Activate`.

## Not a feature of this repository

- Superbowl web UI, approval screens, and login.
- Windows service or Task Scheduler XML.
- Bitbucket Pipelines or an automated test suite.
- A reader that applies `Scripts/*.sql` at startup.
