# Features — sagegs1xml (BSBC Invoice Export)

Evidence date: 2026-10-04. Source: `git@bitbucket.org:overdrive/sagegs1xml.git`, `master` at `fc601bb`.

There is one commit, so this file cannot show a feature history. "Current" means present and reachable in that tree. Nothing in the repository is labelled planned, deprecated, or removed.

## Current features

These run when an operator uses the form as written in `frmMain.vb`.

| Feature | What the operator gets | Evidence | Provenance |
|---|---|---|---|
| Invoice export for a date range | PROCESS reads `SUN_GETINVOICES` for the two dates and writes one CSV per row | `frmMain.vb` `cmdProcess_Click` | **Implemented** |
| Shoprite / Checkers route | `AccountLink` `5261` → `{XMLPath}\SHOPRITE\{Reference}.csv` and FTP `/ShopriteInvoices/` | same method, comment "5261 - Checkers" | **Implemented** |
| Pick n Pay route | `AccountLink` `6960` → `{XMLPath}\PNP\{Reference}.csv` and FTP `/Invoices/` | comment "6960 - PNP" | **Implemented** |
| Pipe-delimited detail file | 23 positional fields, trailing pipe per field, newline per detail row, extra `|` after the last row, no header line | loop `td.Rows(x)(0)` through `(22)` | **Implemented** |
| FTP upload and delete | Upload then delete the local CSV. Failed upload keeps the file | `FTPFile` | **Implemented** |
| Output folder picker | Settings, General, button `,,,`, persisted as `XMLPath`. Label text is "File Lcation:" | `Button1_Click`, `frmMain.Designer.vb` | **Implemented** |
| Block export when no folder is set | Critical message, no query | `cmdProcess_Click` | **Implemented** |
| SQL server name setting | Settings, SQL Settings, server text box and SAVE. Applied to the connection on next startup if non-empty | `cmdSaveSQL_Click`, `frmMain_Load` | **Implemented** |
| Status log | Timestamped coloured lines in `txtLog` | `Globals.Log` | **Implemented** |
| Date pickers default to today | Both set in `frmMain_Load` | `frmMain.vb` | **Implemented** |
| ClickOnce version in the title | When deployed via ClickOnce, title includes the deployment version and the fixed text "(25 June 2018)" | `frmMain_Load` | **Implemented** |
| Helpdesk text | "Helpdesk: 0861 XPROCURE or 0861 977-628" on Main and Settings | `Label13`, `Label14` | **Implemented** |
| FTP password masking on the settings box | `edtFTPPassword.PasswordChar` is `*` | `frmMain.Designer.vb` | **Implemented**. PROCESS does not use this box |
| ClickOnce install metadata | Web install, desktop shortcut, update check before startup, product Sage2XML, publisher Sungula, version `1.0.0.44` | `Sage2GS1Xml.vbproj`, `bin\Debug\Sage2GS1Xml.application` | **Implemented** as publish configuration |

## Present in the tree, not used by PROCESS

| Feature | Evidence | Provenance |
|---|---|---|
| GS1 / EAN.UCC SOAP invoice builder `SUN_SAGE2XML` | `Sage2GS1Xml/SUN_SAGE2XML.sql`, also copied to `bin\Debug`. Returns column `XML_DATA`. No `EXEC` of this name in VB | **Implemented** script. Not called by the application |
| Copy SQL script to the output directory | `vbproj` content item `CopyToOutputDirectory` Always | **Implemented** |
| User settings `XMLUsername`, `XMLPassword`, `SQLUsername`, `SQLPassword`, `FTPServer`, `FTPUsername`, `FTPPassword` | `Settings.settings`, `App.config` | **Implemented** as stored fields. PROCESS does not read them for the SQL or FTP calls |
| `Pastel.Evolution` assembly reference | `vbproj` hint path outside the repo. No `Imports` or type use under `Sage2GS1Xml\*.vb` | **Implemented** reference. Unused by source that is in Git |
| Committed Debug executable, pdb, vshost, and ClickOnce manifest | `Sage2GS1Xml/bin/Debug/` | **Implemented** as files in Git. Not a separate product feature |
| Team Foundation Server collection URL | `Sage2GS1Xml.sln` | **Implemented** historical metadata |

## Controls that are on the form but do not perform the labelled job

| Control | Label or name | What the code does | Provenance |
|---|---|---|---|
| `chkUploadOnly` | "Upload Only" | When checked, PROCESS takes the branch that only shows "A SQL request is still open..." | **Implemented**. Upload-only is not implemented |
| `pbProgress` | progress bar on Main | Created and placed. No assignment in `frmMain.vb` | **Implemented** as a static control |
| `XMLBUFFER` | hidden rich text box | `Visible = False`. No writer | **Implemented** |
| `cmdSaveXML`, `edtXMLUsername`, `edtXMLPassword`, `GroupBox1` | declared on the form class | Not constructed in `InitializeComponent` (no `New` for those names). `cmdSaveXML_Click` has no `Handles` clause. The method would save `XMLUsername` and `XMLPassword` if something called it | **Implemented** as dead code |

## Not in the repository

| Expected kind of feature | Evidence | Provenance |
|---|---|---|
| README or user guide | No `.md` or `.txt` in the commit | **Implemented** absence |
| Automated tests | Solution contains one VB project | **Implemented** absence |
| CI pipeline | No pipeline YAML | **Implemented** absence |
| Scheduler or Windows service | `OutputType` is `WinExe` | **Implemented** absence |
| In-app login or roles | No auth UI. `MyApplication` uses `AuthenticationMode.Windows` only as the VB application base constructor | **Implemented** |
| Definitions of `SUN_GETINVOICES` and `SUN_GETINVOICEDETAILS` | Called from `frmMain.vb`, not defined in `SUN_SAGE2XML.sql` | **Unknown** — they must exist on the server the operator uses. They are not in Git |
| Sonar project files named by the onboarding issue | Not in `fc601bb` | **Unknown** |

## Planned

No TODO, roadmap, or issue in the repository describes future work. Unfinished controls (Upload Only, hidden XML buffer, unwired XML credential fields) are incomplete implementation, not a written plan.

Provenance: **Unknown** whether anyone still intends to finish them.

## Completed versus in development

Git does not show in-progress work. The only commit is a full import that already contains a ClickOnce revision of 44 and a built `exe`. Relative to Git, the imported application is a completed snapshot. Relative to the form, Upload Only and the XML credential UI are unfinished.

Provenance: **Implemented** for the snapshot. **Inferred** for "unfinished" (controls exist without a working path).

## Changed or removed

No second commit exists, so no feature can be marked removed or recently changed inside this repository.

The coexistence of a GS1 XML procedure and a CSV exporter is a product discrepancy, not a documented migration. Whether XML was retired before the import is **Unknown / Requires Confirmation**.

## Human confirmation

- Is the CSV export the feature operators still use?
- Was `SUN_SAGE2XML` retired, or is it still deployed beside this executable?
- Is Upload Only supposed to resend files already in the Shoprite and PNP folders?
- Are the hidden XML buffer and the unwired XML username/password leftovers from the GS1 path?
