JDG Ksiegowy
Open-source AI accounting assistant for Polish sole proprietorships (JDG)
Invoicing • KSeF • JPK_V7M • JPK_EWP • Ryczalt • ZUS • MF Gateway submit
Quick Start •
Installation •
Features •
Status •
Po polsku
Why this exists
If you run a JDG in Poland, your monthly cycle looks like this:
- Issue invoices → send to client + upload to KSeF
- Track costs → post them to your books
- Calculate ryczalt + ZUS + VAT → remember three deadlines
- Generate JPK_V7M → upload to MF e-Dokumenty
- Once a year, generate JPK_EWP + PIT-28
Accounting SaaS (wFirma, inFakt, Fakturownia) charges 50–150 PLN/month to do this. They own your data. They lock you into their UI. And none of them let you just say «wystaw fakture Acme za kwiecien» from Telegram at 11 PM.
JDG Ksiegowy replaces the core of that workflow — self-hosted, AI-first, chat-native, on Ollama (free) or any LLM you like.
You: "Wystaw fakture Acme Sp. z o.o., NIP 1234567890, 10500 netto, kwiecien 2026"
Agent: Faktura A1/04/2026 wygenerowana:
- DOCX: data/faktury/2026/04/faktura_A1_04_2026.docx
- KSeF: wyslana, numer: KSeF-2026-04-00001234
- Netto: 10 500,00 PLN | VAT 23%: 2 415,00 PLN | Brutto: 12 915,00 PLN
Terminy podatkowe na maj:
- 20 maja: ryczalt 12% = 1 260,00 PLN + ZUS 498,35 PLN
- 25 maja: VAT (JPK_V7M) = 2 415,00 PLN
Features
Honest state per feature — see Status below for the full picture.
Shipped and tested
Invoicing & KSeF (obligatoryjny od 2026-02-01)
- Invoice generation — DOCX (Polish, client-ready) + XML FA(3) via ksef2
FA3InvoiceBuilder, namespace crd.gov.pl/wzor/2025/06/25/13775/
- KSeF submission — online session, send + wait + UPO retrieval, test/demo/prod env
- Invoice corrections (FA KOR) — difference lines referencing the original KSeF number (
jdg invoice correct)
- Multi-line invoices — per-line VAT codes (23/8/5/0,
zw, np, 0_wdt, 0_exp) and GTU markers
- MF White List check —
jdg buyer lookup; new buyers prefilled from the registry with VAT-status warnings
- KSeF QR code — invoices sent to KSeF get the KSeF number and the verification QR (KOD I) on the DOCX/PDF
- Foreign invoices — NP VAT code, EU buyers (KodUE + NrVatUE), non-EU (BrakID)
- Recurring contracts — auto-fakturowanie miesięczne for subscription clients
- Email delivery — PDF via LibreOffice-headless + SMTP, Polish body text
Expenses & OCR
- Expense registry — purchase invoices in SQLite with categories and
vat_deduction_pct (0-100) for partial VAT deduction (e.g. 50% for personal car used for business)
- OCR faktur zakupu — local vision model via Ollama (Pixtral 12B) with JSON-schema structured output, Claude fallback (
messages.parse); deterministic checks (NIP checksum, net + VAT = gross) block saving a bad read
- Input VAT deduction in JPK_V7M — expenses feed P_42 / P_43 automatically
Payments
- Payment tracking — overdue detection, manual mark-as-paid
- Bank CSV import — auto-match payments to invoices by NIP / title