Manager.io — Inkoopfacturen Importeren
Handleiding voor installatie, configuratie en gebruik
Inhoud
0. Eerst: Custom Fields handmatig aanmaken (verplicht)
Dit moet eerst — vóórdat je installeert en configureert. Zonder de
leveranciervelden (BTW/KvK/bank) in Manager.io kan de app geen leveranciercontrole (§9) doen.
Belangrijk principe: onze programma's brengen nooit automatisch
wijzigingen aan in Manager.io (alleen lezen). Daarom worden deze velden
door jou, met de hand aangemaakt — zo houd je zelf controle over je
administratie.
- Open customfield.html in je browser.
- Kies Nederlands of Engels (één taal aanhouden).
- Maak de 3 velden aan bij Suppliers en neem de keys over in
api_config.json (zie customfield.html §2).
- Ga daarna pas verder met de installatie hieronder (§1).
1. Installatie
Benodigdheden
- Python 3.9 of hoger — download van python.org.
Vink bij installatie op Windows "Add Python to PATH" aan.
- pypdf — installeer met:
pip install pypdf
(nodig voor PDF-parsing van inkoopfacturen)
- Manager.io met API-toegang (standaard op
http://127.0.0.1:55667).
API key aanmaken in Manager.io via Instellingen → Algemeen → API.
- Browser — Chrome, Edge of Firefox om de webinterface te openen.
Bestanden overzetten
Kopieer de map naar de doelcomputer. Dit is wat erin zit:
| Bestand | Doel |
| server_manager_io.py | Hoofdprogramma (Python) — server + parsing + import |
| start-manager-io.bat | Server starten op Windows (dubbelklik) |
| start-manager-io-handmatig.bat | Server handmatig starten met zichtbare foutmelding |
| start-manager-io.vbs | Server starten zonder zichtbaar venster |
| import-icon.svg | Icoon voor snelkoppeling op Bureaublad |
| custom button instructie.txt | Uitleg voor custom button in Manager.io |
| HTML-bestand.html | Startpagina voor in browser |
| handleiding.html | Deze handleiding |
Tip: Maak een map Rekeningen/ aan in dezelfde map als
server_manager_io.py. Plak hier de inkoopfacturen (PDF/XML) die je wilt importeren.
Na import worden ze automatisch verplaatst naar RekeningIn/.
2. Server starten & stoppen
Starten
Windows: Dubbelklik op start-manager-io.bat — de browserpagina opent automatisch.
Of dubbelklik op start-manager-io.vbs — dan opent er geen zwart venster (en geen browser).
Mac / Linux: Open een terminal in de map en typ:
./start-manager-io.sh
(Eerste keer na kopiëren eventueel: chmod +x *.sh. Zonder script kan ook:
python3 server_manager_io.py.)
Als het goed is zie je deze melding in de cmd/terminal:
Invoice Import server gestart op http://127.0.0.1:4441
Snelkoppeling op het Bureaublad: draai één keer in deze map maak-snelkoppeling-in-map.bat (Windows, map C:\Manager\Manager.io) of bash maak-snelkoppeling-in-map.sh (Linux, map ~/Manager/Manager.io). Er ontstaan snelkoppelingen ín de map — kopieer die zelf naar het Bureaublad. Linux: daarna per bestand rechtsklik → “Toestaan en starten”. Details: LEESMIJ-snelkoppeling.txt.
Stoppen
Druk in het terminalvenster op Ctrl+C, of voer op Linux/Mac uit: ./stop-manager-io.sh.
Bij start-manager-io.vbs (geen venster): gebruik Taakbeheer om python.exe te stoppen.
3. Configuratie — API key, mappen & custom field UUID's
Bij de eerste start opent het configuratiescherm. Doorloop deze stappen:
Stap 1: API key instellen
- Open http://127.0.0.1:4441.
- Klik op het ⚙️ Settings icoon rechtsboven.
- Selecteer het juiste bedrijf in de dropdown.
- Vul de Manager.io API key in.
- Klik op Test om de verbinding te controleren.
- Klik op Opslaan.
De sleutels worden bewaard in het bestand .env naast de server
(1 regel per bedrijf: Bedrijfsnaam=sleutel, alleen-leesbaar).
Een oude api_keys.json wordt eenmalig automatisch meegelezen.
Stap 2: Factuurmappen instellen
Onder Instellingen kun je per bedrijf de mappen instellen:
- Rekeningen pad — waar de in te lezen facturen staan (PDF/XML)
- RekeningIn pad — waar verwerkte facturen naartoe worden verplaatst
Klik op Test map om te controleren of het pad correct is.
Klik op Mappen opslaan om de paden te bewaren.
Bedrijvenmap: in hetzelfde scherm stel je de map met
.manager-bestanden in (bv. C:\Users\naam\AppData\Local\Manager\Businesses).
Submappen worden automatisch meegenomen. Staat de lijst leeg, vul dan eerst alleen de
bedrijvenmap in en sla op — daarna verschijnen de bedrijven vanzelf.
Standaardpaden: Als je geen paden instelt, gebruikt het programma
Rekeningen/ en RekeningIn/ in dezelfde map als
server_manager_io.py.
Stap 3: Custom field koppelingen (UUID)
Manager.io slaat bij elke installatie de custom fields
onder andere UUID's op. Het programma moet die UUID's kennen om het
Client Invoice Number (het oorspronkelijke factuurnummer van de
leverancier) weg te schrijven en om de leveranciercontrole
(BTW nr / KvK nr / Bankrekening) uit te voeren. Zonder deze
koppeling kan de import worden geblokkeerd.
- Open http://127.0.0.1:4441?setup=1
— het setup-scherm toont de vier koppelingsvelden.
(Zelfde velden vind je ook in ⚙️ Instellingen.)
- De vier velden zijn:
- Client Invoice Number — het klantfactuurnummer dat bij import wordt bewaard
- BTW nr — leveranciers-BTW-nummer voor de controle
- KvK nr — KvK-nummer voor de controle
- Bankrekening nr — IBAN van de leverancier voor de controle
- Klik op Ontdek UUID: het programma zoekt de UUID's op in de
30 meest recente inkoopfacturen van Manager.io. Klik daarna
op een gevonden UUID-chip om hem in het actieve veld te zetten.
- Klik op Koppelingen opslaan en herstart daarna de server
(zie “Server starten & stoppen”) zodat de nieuwe UUID's actief worden.
Leeg veld = standaard UUID: Laat een veld leeg om de standaard
UUID van het programma te gebruiken. Voor BTW nr mag je meerdere
UUID's opgeven, komma-gescheiden, als het veld per leverancier
verschilt.
4. Gebruik — facturen importeren
Bedrijf kiezen: de dropdown bovenaan toont alleen
bedrijven met een API-sleutel (zie hoofdstuk 3). Alle bedrijven
(ook zonder sleutel) staan in ⚙️ Instellingen om sleutels toe te voegen.
Taal: met de knop 🌐 English / 🌐 Nederlands
naast het tandwiel schakel je het hoofdscherm tussen Nederlands en Engels
(keuze wordt onthouden).
Stappenplan
- Plaats inkoopfacturen (PDF of XML) in de map
Rekeningen/.
- Ververs de pagina of klik op Ververs.
- De facturen verschijnen in de tabel met:
- XML of PDF badge
- Referentienummer en leveranciersnaam
- Datum, bedrag, BTW-bedrag
- Status (Nieuw/Bekeken, Duplicaat, etc.)
- Klik op een factuur om de details te bekijken.
- Controleer of de gegevens correct zijn en pas aan waar nodig.
Let op de badges bij BTW nr, Bankrekening
en KvK nr (zie Leveranciercontrole).
- Klik op Importeren om de factuur in Manager.io te zetten.
Staat Opslaan bij importeren aan in het prognoseblok
(zie Prognose), dan wordt tegelijk een prognose-rij
in de Manager.io database opgeslagen.
- Na succesvol importeren wordt de factuur verplaatst naar
RekeningIn/.
Actieknoppen in de tabel
- Importeren — factuur direct in Manager.io zetten
- Verwijder — factuur naar RekeningIn/ verplaatsen (zonder import)
- Herstel — in Verwerkt-tab: factuur terugzetten naar Rekeningen/
5. Detailweergave & bewerken
Klik op een factuur in de tabel om de detailweergave te openen.
Deze toont links de PDF (indien beschikbaar) en rechts de geparseerde gegevens.
Bewerk-modus
Klik op Bewerk om velden aan te passen:
- Referentie — factuurnummer van de leverancier (read-only bij XML)
- Leverancier — kies uit bestaande leveranciers in Manager.io (dropdown)
- Adres, BTW, Land — worden automatisch gevuld bij keuze leverancier
- Factuurdatum, Vervaldatum — aanpasbaar
- Factuurregels — bewerk omschrijving, aantal, prijs, BTW-tarief, korting
- Korting% — per regel aanpasbaar
Bij XML-facturen zijn alleen de kostprijs (unitPrice) en
korting% bewerkbaar. De overige velden zijn read-only omdat
XML de bron van waarheid is.
Klik op Opslaan om correcties te bewaren. Deze worden
opgeslagen in corrections.json en blijven behouden bij herstart.
6. Leveranciersprofielen
Het programma onthoudt leveranciersgegevens in supplier_profiles.json.
Zodra je een leverancier eenmaal hebt gekozen en geïmporteerd, worden naam, adres,
BTW-nummer en land opgeslagen.
Bij een volgende factuur van dezelfde leverancier worden deze gegevens
automatisch ingevuld — ook als de PDF een afwijkende schrijfwijze van de
naam bevat (fuzzy matching op profielnamen).
BTW-nummer als sleutel: Het programma zoekt leveranciers eerst
op BTW-nummer in de custom fields van Manager.io. Zorg dat elke leverancier
een BTW-nummer heeft in een custom field met de naam 'BTW' of 'VAT'.
7. XML+PDF combinatie
Als er zowel een XML- als een PDF-bestand met dezelfde referentie in
Rekeningen/ staan, worden ze automatisch als paar herkend:
- De XML is de bron van de factuurgegevens (leidend)
- De PDF wordt als visuele controle getoond in de detailweergave
- Bij XML+PDF combinatie wordt de PDF automatisch meeverplaatst bij import
- In de tabel zie je een PDF+ badge bij gekoppelde paren
8. Duplicaatcontrole
Het programma controleert automatisch of een factuur al in Manager.io bestaat
voordat je deze importeert:
- Bij openen van de pagina wordt gecheckt of factuurnummers al in Manager.io
voorkomen
- Daarnaast een waarschuwing bij zelfde leverancier + bedrag + datum
binnen ±7 dagen (ander nummer): rood label Mogelijk
dubbel met bekende nummer(s) als toelichting — géén blokkade.
Verder uit elkaar liggende datums (bv. maandelijkse abonnementen) geven
géén melding; ontbrekende datums wél (voorzichtigheid); jij beslist
- Duplicaten krijgen een rood Duplicaat label in de tabel
- Bij poging tot importeren van een duplicaat krijg je een foutmelding
- Met Verwijder verplaats je een (mogelijk) duplicaat naar
RekeningDuplicaat/ (bewaren i.p.v. wissen; ook voor
Mogelijk dubbel, waar Importeren mogelijk blijft)
9. Leveranciercontrole (BTW / bank / KvK)
Voordat je een factuur importeert, vergelijkt het programma automatisch de
leveranciersgegevens op de factuur met de gegevens van de leverancier in Manager.io.
Dit geldt voor:
- BTW-nummer — op de factuur vs. Manager.io (altijd gecontroleerd)
- Bankrekening — op de factuur vs. Manager.io (altijd gecontroleerd)
- KvK-nummer — alleen gecontroleerd als het op de factuur staat
In de detailweergave zie je per veld een badge:
| Badge | Betekenis |
| Klopt |
Waarde op de factuur is gelijk aan de waarde in Manager.io |
| Niet in Manager.io |
Het veld staat op de factuur maar is (nog) niet ingevuld bij de leverancier in Manager.io |
| Wijkt af |
De waarde op de factuur verschilt van de waarde in Manager.io |
Import wordt geblokkeerd: Als BTW-nummer of
Bankrekening Niet in Manager.io of Wijkt af is,
weigert het programma de import en toont het een duidelijke melding per veld.
Vul de juiste gegevens aan bij de leverancier in Manager.io en klik
op Ververs, of corrigeer de factuur en probeer opnieuw.
KvK blokkeert nooit: Een ontbrekend of afwijkend
KvK-nummer houdt de import niet tegen. Je krijgt het na het
importeren als Let op-melding te zien, zodat je het later kunt aanvullen.
Vergelijking is tolerant: Hoofdletters/kleine letters en spaties
worden genegeerd; zo tellen NL850012246b01 en NL850012246B01
als gelijk. Bij een KvK-nummer worden alleen de cijfers vergeleken.
Uitlezen van de factuur: Het programma herkent ook afwijkende
notaties, zoals een gespatieerd IBAN (NL24 RABO 0331 0696 44),
Engelse labels (KVK Number: ...) en KvK-varianten als
KvK-nummer, CoC of Kamer van Koophandel.
10. Prognose (forecast)
Bij elke factuur staat in de detailweergave een blok
📋 Prognose in Manager-DB. Daarmee zet je de factuur bij het
importeren tegelijk als prognose-rij in de Manager.io database
(zelfde bestand als de administratie, maar zonder invloed op het grootboek):
- Opslaan bij importeren — aan/uit per factuur (standaard aan)
- Naam — vrij te kiezen; een bestaande prognose met dezelfde
naam wordt bijgewerkt in plaats van verdubbeld
- Rekening — wordt bij het importeren bepaald
(budgetcode of standaard inkooprekening)
- Bedrag incl. BTW — vooraf ingevuld met het factuurtotaal,
omdat de prognose dient als cashflow-prognose
- Interval — week / maand / kwartaal / halfjaar / jaar
- Startdatum — vooraf ingevuld met de factuurdatum
Let op: Vóór het opslaan maakt het programma automatisch een
backup van het databasebestand naast het origineel
(.forecast-bak-JJJJMMDD-UUMMSS). Dezelfde naam opnieuw importeren
werkt een bestaande prognose bij.
Zichtbaarheid in Manager.io: Manager.io leest de nieuwe rij pas
als je de administratie sluit en opnieuw opent. In de
prognosegrid op http://127.0.0.1:4451 (Manager.forecast) is de rij
meteen zichtbaar, want die leest live uit het bestand.
Beheer en overzicht van alle prognoses (perioden, totalen, +/− per rij)
doe je in Manager.forecast op
http://127.0.0.1:4451 —
zie de handleiding daar.
11. Verwerkte facturen
De Verwerkt tab toont alle facturen die zijn geïmporteerd
of verwijderd (verplaatst naar RekeningIn/).
- Overzicht van alle verwerkte bestanden met importstatus
- Mogelijkheid om facturen te herstellen naar
Rekeningen/
via de Herstel knop
12. E-mail (facturen ophalen)
Instellen (eenmalig)
- Klik op het ⚙️ icoon en ga naar E-mail (facturen ophalen).
- Vul IMAP-server, poort (meestal
993), map (INBOX) en gebruiker in.
- Vul het wachtwoord in en klik Opslaan (leeg laten = behouden).
- Klik Test verbinding: je ziet het aantal ongelezen e-mails.
Alles wordt bewaard in .env naast de server (alleen-leesbaar);
het wachtwoord wordt nooit getoond of gelogd.
Gebruik
- Klik op 📧 E-mail naast Ververs.
- PDF/XML-bijlagen uit ongelezen e-mails worden bewaard in
Rekeningen/
(bestaande bestandsnamen worden overgeslagen).
- Verwerkte e-mails worden als gelezen gemarkeerd, zodat ze
niet opnieuw worden opgehaald (maximaal 50 per klik).
- Klik daarna op Ververs (gebeurt automatisch) en verwerk de facturen zoals gewoonlijk.
Aantal ongelezen: de knop 📧 E-mail toont bij het openen van de pagina
automatisch het aantal ongelezen e-mails, bijvoorbeeld 📧 E-mail (3).
Staat er gewoon 📧 E-mail, dan is er niets ongelezen (of is e-mail nog niet ingesteld).
Beweeg met de muis over de knop voor de melding.
13. Problemen oplossen
| Probleem | Oorzaak & oplossing |
Kan geen verbinding maken met http://127.0.0.1:4441 |
Server draait niet. Start opnieuw via start-manager-io.bat. |
| Configuratiescherm blijft zichtbaar |
API key niet ingesteld of ongeldig. Open ⚙️ Settings en test de key.
Werkt de key wel maar wordt de import toch geblokkeerd? Controleer dan de
custom field UUID's (BTW / KvK / Bankrekening) bij
Ontdek UUID. |
| Geen facturen in de lijst |
Map Rekeningen/ is leeg of niet gevonden.
Controleer de mappeninstellingen in ⚙️ Settings. |
pypdf not found fout |
Installeer pypdf met dezelfde Python als waarmee je start:
py -3 -m pip install pypdf (of
python -m pip install pypdf). |
| Python wordt niet gevonden, of de Microsoft Store opent |
De naam python wijst naar een Store-alias zonder echte
Python. Installeer Python van python.org
en vink "Add python.exe to PATH" aan. Test daarna
py -3 --version. |
| Server start niet, of het venster sluit direct |
Start start-manager-io-handmatig.bat of open een
opdrachtprompt en voer py -3 server_manager_io.py uit.
Lees de foutmelding en de laatste regels in server.err.
Controleer dat pypdf is geïnstalleerd en dat poort 4441
vrij is. |
| Import mislukt — Leverancier niet gevonden |
De leverancier moet eerst bestaan in Manager.io.
Maak de leverancier aan in Manager.io via Inkoop → Leveranciers.
Zorg dat het BTW-nummer correct is ingesteld. |
| Import mislukt — Duplicaat |
Deze factuur bestaat al in Manager.io. Gebruik Verwijder om het
bestand te archiveren. |
| Import mislukt — Leveranciergegevens wijken af / niet ingevuld |
Het programma blokkeert de import omdat BTW-nummer of bankrekening
op de factuur afwijkt van, of ontbreekt bij, de leverancier in Manager.io.
(KvK blokkeert nooit — dat komt als Let op-melding.)
Corrigeer de gegevens in Manager.io en klik op Ververs,
of corrigeer de factuur en probeer opnieuw. |
| Prognose staat niet in Manager.io |
De rij is wel opgeslagen (check op
http://127.0.0.1:4451).
Sluit de administratie in Manager.io en open haar opnieuw. |
| Import gelukt, maar “Prognose mislukt …” |
De factuur staat in Manager.io; alleen het wegschrijven van de prognose-rij
faalde (bijv. database vergrendeld). Er is een backup gemaakt
(.forecast-bak-* naast het .manager-bestand).
Probeer opnieuw te importeren via Herstel + Importeren,
of voer de prognose in Manager.io zelf in. |
| Fout bij importeren (500) |
Manager.io API geeft een fout. Check de cmd-output voor details.
Mogelijk ontbreken verplichte velden. |
| PDF parsing geeft verkeerde bedragen |
PDFs hebben variabele layouts. Gebruik de bewerk-modus om
gegevens te corrigeren. Correcties worden bewaard in
corrections.json. |
| Knoppen doen niets (Test verbinding, Ontdek UUID, ...) |
De pagina is (gedeeltelijk) niet geladen. Vernieuw met Ctrl+F5
(geen cache). Blijft het probleem? Herstart de server via
start-manager-io.bat en ververs opnieuw. |
Diagnostiek bij support
Klik op Diagnostiek in de werkbalk om één technisch logbestand
te downloaden. Dit bestand bevat alleen technische gebeurtenissen van de laatste
7 dagen (maximaal 10 MB): start/stop, fase, platform, Python-versie,
verbindingsresultaten en stabiele foutcodes. Er staan geen
factuur-, leverancier-, klant-, adres-, bedrag-, Peppol- of documentgegevens in,
en ook geen API-keys, wachtwoorden of tokens. De naam van je eigen bedrijf kan
als Bedrijf in de samenvatting staan; klant- en leveranciersnamen
niet. Stuur het bestand alleen op verzoek naar support.
De daglogs worden lokaal bewaard in diagnostics/ met rechten
600. Oude daglogs worden automatisch verwijderd. De boot-fallback
heeft een aparte limiet van 1 MB. De map diagnostics/ hoort nooit
in een schone distributie-zip.
server.log en server.err zijn de ruwe stdout- en
stderr-uitvoer van de server (nodig omdat pythonw geen console
heeft). Ze helpen alleen bij het starten van de server; de start-bat toont de
laatste regels van server.err als poort 4441 niet open komt. Deze
bestanden bevatten vrije tekst en worden bewust niet in de
diagnostiek opgenomen. Diagnostiek gebruikt alleen vaste, technische velden.
Acties zoals importeren, corrigeren en verplaatsen staan lokaal in
audit-log.json (een geldige JSON-array). Een oude
audit_log.jsonl wordt bij de eerste start overgenomen en als
backup bewaard. Dit bestand hoort net als server.log,
server.err en diagnostics/ niet in een schone zip.
14. Overzicht bestanden
| Bestand / Map | Omschrijving |
| server_manager_io.py | Hoofdprogramma (Python). Server + XML/PDF parsing + Manager.io import. |
| diagnostics.py | Lokale diagnostiek met vaste allowlist, 7 dagen / 10 MB retentie en privacy-filter. |
| diagnostics_export.py | Maakt zonder server één diagnostiekbestand van de laatste 7 dagen. |
| diagnostics/ | Technische daglogs (automatisch aangemaakt; nooit in een schone zip). |
| server.log / server.err | Ruwe stdout/stderr van pythonw; alleen voor startproblemen, niet in diagnostiek of schone zip. |
| audit-log.json | Lokale actielog (JSON-array); oude audit_log.jsonl wordt eenmalig overgenomen. Nooit in schone zip. |
| start-manager-io.bat | Startscript voor Windows (dubbelklik). Werkt vanuit eigen map. |
| start-manager-io-handmatig.bat | Startscript voor Windows met zichtbare foutmelding (foreground). |
| start-manager-io.vbs | Startscript voor Windows, zonder zichtbaar venster. |
| import-icon.svg | Icoon voor snelkoppeling. |
| custom button instructie.txt | Uitleg voor custom button in Manager.io. |
| HTML-bestand.html | HTM startpagina. |
| 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). |
| io.ico / io-256.png | Pictogram voor de snelkoppeling (Windows / Linux). |
| handleiding.html | Deze handleiding. |
| api_config.json | Client-invoice-nummer veld en custom field UUID's (BTW/KvK/bank). Géén sleutels — API-sleutels en wachtwoorden staan alleen in .env. |
| .env | API-sleutels per bedrijf + e-mailinstellingen (wordt aangemaakt bij opslaan; nooit delen). Een oude api_keys.json wordt eenmalig automatisch verhuisd naar .env (backup als .bak). |
| .env.example | Voorbeeldformaat voor .env. |
| LEESMIJ.html | Korte startpagina (Nederlands + Engels). |
| LEESMIJ.txt | Korte verwijzing naar deze handleiding. |
| business_config.json | Per-bedrijf mappenconfiguratie (wordt aangemaakt bij opslaan). |
| supplier_profiles.json | Leveranciersprofielen (wordt gevuld bij gebruik). |
| corrections.json | Correcties op geparseerde facturen (wordt gevuld bij bewerken). |
| import_state.json | Import status per bestand (wordt bijgewerkt tijdens gebruik). |
| invoice_cache.json | Cache voor geparseerde facturen (versnelt herladen). |
| Rekeningen/ | Map voor in te lezen inkoopfacturen (PDF/XML). |
| RekeningIn/ | Map voor verwerkte facturen (na import). |
| RekeningDuplicaat/ | Map voor verwijderde (mogelijke) duplicaten. |
15. Veiligheid
Belangrijk: Dit programma kan facturen aanmaken in
Manager.io via de API (POST /purchase-invoice-form) en
prognose-rijen wegschrijven in het .manager-databasebestand.
Vóór elke prognose-schrijfactie wordt automatisch een backup gemaakt
(.forecast-bak-* naast het origineel). Alle overige operaties zijn
alleen-lezen of bestandsbeheer in de eigen map.
Beveiligingsmaatregelen
- Alleen lokaal: Server luistert alleen op
127.0.0.1 — niet bereikbaar vanaf andere computers.
- CORS beperkt: Alleen
http://127.0.0.1:4441
toegestaan als origin.
- Geen HTTPS: Alleen gebruiken op dezelfde computer
waar Manager.io op draait.
- Path traversal beveiliging: Bestandspaden worden
gevalideerd met
_safe_file_path().
- Exception sanitization: Interne foutmeldingen worden
niet naar de browser gestuurd.
- API keys per bedrijf: Opgeslagen in
.env (rechten 600, nooit in logs). Bescherm dit bestand.
- Diagnostiek: Alleen technische velden via een vaste
allowlist; daglogs krijgen rechten
600 en worden na 7 dagen
of 10 MB opgeruimd. Geen factuur-, leverancier-, klant- of secretgegevens.
Wat het programma WEL doet
- Inkoopfacturen (PDF/XML) parsen en tonen
- Facturen importeren in Manager.io via API
- Leveranciersprofielen bijhouden
- Prognose-rijen opslaan in de Manager.io database (met backup vooraf)
- Bestanden verplaatsen van Rekeningen/ naar RekeningIn/
Wat het programma NIET doet
- Geen facturen verwijderen uit Manager.io
- Geen bestaande facturen wijzigen in Manager.io
- Geen gegevens naar internet sturen (behalve Manager.io API via localhost)
- Geen commando's uitvoeren op de computer
Vragen of problemen? Raadpleeg de cmd-output voor foutmeldingen.
Deze toont alle acties en eventuele fouten in real-time.
Manager.io — Importing Purchase Invoices
Manual for installation, configuration and use
Contents
0. First: create Custom Fields manually (required)
This comes first — before installing and configuring. Without the
supplier fields (VAT/CoC/bank) in Manager.io the app cannot run the supplier check (§9).
Important principle: our programs never change anything in Manager.io
automatically (read-only). That is why you create these fields
yourself, by hand — so you stay in control of your accounts.
- Open customfield.html in your browser.
- Choose Dutch or English (stick to one language).
- Create the 3 fields under Suppliers and copy the keys into
api_config.json (see customfield.html §2).
- Only then continue with the installation below (§1).
1. Installation
Requirements
- Python 3.9 or higher — download from python.org.
On Windows tick "Add Python to PATH" during installation.
- pypdf — install with:
pip install pypdf
(needed for PDF parsing of purchase invoices)
- Manager.io with API access (default at
http://127.0.0.1:55667).
Create an API key in Manager.io via Settings → General → API.
- Browser — Chrome, Edge or Firefox to open the web interface.
Copying the files
Copy the folder to the target computer. This is what is inside:
| File | Purpose |
| server_manager_io.py | Main program (Python) — server + parsing + import |
| start-manager-io.bat | Start the server on Windows (double-click) |
| start-manager-io-handmatig.bat | Start the server manually with a visible error message |
| start-manager-io.vbs | Start the server without a visible window |
| import-icon.svg | Icon for a Desktop shortcut |
| custom button instructie.txt | Explanation for the custom button in Manager.io (Dutch) |
| HTML-bestand.html | Start page for the browser |
| handleiding.html | This manual |
Tip: Create a folder Rekeningen/ in the same folder as
server_manager_io.py. Put the purchase invoices (PDF/XML) you want to import there.
After import they are moved automatically to RekeningIn/.
2. Starting & stopping the server
Starting
Windows: Double-click start-manager-io.bat — the browser page opens automatically.
Or double-click start-manager-io.vbs — then no black window opens (and no browser).
Mac / Linux: Open a terminal in the folder and type:
./start-manager-io.sh
(First time after copying you may need: chmod +x *.sh. Without the script you can also use:
python3 server_manager_io.py.)
If all is well you see this message in the cmd/terminal:
Invoice Import server started at http://127.0.0.1:4441
Desktop shortcut: run maak-snelkoppeling-in-map.bat (Windows, folder C:\Manager\Manager.io) or bash maak-snelkoppeling-in-map.sh (Linux, folder ~/Manager/Manager.io) once in this folder. Shortcuts are created inside the folder — copy them to the Desktop yourself. Linux: per file right-click → "Allow and launch". Details: LEESMIJ-snelkoppeling.txt.
Stopping
Press Ctrl+C in the terminal window, or on Linux/Mac run: ./stop-manager-io.sh.
With start-manager-io.vbs (no window): use Task Manager to stop python.exe.
3. Configuration — API key, folders & custom field UUIDs
At the first start the configuration screen opens. Go through these steps:
Step 1: Set the API key
- Open http://127.0.0.1:4441.
- Click the ⚙️ Settings icon at the top right.
- Select the correct business in the dropdown.
- Fill in the Manager.io API key.
- Click Test to check the connection.
- Click Save.
Keys are stored in the file .env next to the server
(1 line per business: BusinessName=key, read-only).
An old api_keys.json is read once automatically.
Step 2: Set the invoice folders
Under Settings you can set the folders per business:
- Rekeningen path — where the invoices to read are (PDF/XML)
- RekeningIn path — where processed invoices are moved to
Click Test folder to check that the path is correct.
Click Save folders to store the paths.
Businesses folder: in the same screen you set the folder with
.manager files (e.g. C:\Users\name\AppData\Local\Manager\Businesses).
Subfolders are included automatically. If the list is empty, first fill in only the
businesses folder and save — the businesses then appear by themselves.
Default paths: If you set no paths, the program uses
Rekeningen/ and RekeningIn/ in the same folder as
server_manager_io.py.
Step 3: Custom field links (UUID)
Manager.io stores the custom fields under different UUIDs with each installation.
The program must know those UUIDs to write away the
Client Invoice Number (the supplier's original invoice number)
and to run the supplier check
(VAT no / CoC no / Bank account). Without this link the import can be blocked.
- Open http://127.0.0.1:4441?setup=1
— the setup screen shows the four link fields.
(You find the same fields under ⚙️ Settings.)
- The four fields are:
- Client Invoice Number — the customer invoice number kept at import
- BTW nr — supplier VAT number for the check
- KvK nr — CoC number for the check
- Bankrekening nr — supplier IBAN for the check
- Click Discover UUID: the program looks up the UUIDs in the
30 most recent purchase invoices of Manager.io. Then click
a found UUID chip to put it in the active field.
- Click Save links and restart the server afterwards
(see "Starting & stopping the server") so the new UUIDs become active.
Empty field = default UUID: Leave a field empty to use the program's default
UUID. For BTW nr you may enter multiple
UUIDs, comma-separated, if the field differs per supplier.
4. Use — importing invoices
Choosing a business: the dropdown at the top only shows
businesses with an API key (see chapter 3). All businesses
(including ones without a key) are listed in ⚙️ Settings to add keys.
Language: with the 🌐 English / 🌐 Nederlands button
next to the gear you switch the main screen between Dutch and English
(choice is remembered).
Step-by-step
- Place purchase invoices (PDF or XML) in the
Rekeningen/ folder.
- Refresh the page or click Refresh.
- The invoices appear in the table with:
- XML or PDF badge
- Reference number and supplier name
- Date, amount, VAT amount
- Status (New/Viewed, Duplicate, etc.)
- Click an invoice to view the details.
- Check that the data is correct and adjust where needed.
Watch the badges at VAT no, Bank account
and CoC no (see Supplier check).
- Click Import to put the invoice into Manager.io.
If Save on import is on in the forecast block
(see Forecast), a forecast row is
stored in the Manager.io database at the same time.
- After successful import the invoice is moved to
RekeningIn/.
Action buttons in the table
- Import — put the invoice directly into Manager.io
- Delete — move the invoice to RekeningIn/ (without import)
- Restore — in the Processed tab: move the invoice back to Rekeningen/
5. Detail view & editing
Click an invoice in the table to open the detail view.
It shows the PDF on the left (if available) and the parsed data on the right.
Edit mode
Click Edit to adjust fields:
- Reference — supplier's invoice number (read-only for XML)
- Supplier — choose from existing suppliers in Manager.io (dropdown)
- Address, VAT, Country — filled automatically on supplier choice
- Invoice date, Due date — adjustable
- Invoice lines — edit description, quantity, price, VAT rate, discount
- Discount% — adjustable per line
For XML invoices only the unit price and
discount% are editable. The other fields are read-only because
XML is the source of truth.
Click Save to keep corrections. They are stored in
corrections.json and kept across restarts.
6. Supplier profiles
The program remembers supplier data in supplier_profiles.json.
Once you have chosen and imported a supplier, name, address,
VAT number and country are stored.
With the next invoice from the same supplier these details are
filled in automatically — even if the PDF spells the
name differently (fuzzy matching on profile names).
VAT number as key: The program first looks up suppliers
by VAT number in the Manager.io custom fields. Make sure every supplier
has a VAT number in a custom field named 'BTW' or 'VAT'.
7. XML+PDF combination
If an XML and a PDF file with the same reference are both in
Rekeningen/, they are automatically recognized as a pair:
- The XML leads the invoice data (leading)
- The PDF is shown as a visual check in the detail view
- With an XML+PDF combination the PDF is moved along automatically at import
- In the table you see a PDF+ badge at linked pairs
8. Duplicate check
Before you import an invoice, the program automatically checks whether it already exists in Manager.io:
- On opening the page it checks whether invoice numbers already occur in Manager.io
- Plus a warning for same supplier + amount + date
within ±7 days (different number): red Possibly
duplicate label with known number(s) as explanation — no block.
Dates further apart (e.g. monthly subscriptions) give
no message; missing dates do (caution); you decide
- Duplicates get a red Duplicate label in the table
- When trying to import a duplicate you get an error message
- With Delete you move a (possible) duplicate to
RekeningDuplicaat/ (keep instead of delete; also for
Possibly duplicate, where Import stays possible)
9. Supplier check (VAT / bank / CoC)
Before you import an invoice, the program automatically compares the
supplier details on the invoice with the supplier's details in Manager.io.
This applies to:
- VAT number — on the invoice vs. Manager.io (always checked)
- Bank account — on the invoice vs. Manager.io (always checked)
- CoC number — only checked if present on the invoice
In the detail view you see a badge per field:
| Badge | Meaning |
| Match |
Value on the invoice equals the value in Manager.io |
| Not in Manager.io |
The field is on the invoice but not (yet) filled at the supplier in Manager.io |
| Differs |
The value on the invoice differs from the value in Manager.io |
Import is blocked: If the VAT number or
bank account is Not in Manager.io or Differs,
the program refuses the import and shows a clear message per field.
Add the correct details at the supplier in Manager.io and click
Refresh, or correct the invoice and try again.
CoC never blocks: A missing or differing
CoC number does not stop the import. You see it after
import as a Note message, so you can add it later.
Comparison is tolerant: Upper/lower case and spaces
are ignored; NL850012246b01 and NL850012246B01
count as equal. For a CoC number only the digits are compared.
Reading from the invoice: The program also recognizes deviating
notations, such as a spaced IBAN (NL24 RABO 0331 0696 44),
English labels (KVK Number: ...) and CoC variants like
KvK-nummer, CoC or Kamer van Koophandel.
10. Forecast
With every invoice the detail view shows a
📋 Forecast in Manager DB block. With it you store the invoice at import
as a forecast row in the Manager.io database at the same time
(same file as the accounts, but without effect on the ledger):
- Save on import — on/off per invoice (default on)
- Name — free to choose; an existing forecast with the same
name is updated instead of duplicated
- Account — determined at import
(budget code or default purchase account)
- Amount incl. VAT — prefilled with the invoice total,
because the forecast serves as a cashflow forecast
- Interval — week / month / quarter / half-year / year
- Start date — prefilled with the invoice date
Note: Before saving, the program automatically makes
a backup of the database file next to the original
(.forecast-bak-YYYYMMDD-HHMMSS). Importing the same name again
updates an existing forecast.
Visibility in Manager.io: Manager.io only reads the new row
if you close and reopen the business. In the
forecast grid at http://127.0.0.1:4451 (Manager.forecast) the row is
visible immediately, because it reads live from the file.
Managing and overviewing all forecasts (periods, totals, +/− per row)
is done in Manager.forecast at
http://127.0.0.1:4451 —
see the manual there.
11. Processed invoices
The Processed tab shows all invoices that were imported
or deleted (moved to RekeningIn/).
- Overview of all processed files with import status
- Option to restore invoices to
Rekeningen/
via the Restore button
12. Email (fetching invoices)
Setting up (once)
- Click the ⚙️ icon and go to Email (fetch invoices).
- Fill in IMAP server, port (usually
993), folder (INBOX) and user.
- Fill in the password and click Save (leave empty = keep).
- Click Test connection: you see the number of unread emails.
Everything is stored in .env next to the server (read-only);
the password is never shown or logged.
Use
- Click 📧 Email next to Refresh.
- PDF/XML attachments from unread emails are stored in
Rekeningen/
(existing file names are skipped).
- Processed emails are marked as read, so they
are not fetched again (maximum 50 per click).
- Then click Refresh (happens automatically) and process the invoices as usual.
Unread count: the 📧 Email button automatically shows
the number of unread emails when opening the page, e.g. 📧 Email (3).
If it just says 📧 Email, there is nothing unread (or email is not set up yet).
Hover over the button for the message.
13. Troubleshooting
| Problem | Cause & solution |
Cannot connect to http://127.0.0.1:4441 |
Server is not running. Restart via start-manager-io.bat. |
| Configuration screen stays visible |
API key not set or invalid. Open ⚙️ Settings and test the key.
If the key works but import is still blocked, check the
custom field UUIDs (VAT / CoC / Bank account) at
Discover UUID. |
| No invoices in the list |
Rekeningen/ folder is empty or not found.
Check the folder settings in ⚙️ Settings. |
pypdf not found error |
Install pypdf with the same Python you use to start:
py -3 -m pip install pypdf (or
python -m pip install pypdf). |
| Python is not found, or the Microsoft Store opens |
The python name points to a Store alias without real
Python. Install Python from python.org
and tick "Add python.exe to PATH". Then test
py -3 --version. |
| Server does not start, or the window closes immediately |
Run start-manager-io-handmatig.bat, or open a command
prompt and run py -3 server_manager_io.py. Read the error
message and the last lines of server.err. Check that
pypdf is installed and that port 4441 is free. |
| Import fails — Supplier not found |
The supplier must first exist in Manager.io.
Create the supplier in Manager.io via Purchase → Suppliers.
Make sure the VAT number is set correctly. |
| Import fails — Duplicate |
This invoice already exists in Manager.io. Use Delete to
archive the file. |
| Import fails — Supplier details differ / not filled |
The program blocks the import because the VAT number or bank account
on the invoice differs from, or is missing at, the supplier in Manager.io.
(CoC never blocks — it comes as a Note message.)
Correct the details in Manager.io and click Refresh,
or correct the invoice and try again. |
| Forecast not in Manager.io |
The row is stored (check at
http://127.0.0.1:4451).
Close the business in Manager.io and open it again. |
| Import succeeded, but "Forecast failed …" |
The invoice is in Manager.io; only writing the forecast row
failed (e.g. database locked). A backup was made
(.forecast-bak-* next to the .manager file).
Try importing again via Restore + Import,
or enter the forecast in Manager.io yourself. |
| Error on importing (500) |
Manager.io API gives an error. Check the cmd output for details.
Required fields may be missing. |
| PDF parsing gives wrong amounts |
PDFs have variable layouts. Use the edit mode to
correct data. Corrections are stored in
corrections.json. |
| Buttons do nothing (Test connection, Discover UUID, ...) |
The page is (partially) not loaded. Refresh with Ctrl+F5
(no cache). If the problem persists, restart the server via
start-manager-io.bat and refresh again. |
Diagnostics for support
Click Diagnostics in the toolbar to download one technical
log file. It contains only technical events from the last 7 days (max. 10 MB):
start/stop, phase, platform, Python version, connection results and stable
error codes. It contains no invoice, supplier, customer,
address, amount, Peppol or document data, and no API keys, passwords or tokens.
The name of your own business may appear as company in the summary;
customer and supplier names do not. Send it to support only on request.
Daily logs are stored locally in diagnostics/ with permissions
600. Old daily logs are removed automatically. The boot fallback
has a separate 1 MB cap. The diagnostics/ folder must never be
included in a clean distribution zip.
server.log and server.err are the raw stdout and
stderr of the server (needed because pythonw has no console).
They help only when starting the server; the start .bat shows the last lines
of server.err if port 4441 does not open. These files contain free
text and are deliberately not included in diagnostics.
Diagnostics uses only fixed technical fields.
Actions such as importing, correcting and moving files are logged locally in
audit-log.json (a valid JSON array). An old
audit_log.jsonl is migrated once and kept as a backup. Like
server.log, server.err and diagnostics/,
this file must not be included in a clean zip.
14. File overview
| File / Folder | Description |
| server_manager_io.py | Main program (Python). Server + XML/PDF parsing + Manager.io import. |
| diagnostics.py | Local diagnostics with fixed allowlist, 7-day / 10 MB retention and privacy filter. |
| diagnostics_export.py | Creates one diagnostics file for the last 7 days without starting the server. |
| diagnostics/ | Technical daily logs (created automatically; never include in a clean zip). |
| server.log / server.err | Raw pythonw stdout/stderr; startup troubleshooting only, not in diagnostics or a clean zip. |
| audit-log.json | Local action log (JSON array); old audit_log.jsonl is migrated once. Never include in a clean zip. |
| start-manager-io.bat | Start script for Windows (double-click). Works from its own folder. |
| start-manager-io-handmatig.bat | Start script for Windows with a visible error message (foreground). |
| start-manager-io.vbs | Start script for Windows, without a visible window. |
| import-icon.svg | Icon for a shortcut. |
| custom button instructie.txt | Explanation for the custom button in Manager.io (Dutch). |
| HTML-bestand.html | HTML start page. |
| customfield.html | Which Custom Fields to create in Manager.io (NL/EN). |
| maak-snelkoppeling-in-map.bat / .sh | Creates shortcuts inside the folder (with icon); copy to the Desktop yourself. |
| LEESMIJ-snelkoppeling.txt | Steps for a Desktop shortcut (Windows + Linux). |
| io.ico / io-256.png | Icon for the shortcut (Windows / Linux). |
| handleiding.html | This manual. |
| api_config.json | Client invoice number field and custom field UUIDs (VAT/CoC/bank). No keys — API keys and passwords live only in .env. |
| .env | API keys per business + email settings (created on saving; never share). An old api_keys.json is moved once automatically to .env (backup as .bak). |
| .env.example | Example format for .env. |
| LEESMIJ.html | Short start page (Dutch + English). |
| LEESMIJ.txt | Short pointer to this manual. |
| business_config.json | Per-business folder configuration (created on saving). |
| supplier_profiles.json | Supplier profiles (filled during use). |
| corrections.json | Corrections to parsed invoices (filled when editing). |
| import_state.json | Import status per file (updated during use). |
| invoice_cache.json | Cache for parsed invoices (speeds up reloading). |
| Rekeningen/ | Folder for purchase invoices to read (PDF/XML). |
| RekeningIn/ | Folder for processed invoices (after import). |
| RekeningDuplicaat/ | Folder for deleted (possible) duplicates. |
15. Security
Important: This program can create invoices in
Manager.io via the API (POST /purchase-invoice-form) and
write forecast rows into the .manager database file.
Before every forecast write a backup is made automatically
(.forecast-bak-* next to the original). All other operations are
read-only or file management in its own folder.
Security measures
- Local only: Server only listens on
127.0.0.1 — not reachable from other computers.
- Limited CORS: Only
http://127.0.0.1:4441
allowed as origin.
- No HTTPS: Only use on the same computer
where Manager.io runs.
- Path traversal protection: File paths are
validated with
_safe_file_path().
- Exception sanitization: Internal error messages are
not sent to the browser.
- API keys per business: Stored in
.env (permissions 600, never in logs). Protect this file.
- Diagnostics: Technical fields only via a fixed allowlist;
daily logs use permissions
600 and are removed after 7 days
or 10 MB. No invoice, supplier, customer or secret data.
What the program DOES do
- Parse and show purchase invoices (PDF/XML)
- Import invoices into Manager.io via API
- Keep supplier profiles
- Store forecast rows in the Manager.io database (with backup beforehand)
- Move files from Rekeningen/ to RekeningIn/
What the program does NOT do
- Delete invoices from Manager.io
- Change existing invoices in Manager.io
- Send data to the internet (except Manager.io API via localhost)
- Run commands on the computer
Questions or problems? Check the cmd output for error messages.
It shows all actions and any errors in real time.