LedgerMatch — AR/GL Reconciliation
==================================

Quick start (no installation needed)
------------------------------------
1. Unzip this folder anywhere on your PC.
2. Double-click  "Launch LedgerMatch.bat"
   - If Windows SmartScreen shows a warning: click "More info" → "Run anyway".
   - A browser window opens at  http://127.0.0.1:8477
3. Drag the two sample files (from the  sample-data  folder) into the app:
   - ar.csv  → the AR card
   - gl.csv  → the GL card
4. The reconciliation runs automatically.

Everything runs locally in your browser — nothing is uploaded, no internet
needed. To stop: close the black PowerShell window. To remove: delete the
folder. Nothing is installed on the machine.


What you should see with the sample data (period JUL-26)
--------------------------------------------------------
- AR subledger total          1,185,539.80
- GL net on AR accounts         256,291.92
- Variance (AR − GL)            929,247.88
- AR exceptions                 0
- GL exceptions                 71 lines, (929,247.88)
- Control tie-out               0.00  ← variance fully explained by the
                                        converted opening balances
- AR aging                      1.12M not yet due / 48.8K current /
                                13.5K over one year

These figures reproduce the original Excel macro exactly (verified
cell-for-cell against the workbook, including its hand-marked match column).


Suggested test checklist
------------------------
[ ] Cockpit: control tie-out shows 0.00 and the bridge bars chain correctly
[ ] Click an account row in "Account reconciliation" → drill-through drawer
    opens with the exact AR and GL source lines behind that account
[ ] GL exceptions: 71 rows; click one → full detail drawer; change the
    Workflow dropdown on a few rows, refresh the page, reload the sample —
    the statuses survive (stored in this browser)
[ ] AR exceptions: shows the "all matched" clean state
[ ] Smart matching: 71 unkeyed journals, 0 proposals — the view explains why
    (converted opening balances have no AR twin; they are the variance)
[ ] Timing differences: 0 proposals on the sample (no AR exceptions to pair).
    Cutoffs propose only across adjacent months; Confirm tags without moving
    any figure — check the cockpit control before and after
[ ] Segments & aging: pivot by Company / Division / Cost center / Account /
    Intercompany — the "Ties to recon totals" chip stays green
[ ] Period compare: "Save current run", refresh, reload, save again, set a
    baseline — identical runs show 0 raised / 0 cleared
[ ] Templates: build a custom mapping — pick file columns on the left, click
    recon fields on the right (AR/GL tabs), then "Save & activate". The
    builder validates before saving and marks wrong mappings red
[ ] Export workbook → opens the 5-sheet reconciliation pack with the same
    layout and formatting as the macro (Recon Summary, AR Summary,
    GL Summary, AR Exceptions, GL Exceptions)
[ ] Audit pack (the recon's sign-off): type entity, WP ref, names, then
    "Print / PDF" — control figures carry [SL]/[TB]/[∑] tick-marks with
    a legend, and the workbook banner is stamped with the same identity
[ ] Materiality box in the top bar: enter e.g. 60000 and watch small
    variances get marked "Immaterial"
[ ] Re-run reconciliation from the top bar
[ ] User guide (rail footer "User guide ↗", also in this pack as
    LedgerMatch-User-Guide.html) — the full 14-section manual: loading
    files, every pre-flight check, working exceptions, smart matching,
    segments, period compare, templates, export, and troubleshooting


Upgrading to a newer version
----------------------------
Your work (workflow statuses, saved projects, custom templates) lives in THIS
BROWSER, tied to the address 127.0.0.1:8477 - not to this folder. Upgrading
is safe and does not touch your data:

1. Close LedgerMatch: close the browser tab and the black PowerShell window.
2. Unzip the new version's zip. The folder inside carries the version in its
   name (e.g. LedgerMatch-0.1.3), so it will never mix with this one.
3. Open the new folder and double-click "Launch LedgerMatch.bat".
4. Everything you saved before is still there. Check it, then delete the
   old folder.

If anything looks stale after an upgrade, press Ctrl+F5 in the browser once.
The app version is shown at the bottom-right of the status bar.

Using your own data
-------------------
Export the same two reports from your ERP as CSV or XLSX and drop them in —
the column headers are detected automatically, any period works. The GL
file may be large; the app only reads the columns it needs. A non-standard
report layout? Map its columns once in "Templates" — no code changes needed.


Known limits of this build
--------------------------
- Workflow statuses and saved projects are stored in this browser only
  (IndexedDB) — clearing site data wipes them; they do not sync between
  machines.
- Smart matching only proposes candidates: the reconciliation itself matches
  on the exact account + transaction number + period key, and journals with
  no AR twin stay in exceptions.
- If your Excel locale formats months differently, tell us — the period
  label locale is configurable.
