Cash Flow Prognose
Installatie- en gebruikershandleiding (Manager.forecast)
1. Wat doet dit programma
Cash Flow Prognose toont per periode hoeveel geld er binnenkomt en uitgaat:
- Bovenaan: openstaande verkoopfacturen, daarna openstaande inkoopfacturen.
- Daaronder: prognoses uit Manager.io.
- Onderaan: sub-totaal per periode en doorlopend banksaldo (prognose-saldo).
- Alles wordt alleen gelezen uit het
.manager-bestand. Er wordt nooit iets in Manager.io gewijzigd.
- Banksaldo en facturen komen live via de Manager.io API. Daarvoor moet Manager.io draaien.
2. Wat heb je nodig
- Python 3.9 of hoger. Op Windows bij installatie Add Python to PATH aanvinken.
- Browser: Chrome, Edge of Firefox.
- Manager.io draaiend op dezelfde computer (API op
http://127.0.0.1:55667).
- API-sleutel per bedrijf uit Manager.io (Instellingen). Zonder sleutel geen saldo en geen facturen.
3. Installeren
- Pak de ontvangen
Manager.forecast-*.zip uit naar de computer, zodat de map Manager.forecast ontstaat — bij voorkeur als C:\Manager\Manager.forecast (Windows) of ~/Manager/Manager.forecast (Linux). Windows: rechtsklik → Alles uitpakken. Daarna verder bij hoofdstuk 4 (snelkoppeling) en 5 (Setup).
- Meer is er niet: het programma is standalone (alleen
server_forecast.py, geen extra pakketten).
- De server vindt het
.manager-bestand zelf op de standaardlocaties (Documenten, AppData).
Staat je administratie ergens anders? Kopieer bedrijvenmap.example.txt naar bedrijvenmap.txt en zet er 1 volledig pad in, bijvoorbeeld C:\Data\Manager\Businesses of C:\Users\{naam}\AppData\Local\Manager (vervang {naam} door je Windows-gebruikersnaam). Let op: gebruik altijd C:\Users\... — “Gebruikers” is alleen de weergavenaam in de Verkenner, op de schijf bestaat alleen C:\Users. Kopieer je een pad uit de Verkenner (bv. C:\Gebruikers\HuibKuiper\Documenten\...), vervang dan Gebruikers door Users en Documenten door Documents. Twijfel? Open cmd en typ echo %USERPROFILE%. Op Windows staat de data meestal onder %LOCALAPPDATA%\Manager (plak dit in de adresbalk van de Verkenner en zoek de map met .manager-bestanden). Werkt meteen, zonder herstart. Onder de tabel staat altijd uit welke map wordt gelezen.
4. Starten en stoppen
Windows: dubbelklik start-forecast.bat (met controle en melding; opent ook http://127.0.0.1:4451) of start-forecast.vbs (stil, zonder browser).
Linux / Mac: ./start-forecast.sh (opent ook de pagina als dat kan)
Stoppen: stop-forecast.bat / .vbs of ./stop-forecast.sh.
Alles tegelijk stoppen (eigen beheer, zit bij Manager.licence en wordt niet meegeleverd): stop-alles-manager.bat / .vbs of ./stop-alles-manager.sh.
Openen: http://127.0.0.1:4451
Snelkoppeling op het Bureaublad: draai één keer in deze map maak-snelkoppeling-in-map.bat (Windows, map C:\Manager\Manager.forecast) of bash maak-snelkoppeling-in-map.sh (Linux, map ~/Manager/Manager.forecast). Er ontstaan snelkoppelingen ín de map — kopieer die zelf naar het Bureaublad. Linux: daarna per bestand rechtsklik → “Toestaan en starten”. Details: LEESMIJ-snelkoppeling.txt.
Sluit het startvenster niet te snel: het meldt of de server echt luistert op poort 4451 (of “draait al”). Alleen bij een fout blijft het venster met uitleg open.
5. Setup — API-sleutel (eenmalig per bedrijf)
- Klik op Setup bovenaan.
- Je ziet alle gevonden bedrijven, met ✓ als de sleutel er is.
- Plak per bedrijf de sleutel en klik Opslaan.
De sleutels staan in het bestand .env naast de server (1 regel per bedrijf: Bedrijfsnaam=sleutel). Dit bestand is alleen-leesbaar voor jouw account. Er wordt geen api_keys.json meer gebruikt; een oude api_keys.json wordt eenmalig automatisch meegelezen.
Zie je een bedrijf niet? Dan staat het .manager-bestand niet in de gezochte map — zie hoofdstuk 3 (bedrijvenmap).
6. Normaal gebruik
- Bedrijf: dropdown bovenaan. Alleen bedrijven met API-sleutel staan erin.
- Periode: 1 week (13 kolommen), 2 weken (12), 1 maand (12), 1 kwartaal (8), 1 jaar (10).
- Kolomkoppen: week toont weeknummer + datum (
W37 08-09), 2 weken toont beide weeknummers (W37-38 08-09), maand toont Mrt 26, kwartaal Q1 26, jaar 2026.
- Omschrijving: alles staat op 1 regel: naam + interval/due + bedrag.
- Scrollen: alleen de tabel scrolt. De kopregel blijft bovenaan vast, sub-totaal en prognose-saldo blijven onderaan vast.
- Rekening + Bank saldo totaal: kies 1 rekening of alle samen. Live totaal of handmatig invullen (
1 234,56).
- Update: prognoses + saldo samen verversen.
- Print / CSV: afdrukken op A3 liggend (met titel en datum) of downloaden voor Excel (puntkomma).
- +/− per rij: klik op het teken voor de omschrijving om inkomst/kost om te zetten. Wordt in de browser onthouden.
- Taal: knop 🌐 English / 🌐 Nederlands naast Setup schakelt het scherm tussen Nederlands en Engels.
7. Problemen oplossen
| Probleem | Oplossing |
| Startvenster flitst weg | Gebruik start-forecast.bat (toont het resultaat 4 seconden). Alleen bij een fout blijft het open staan. |
| “Python niet gevonden” | Python 3.9+ installeren en Add Python to PATH aanvinken. |
| “Server niet bereikbaar” | Poort 4451 bezet (eerst stoppen), geen schrijfrechten in de map, of Python-fout — toon details met python server_forecast.py. |
| Dropdown is leeg | Nog geen sleutels: open Setup en plak per bedrijf de sleutel. |
| Geen API-sleutel / http-401 | Sleutel ontbreekt of is verlopen — via Setup een nieuwe plakken. |
| NO LICENCE (rood) / knoppen uit | Geen geldige licentie — vraag een code aan in Manager.licence (programma Manager.forecast) en plak hem bij Setup. |
| Aantal prognoses verschilt per computer | Elke computer heeft zijn eigen .manager-bestand. Verschil = verschil in data. |
| Nieuwe prognose niet zichtbaar | Sluit in Manager.io de administratie en open hem opnieuw, klik daarna op Update. |
| Verkeerd bedrijf / verkeerde map | Kijk naar de bronregel onder de tabel welke map wordt gelezen; gebruik zo nodig bedrijvenmap.txt. |
| Fout melden / support | Stuur server_forecast.log mee. Daarin staan de startcontrole en foutmeldingen, maar geen API-sleutels of licentiecode. Controleer wel of de bedrijfsnaam of het pad erin staat die je liever niet deelt. |
8. Bestanden
| Bestand | Waarvoor |
server_forecast.py | Hoofdprogramma: pagina + API + DB-lezer. |
start-forecast.bat / .sh / .vbs | Starten. |
stop-forecast.bat / .sh / .vbs | Stoppen. |
install-manager-forecast.bat + Custom-Button-Manager.forecast.html | Optioneel (Windows): knop in Manager.io om forecast te starten en stoppen. |
maak-snelkoppeling-in-map.bat / .sh | Maakt snelkoppelingen ín de map (met pictogram); zelf naar het Bureaublad kopiëren. |
LEESMIJ-snelkoppeling.txt | Stappen voor Bureaublad-snelkoppeling (Windows + Linux). |
forecast.ico / forecast-256.png | Pictogram voor de snelkoppeling (Windows / Linux). |
lockup-blue.png | Logo rechtsboven op de pagina en in de print. |
handleiding.html | Deze handleiding (Nederlands + Engels). |
LEESMIJ.html / LEESMIJ.txt | Korte startpagina (HTML) + korte verwijzing (tekst) naar deze handleiding. |
.env | API-sleutels + licentie-code LICENCE_CODE (wordt aangemaakt bij Setup, nooit delen). |
.env.example | Voorbeeldformaat. |
bedrijvenmap.example.txt | Voorbeeld voor eigen bedrijvenmap. |
server_forecast.log | Startcontrole en foutmeldingen; handig bij support (zie §7). |
9. Veiligheid
- Alleen lokaal: luistert op
127.0.0.1:4451.
.env heeft beperkte rechten en staat nooit in logs.
- Diagnose-endpoints (
/api/debug, /api/debug-db) zijn in de release verwijderd; over zijn alleen /api/status, /api/businesses, /api/forecasts, /api/invoices, /api/saldo, /api/save-key, /api/licence en /api/save-licence.
- Antwoorden hebben security-headers (
nosniff, geen frames, geen referrer).
- Bij elke start doet de server een zelfcheck (DB leesbaar + aantal prognoses,
.env-rechten) in de console en server_forecast.log (roteert bij 100KB). Bij een fout kan de klant dit logbestand opsturen; er staan geen API-sleutels of licentiecode in, maar wel de bestandsnaam van de administratie en mappaden.
- De lokale API accepteert alleen verzoeken van deze computer (Host-check) en POST's alleen vanaf een lokaal adres; externe websites kunnen geen gegevens lezen of sleutels wijzigen.
- OneDrive-waarschuwing: staat deze map in een gesynchroniseerde map (OneDrive/Dropbox), dan gaat
.env mee naar de cloud. Zet de map liever buiten sync, of accepteer dit bewust.
- Licentie-code wordt eerst gecontroleerd (handtekening + juiste programma) en pas dan opgeslagen; de code wordt nooit teruggetoond.
10. Licentie (Manager.licence)
- Onderste regel (ook op print): toont
Licentie: bedrijf · e-mail · programma (geldig tot …), of rood NO LICENCE als er geen geldige licentie is.
- Zonder licentie: kijken mag (bedrijven, prognoses, saldo), maar Print, CSV en Update zijn uitgeschakeld.
- Invoeren: vraag een code aan (programma
Manager.forecast), plak hem in Setup bij Licentie-code en klik Opslaan. De code wordt online gecontroleerd via https://add-ons.online/api/verify en staat daarna als LICENCE_CODE in gewone .env.
- Offline (geen internet): na één geslaagde online controle werkt dezelfde code nog 30 dagen zonder internet (schuivend venster; elke geslaagde check zet 30 dagen opnieuw op nul). Daarna blokkeert het programma tot je op Opnieuw controleren klikt met internet. Expliciet afgekeurde codes (verkeerde handtekening, verlopen, ingetrokken) werken nooit — ook niet offline.
- Let op: hiervoor wordt de systeemdatum van deze computer vertrouwd. Staat de klok verkeerd, dan kan een verlopen code tijdelijk lijken te werken of een geldige juist blokkeren — houd de klok automatisch gesynchroniseerd.
Cash Flow Forecast
Installation and user manual (Manager.forecast)
1. What this program does
Cash Flow Forecast shows, per period, how much money comes in and goes out:
- At the top: outstanding sales invoices, then outstanding purchase invoices.
- Below: forecasts from Manager.io.
- At the bottom: sub-total per period and running bank balance (forecast balance).
- Everything is read-only from the
.manager file. Nothing in Manager.io is ever changed.
- Bank balance and invoices come live via the Manager.io API. Manager.io must be running for that.
2. Requirements
- Python 3.9 or higher. On Windows, tick Add Python to PATH during installation.
- Browser: Chrome, Edge or Firefox.
- Manager.io running on the same computer (API at
http://127.0.0.1:55667).
- API key per company from Manager.io (Settings). Without a key there is no balance and no invoices.
3. Installation
- Unpack the received
Manager.forecast-*.zip on the computer, so the folder Manager.forecast appears — preferably as C:\Manager\Manager.forecast (Windows) or ~/Manager/Manager.forecast (Linux). Windows: right-click → Extract All. Then continue at chapter 4 (shortcut) and 5 (Setup).
- That is all: the program is standalone (only
server_forecast.py, no extra packages).
- The server finds the
.manager file itself in the standard locations (Documents, AppData).
Administration stored elsewhere? Copy bedrijvenmap.example.txt to bedrijvenmap.txt and put 1 full path in it, e.g. C:\Data\Manager\Businesses or C:\Users\{name}\AppData\Local\Manager (replace {name} with your Windows user name). Note: always use C:\Users\... — “Gebruikers” is only the display name in Explorer on Dutch Windows; on disk only C:\Users exists. If you copy a path from Explorer (e.g. C:\Gebruikers\HuibKuiper\Documenten\...), replace Gebruikers with Users and Documenten with Documents. Unsure? Open cmd and type echo %USERPROFILE%. On Windows the data is usually under %LOCALAPPDATA%\Manager (paste this in the Explorer address bar and find the folder with .manager files). Takes effect immediately, no restart needed. The source line below the grid always shows which folder is read.
4. Starting and stopping
Windows: double-click start-forecast.bat (with check and message; also opens http://127.0.0.1:4451) or start-forecast.vbs (silent, no browser).
Linux / Mac: ./start-forecast.sh (also opens the page when possible)
Stopping: stop-forecast.bat / .vbs or ./stop-forecast.sh.
Stop everything at once (internal use, kept with Manager.licence and not shipped): stop-alles-manager.bat / .vbs or ./stop-alles-manager.sh.
Open: http://127.0.0.1:4451
Desktop shortcut: run once in this folder maak-snelkoppeling-in-map.bat (Windows, folder C:\Manager\Manager.forecast) or bash maak-snelkoppeling-in-map.sh (Linux, folder ~/Manager/Manager.forecast). Shortcuts are created inside the folder — copy them to the Desktop yourself. Linux: then right-click each → “Allow launching”. Details: LEESMIJ-snelkoppeling.txt.
Give the start window a moment: it reports whether the server really listens on port 4451 (or is “already running”). It only stays open on error.
5. Setup — API key (once per company)
- Click Setup at the top.
- You see all found companies, with ✓ where the key is present.
- Paste the key per company and click Save.
Keys are stored in the .env file next to the server (1 line per company: CompanyName=key). This file is readable only by your account. No api_keys.json is used anymore; an old api_keys.json is read once automatically for migration.
Company missing? Then its .manager file is not in a searched folder — see chapter 3 (business folder).
6. Daily use
- Company: dropdown at the top. Only companies with an API key are listed.
- Period: 1 week (13 columns), 2 weeks (12), 1 month (12), 1 quarter (8), 1 year (10).
- Column headers: week shows week number + date (
W37 08-09), 2 weeks shows both week numbers (W37-38 08-09), month shows Mar 26, quarter Q1 26, year 2026.
- Description: everything on 1 line: name + interval/due + amount.
- Scrolling: only the table scrolls. The header row stays fixed at the top, sub-total and forecast balance stay fixed at the bottom.
- Account + Bank total: pick 1 account or all together. Live total or enter manually (
1,234.56 in English mode).
- Update: refresh forecasts + balance together.
- Print / CSV: print on A3 landscape (with title and date) or download for Excel (semicolon-separated).
- +/− per row: click the sign before the description to flip income/cost. Remembered in the browser.
- Language: the 🌐 English / 🌐 Nederlands button next to Setup switches the screen between English and Dutch.
7. Troubleshooting
| Problem | Solution |
| Start window flashes away | Use start-forecast.bat (shows the result for 4 seconds). It only stays open on error. |
| “Python not found” | Install Python 3.9+ and tick Add Python to PATH. |
| “Server unreachable” | Port 4451 busy (stop first), no write rights in the folder, or a Python error — show details with python server_forecast.py. |
| Dropdown is empty | No keys yet: open Setup and paste the key per company. |
| No API key / http-401 | Key missing or expired — paste a new one via Setup. |
| NO LICENCE (red) / buttons off | No valid licence — request a code in Manager.licence (program Manager.forecast) and paste it in Setup. |
| Forecast count differs per computer | Each computer has its own .manager file. Difference = difference in data. |
| New forecast not visible | Close and reopen the business in Manager.io, then click Update. |
| Wrong company / folder | Check the source line below the grid for the folder being read; use bedrijvenmap.txt if needed. |
| Report a problem / support | Send server_forecast.log. It contains the startup check and error messages, but no API keys or licence code. Check whether it contains a company name or path you prefer not to share. |
8. Files
| File | Purpose |
server_forecast.py | Main program: page + API + DB reader. |
start-forecast.bat / .sh / .vbs | Starting. |
stop-forecast.bat / .sh / .vbs | Stopping. |
install-manager-forecast.bat + Custom-Button-Manager.forecast.html | Optional (Windows): button in Manager.io to start and stop forecast. |
maak-snelkoppeling-in-map.bat / .sh | Create shortcuts inside the folder (with icon); copy them to the Desktop yourself. |
LEESMIJ-snelkoppeling.txt | Desktop-shortcut steps (Windows + Linux). |
forecast.ico / forecast-256.png | Shortcut icon (Windows / Linux). |
lockup-blue.png | Logo at the top right of the page and in the print. |
handleiding.html | This manual (Dutch + English). |
LEESMIJ.html / LEESMIJ.txt | Short start page (HTML) + short pointer (text) to this manual. |
.env | API keys + licence code LICENCE_CODE (created at Setup, never share). |
.env.example | Example format. |
bedrijvenmap.example.txt | Example for a custom business folder. |
server_forecast.log | Startup check and error messages; useful for support (see §7). |
9. Security
- Local only: listens on
127.0.0.1:4451.
.env has restricted rights and never appears in logs.
- Diagnostic endpoints (
/api/debug, /api/debug-db) were removed in the release; remaining are only /api/status, /api/businesses, /api/forecasts, /api/invoices, /api/saldo, /api/save-key, /api/licence and /api/save-licence.
- Responses carry security headers (
nosniff, no frames, no referrer).
- At every start the server runs a self-check (DB readable + forecast count,
.env rights) in the console and server_forecast.log (rotates at 100KB). If something goes wrong, the customer can send this log file; it contains no API keys or licence code, but it does contain the administration file name and folder paths.
- The local API only accepts requests from this computer (Host check), and POSTs only from a local address; external websites cannot read data or change keys.
- OneDrive warning: if this folder is inside a synced folder (OneDrive/Dropbox),
.env goes to the cloud with it. Prefer a non-synced location, or accept this consciously.
- A licence code is verified first (signature + correct program) and only then stored; the code is never shown back.
10. Licence (Manager.licence)
- Bottom line (also on print): shows
Licence: company · e-mail · program (valid until …), or red NO LICENCE without a valid licence.
- Without licence: viewing is allowed (companies, forecasts, balance), but Print, CSV and Update are disabled.
- Entering: request a code (program
Manager.forecast), paste it in Setup at Licence code and click Save. It is verified online via https://add-ons.online/api/verify and then stored as LICENCE_CODE in plain .env.
- Offline (no internet): after one successful online check the same code keeps working for 30 days without internet (sliding window; each successful check resets 30 days). Afterwards the program blocks until you click Recheck online with internet. Explicitly rejected codes (bad signature, expired, revoked) never work — not even offline.
- Note: this trusts the system clock of this computer. A wrong clock may let an expired code briefly appear valid or block a valid one — keep the clock synchronised automatically.