# Kancelář Demo Brno: set-up and simulation plan

> **Gamma ERP business simulation.** A plan for Claude (Claude Code with the Gamma ERP connector) to set up a made-up business in your own Gamma ERP, enter its work and show the reports. Everything runs on your computer; all names and numbers are invented. Gamma ERP is open source (AGPL-3.0): https://github.com/Gamma-Wallet/GammaERP. More simulations: https://blog.gamma-wallet.com/en/erp/simulations

The full plan for setting up and simulating a small office supplies and IT wholesaler in Brno, Czech Republic, in the local Gamma ERP, through Claude and a connector for its company. It sells to offices and schools on invoice. Unlike the other plans, it **simulates December 2025, closes the 2025 fiscal year, and carries on into January 2026**, so the year closing is tested on a real year. The same logic as the other plans applies: one step at a time, a table before every change, a yes before every change and before every posting.

This plan tests:
- **Purchase requests and purchase orders with approvals.** A role's limit decides who may approve; one order waits for the owner. A second user approves it.
- **Sales orders before invoices,** offers → orders → invoices (`make_next_document`), part-delivered orders left open.
- **Foreign currency:** paper from Germany in **EUR**, laptops and printers from a US distributor in **USD**. The company's own currency is CZK.
- **Serial numbers** on laptops and printers.
- **Unit conversion:** paper bought by the pallet-carton (5 reams) and sold by the ream.
- **Document hold:** two users editing the same draft (the second is refused while the first holds it).
- **Closing:** a closed period (posting lock), the **year closing** of 2025, and a posting into 2025 refused afterwards.
- **User activity (audit):** who did what.

## 1. Where it runs

| Item | Value |
|---|---|
| ERP screens | http://127.0.0.1:8090 |
| Claude connector (new) | `gamma-erp-velko` → `http://127.0.0.1:8090/mcp`, signed in as `velko.owner` |
| Second connector for the approver (optional) | `gamma-erp-velko-schval` with the token of `velko.schvalovatel` (made in step 2 with `tokens` make, signed in as that user): approving as another user |
| Company | Kancelář Demo Brno s.r.o., code `VELKOBRNO`, Czech pack, currency CZK |
| Credentials | `velko-credentials.txt` in the working folder. Never repeat a password or token in chat |

## 2. Rules for the session

1. Use only the `mcp__gamma-erp-velko__*` tools (and the approver's connector where the plan says), or the same server over HTTP. `list_workplaces` must answer `VELKOBRNO`.
2. Before every change, show a table and wait for a yes; then `confirm=true`. Posting, the year closing and reversals are final: say so before asking.
3. Nothing is deleted; read the guide (documents (approvals, flows, orders, purchases, other actions: hold), stock (serials, convert stock), currencies-and-payments, accounting (closed periods, year closing), users-and-rights (approval limits, audit)) instead of guessing.
4. What the ERP can't do goes on the "Missing / not possible" list (section 16).
5. Show each week's drafts as one group; post only after a yes. The Czech chart keeps Czech account names.

## Install the ERP and run everything in one go

These steps are for a Claude Code session on the user's computer, with a shell and Docker. In one run Claude installs Gamma ERP (if it isn't running yet), makes the company, connects itself to it, and then inserts the sample data of this plan, step by step. Nothing is sent outside this computer: the ERP runs on 127.0.0.1 only.

### What it needs

| Need | Check |
|---|---|
| Docker Desktop (or Docker Engine with Compose v2), running | `docker compose version` |
| Git, or a way to download two files from GitHub | `git --version` |
| Free ports 8090 (screens, API, MCP) and 5433 (database) on 127.0.0.1 | `curl -s http://127.0.0.1:8090/health` answers nothing yet, or "Healthy" if the ERP is already there |
| About 2 GB of disk for the images and the database | – |

### One yes first

Before doing anything, Claude shows the user this whole section as one plan (install, company, connector, then the data steps) and asks for one yes. Making the company can't be undone (the ERP deletes nothing), so it is named in that question. **One-go mode:** if the user answers "do it all", that one yes covers every set-up step of this plan; Claude still shows each step's table as it goes, stops on any refusal, and asks again before each posting group (posting is final).

### 1. Install the ERP (skip if it already answers "Healthy")

```sh
# a folder of its own, e.g. ~/gamma-erp
git clone --depth 1 https://github.com/Gamma-Wallet/GammaERP.git gamma-erp
cd gamma-erp/deploy
cp .env.example .env
```

Then set `.env` for a local install (edit the file; on Windows use the editor or PowerShell, not `sed -i`):

| Setting | Local value |
|---|---|
| `ERP_TAG` | `gamma` (the latest release) |
| `POSTGRES_PASSWORD` | a long random password (generate it; keep it only in `.env`) |
| `AUTH_REDIRECT_URI` | `http://127.0.0.1:8090/signed-in` |
| `AUTH_REQUIRE_HTTPS` | `false` (local test, no TLS) |
| `MCP_RESOURCE` | `http://127.0.0.1:8090/mcp` |
| `AUTH_SIGNING_CERTIFICATE`, `AUTH_ENCRYPTION_CERTIFICATE`, `AUTH_CERTIFICATE_PASSWORD` | empty (without certificates a restart signs everyone out, which is fine locally) |
| `MAIL_HOST` | empty (e-mail off) |

```sh
docker compose up -d                 # pulls the images from ghcr.io; if the pull is refused, use: docker compose up -d --build
curl -s http://127.0.0.1:8090/health # wait until it answers "Healthy" (the first start runs the migrations: up to a minute)
```

If the ERP is already installed in another folder, use that folder's `deploy` directory for the commands below (`docker ps` shows the containers `gamma-erp-web-1`, `gamma-erp-erp-1`, `gamma-erp-db-1`).

### 2. Make the company (skip if it already exists)

```sh
docker compose exec erp dotnet /app/Gamma.Erp.Api.dll create-company --company "Kancelář Demo Brno s.r.o." --code VELKOBRNO --country CZ --username velko.owner --activity GENERAL
```

It prints three lines: `Company … made, … configuration rows loaded. velko.owner is its administrator.`, then `First password: …` and `First Claude token: GE_…`. Both secrets are shown only once:
- Save them in `velko-credentials.txt` in the working folder (not in the project, never in git), and never repeat them in chat.
- Tell the user where the file is: the password is for signing in at http://127.0.0.1:8090, and must be changed at the first sign-in.

"Refused: … already …" means the user name or company is already there: don't make it again. Ask the user for that company's Claude token, or make a new token for `velko.owner` on the screens (account menu › Claude tokens).

### 3. Connect Claude to the company

```sh
claude mcp add --transport http gamma-erp-velko http://127.0.0.1:8090/mcp --header "Authorization: Bearer <the GE_ token>"
```

This adds the connector `gamma-erp-velko` to the user's Claude configuration; the other connectors stay as they are. Pass the token from the credentials file without printing it.

A connector added during a session is often loaded only in a new session. **To carry on in the same run**, call the same MCP server over HTTP with a small script: a JSON-RPC `initialize`, then `notifications/initialized`, then `tools/call` with the tool's name and arguments, each a POST to `http://127.0.0.1:8090/mcp` with the headers `Authorization: Bearer <token>`, `Content-Type: application/json`, `Accept: application/json, text/event-stream`, and `Mcp-Session-Id` from the first answer. Keep the script and the token in the working folder. The tools, their checks and their answers are exactly those of the connector. Otherwise, tell the user to start a new chat and continue from the progress log.

### 4. Check, then insert the data

1. `list_workplaces` answers with the workplace `VELKOBRNO`; `tools/list` includes `save_register_row`, `produce`, `stay`, `book_seats` and `report`.
2. Follow "How to insert the sample data" below, from the first step not yet done (the status table and the progress log say which).
3. At the end, show the user: the address http://127.0.0.1:8090, the user name `velko.owner` and where the first password is, the users made (their passwords are in the same credentials file), and the end reports.

### To start again from scratch

Only on the user's explicit request, because it deletes every company in this local ERP: `docker compose down -v` in the `deploy` folder removes the containers and the database volumes. Then begin at step 1.

## How to insert the sample data

Every table in this plan is sample data to put into the ERP. These steps say how, for the Claude session that does it with the `gamma-erp-velko` connector. Everything is made up (names with "Demo", placeholder tax numbers): never use a real person's or company's data.

### Before the first step

1. Check the connector: `list_workplaces` must answer with the workplace `VELKOBRNO`, and the tool list must include `save_register_row`, `produce`, `stay`, `book_seats` and `report`. If they are missing, the ERP is older than v0.1.5-gamma: update it (`docker compose pull && docker compose up -d`), then reconnect the connector or start a new chat.
2. Step 0 makes the company on the server: it needs the user's yes first, because it can't be undone. Then the new connector is added and reloaded (section 4).
3. Read the guide pages named in section 2, and `read_configuration` for what the pack already has (VAT groups, document types, posting scenarios, point-of-sale settings). Use the pack's own rows wherever they fit; add only what is missing.
4. Open a progress log: a file `velko-progress.md` in the working folder. After every step, write what was made (each row's code and id), what was refused and why, and what is next. A new session reads it first and carries on from there.

### For each step

1. **Look first.** Before making a row, check that it isn't there already (`find_partners`, `find_products`, `find_cost_centers`, `get_register_row`, `register_setup`, `list_documents`). A row that exists is changed only if the plan says something different; it is never made twice.
2. **Show the table.** Show the user the step's rows exactly as they will be saved: codes, names, types, categories, VAT groups, prices, quantities, dates. Say which rows already exist and are only checked.
3. **Wait for the yes.** Call the changing tools with `confirm=true` only after an explicit yes for that step. One yes covers the whole table shown, not the next step.
4. **Make the rows in order, a few at a time.** Parents before children (company → places → tills; categories → types → products → recipes → prices). After each group, read the rows back and compare them with the table.
5. **When the ERP refuses,** stop that row, show the refusal word for word, and change nothing to work around it. If the plan was wrong (a wrong code, a missing parent), correct the plan's row, show it and ask again. If the ERP can't do it at all, add it to the "Missing / not possible" list and go on with the rest.
6. **Check the step.** Read the step's result with the read tools (`register_setup`, `get_register_row`, `calculate_production`, `pos_info`, `stock`, `trial_balance`…) and show a short summary: made, already there, refused. Write it to the progress log.

### Documents and postings

1. **Drafts first.** Make each week's documents as drafts (`save_draft_document`, the repairs board, `save_journal_sheet`), dated on their real day in October. Show the week as one table: each document's type, date, sides, lines and total, with the week's totals per type.
2. **Post after a yes.** Posting is final, and so are productions, unit splits, till payments, check-outs and seat bookings: say so before asking. Post in date order: purchases and production before the sales that use their stock, invoices before the payments against them.
3. **Check after posting.** After each week, show `stock` (nothing should be negative), `open_items`, and the trial balance up to that day (debit = credit). If something is off, stop and show it: a wrong posted document is corrected only by a reversal (`reverse_document`), after the user's yes.
4. **Never make the same document twice.** Before each document, check with `list_documents` (type, day, external number) that it isn't there already, for example after a lost connection.

### Amounts and dates

- Use the amounts in the plan's tables. Where a table gives a range (sales of a day, people at a show), choose values inside it, vary them from day to day so the weeks look real, and show them before making anything.
- Prices with "VAT incl." go on lines as the value with VAT; prices "excl. VAT" as the price. Round to cents; keep counts whole.
- Every document carries its own day in October 2026. The live items at the end (a shift, a stay, a seat booking, a repair job) are dated today on purpose.

### When it's done

1. Go through the status table (section 3): every step done, or listed as missing with its reason.
2. Show the reports of the "Reports to show at the end" section.
3. Finish the progress log with the final figures (revenue, costs, result, stock value, open items) and the "Missing / not possible" list.

## 3. Status

| Step | What | Status |
|---|---|---|
| 0 | Install if needed; make the company; connect `gamma-erp-velko` | To do: needs the user's yes |
| 1 | Company details, banks (CZK, EUR, USD), cash desk, warehouse, the trade counter with one till | To do |
| 2 | Users and roles (buyer, sales, approver), approval limits, document types, a token for the approver | To do |
| 3 | Partners (12) | To do |
| 4 | Categories, types (serials), the carton unit and its conversion | To do |
| 5 | Products: 14 | To do |
| 6 | Rates (EUR, USD) for December 2025 and January 2026; prices | To do |
| 7 | Opening on 1 December 2025 | To do |
| 8 | Simulation: 1–23 December 2025 | To do |
| 9 | Month end, the closed period, the year closing of 2025 | To do |
| 10 | January 2026: 5–9 January | To do |
| 11 | Reports | To do |

## 4. Step 0

Follow "Install the ERP and run everything in one go" above:

`create-company --company "Kancelář Demo Brno s.r.o." --code VELKOBRNO --country CZ --username velko.owner --activity GENERAL`

## 5. Step 1: places

| What | Code | Detail |
|---|---|---|
| Company details | VELKOBRNO | Kancelář Demo Brno s.r.o.; Křenová, 602 00 Brno, Česká republika; IČO 00000000, DIČ CZ00000000 (placeholders) |
| Bank CZK | BANK_CZK | "Banka – běžný účet CZK" |
| Banks EUR, USD | BANK_EUR, BANK_USD | Currency accounts |
| Cash desk | CASH_DESK0 | "Pokladna" |
| Warehouse | WH0 | "Sklad" |
| Trade counter, kind Shop, one till | POS_PULT0, TILL0 | "Prodejní pult" (trade counter) for walk-in businesses |

## 6. Step 2: users, approvals, hold

| User name | Name | Role | Place |
|---|---|---|---|
| velko.owner | Owner | Administrator | VELKOBRNO |
| velko.ucetni | Accountant (off-site) | Finance | VELKOBRNO |
| velko.nakup | Buyer (morning, 08:00–12:30) | Purchasing | VELKOBRNO |
| velko.prodej | Sales (afternoon, 12:30–17:00) | Sales, Cashier | VELKOBRNO, TILL0 |
| velko.schvalovatel | Approver (the operations manager) | Approver | VELKOBRNO |

The 4 workers: the buyer and the sales person (both users), and 2 warehouse workers (no user). The approver is the operations manager, a fifth person, part-time.

- **Approval limits** (`save_configuration_row` approval-limits, with VAT, CZK): Purchasing 50,000; Approver 250,000; above that only the administrator.
- **Types that need approval** (`document_type_settings`): purchase request and purchase order (the pack sets them; check).
- **Menus** (`set_role_access`): Purchasing: purchase requests, orders, purchase invoices, stock; Sales: offers, sales orders, sales invoices, the till; Approver: Approvals, and reading purchases; Finance: accounting, VAT, closed periods, year closing.
- **The approver's token** (to approve as that user): the administrator can't make another user's token, so sign in once as `velko.schvalovatel` on the screens (its first password from the credentials file), make a Claude token in the account menu, and add the second connector. If that isn't wanted, the owner approves (an administrator may), and approving as another user is listed as not tested.

## 7. Step 3: partners

| Name | Category | Currency | Payment days |
|---|---|---|---|
| Papierfabrik Demo GmbH (paper, Germany) | Suppliers | **EUR** | 30 |
| TechDistri Demo Inc. (laptops, printers, USA) | Suppliers | **USD** | 30 |
| Kancelářské potřeby Demo a.s. (office supplies, Czech) | Suppliers | CZK | 14 |
| Pronájem Demo s.r.o. (landlord) | Suppliers | CZK | 0 |
| Energie Demo a.s. (electricity) | Suppliers | CZK | 30 |
| Účetní kancelář Demo (accountant) | Suppliers | CZK | 30 |
| Základní škola Demo Brno (a school) | Clients | CZK | 30 |
| Advokátní kancelář Demo (a law office) | Clients | CZK | 14 |
| Strojírny Demo a.s. (a factory) | Clients | CZK | 30 |
| Městský úřad Demo (a town office) | Clients | CZK | 30 |
| Zubní ordinace Demo (a dental practice) | Clients | CZK | 14 |
| Účetní Demo s.r.o. (an accounting firm) | Clients | CZK | 14 |

## 8. Step 4: categories, types, units

| What | Proposal |
|---|---|
| Categories | Papír (paper), Kancelářské potřeby (office supplies), IT technika (IT equipment), Služby (services) |
| Types | Goods for paper and supplies; "IT zařízení" (laptops, printers: **tracks serial numbers**); "Služba" |
| Units | piece exists; **add "ream" (RIS, 500 sheets) and "carton" (KAR, 5 reams)**, with 1 KAR = 5 RIS for the paper |

## 9. Step 5: products

VAT (the Czech pack has 21 %, 12 %, 0 %): everything at 21 %.

| Code | Name | Unit | Cost | Price (excl. VAT) |
|---|---|---|---|---|
| PAP-A4 | Papír A4 80 g (copy paper) | RIS (bought by KAR) | EUR 3.10 per ream | 119 CZK per ream |
| PAP-A3 | Papír A3 80 g | RIS (KAR) | EUR 6.40 | 239 CZK |
| KAN-PER | Propisky, balení 50 (pens, 50) | piece | 210 CZK | 390 CZK |
| KAN-SEG | Pořadače (lever-arch files) | piece | 38 CZK | 79 CZK |
| KAN-SES | Sešívačka (stapler) | piece | 95 CZK | 189 CZK |
| KAN-TON | Toner černý (black toner) | piece | 980 CZK | 1,690 CZK |
| KAN-OBL | Obálky C4, 250 (envelopes, 250) | piece | 260 CZK | 449 CZK |
| IT-NB14 | Notebook 14" | piece | USD 410 | 13,490 CZK |
| IT-NB16 | Notebook 16" Pro | piece | USD 690 | 21,990 CZK |
| IT-TIS | Laserová tiskárna (laser printer) | piece | USD 160 | 5,490 CZK |
| IT-MON | Monitor 24" | piece | USD 105 | 3,690 CZK |
| IT-DOK | Dokovací stanice (docking station) | piece | USD 85 | 2,890 CZK |
| SLU-DOP | Doprava (delivery) | piece | – | 290 CZK (free over 5,000 CZK) |
| SLU-INS | Instalace notebooku (laptop set-up) | piece | – | 690 CZK |

## 10. Step 6: rates and prices

- `set_exchange_rates` for EUR and USD from 1 December 2025 to 9 January 2026 (one unit in CZK: EUR about 25.0–25.3, USD about 23.4–23.9), from the source the user names (e.g. the Czech National Bank's daily rate).
- Sale prices from 2025-12-01; the school and the town office get 8 % off (public clients), the factory 5 %.

## 11. Opening (1 December 2025)

A journal entry with the opening balances (or the Migration menu's opening step, if the user prefers): bank CZK 620,000, share capital −200,000, retained earnings −420,000. Then the first stock by purchase invoices dated 1 December: paper 60 KAR A4 and 10 KAR A3 (EUR), office supplies (CZK), 10 notebooks 14", 4 notebooks 16", 6 printers, 10 monitors, 8 docks (USD) with serial numbers (`NB14-2512-01`…, `NB16-2512-01`…, `TIS-2512-01`…, `MON-2512-01`…, `DOK-2512-01`…).

## 12. Simulation: 1–23 December 2025

### 12.1 Purchasing with approval

| Day | Document | Who | Approval |
|---|---|---|---|
| Wed 3 Dec | Purchase request: 40 KAR A4 paper (EUR, about 15,600 CZK) | Buyer | Under the buyer's limit: no wait |
| Wed 3 Dec | Purchase order from the request (`make_next_document`) | Buyer | Under the limit |
| Mon 8 Dec | Purchase order: 20 notebooks 14" + 10 monitors (USD, about 230,000 CZK with VAT) | Buyer | Over the buyer's 50,000: **waits**; `approvals` lists it; the approver approves it (with the approver's connector) |
| Wed 10 Dec | Purchase order: 15 notebooks 16" Pro (USD, about 300,000 CZK) | Buyer | Over the approver's 250,000: only the owner approves |
| on arrival | Purchase invoices from each order (`make_next_document`), in the currency, at the day's rate, laptops with serials | Owner | – |

### 12.2 Selling: offers, orders, invoices

| Client | Path |
|---|---|
| Základní škola Demo | Offer on 2 Dec (10 notebooks 14", 10 docks, set-up × 10), order on 5 Dec, invoice for 6 notebooks on 11 Dec (part delivery), the remaining 4 when the approved order arrives (17 Dec); 30 days |
| Strojírny Demo | A standing order: 30 RIS A4 every week (an order on 1 Dec, invoiced weekly by part), 30 days |
| Městský úřad Demo | Offer on 9 Dec (4 printers, 20 toners), lost to a cheaper bidder (the offer stays posted; no order) |
| Advokátní kancelář Demo | Order on 15 Dec (2 notebooks 16" Pro, set-up), invoiced 19 Dec, paid 23 Dec |
| Others | Direct invoices for supplies (pens, files, envelopes, toners), 2–3 a week |
| Trade counter | One bill a day on TILL0 for walk-in businesses (paper by the ream, small supplies) |

Paper sold by the ream comes from cartons split with `convert_stock` when the warehouse needs reams.

### 12.3 Document hold

On 16 Dec the sales person opens the school's draft invoice (`hold_document` hold, as velko.prodej); the owner tries to change it (`save_draft_document`): it is refused while held; the sales person lets it go (`hold_document` release) and the owner changes it. (With one connector, show the hold with `hold_document` holder, and the refusal if the screens hold it.)

### 12.4 Payments

- Pay the paper maker (EUR) from BANK_EUR and the US distributor (USD) from BANK_USD on 22 Dec, against each invoice number, at that day's rate: the exchange difference is booked.
- Clients pay at their terms; the school's and the factory's invoices are open at year end.

## 13. Year end

1. **31 December 2025:** recurring cost sheet (rent 38,000, electricity 6,500, accountant 9,000 CZK) and wages (5 × 42,000 CZK = 210,000 CZK as one journal entry); depreciation if any assets were bought (none in this plan).
2. **A closed period:** close December up to 31 December 2025 (`save_configuration_row` closed-periods / posting lock), then try to post a late invoice dated 30 December: it is refused. Undo the lock only if the user asks.
3. **The year closing of 2025** (`year_closing` check on 31 Dec 2025: drafts left, debit and credit; then close, after a yes: final). Before closing, post or switch off every December draft.
4. After closing, try a reversal dated in 2025: it is refused (the year is closed). Show it.

## 14. January 2026 (5–9 January)

- The payment sheet for December's bills (5 January 2026), repeated from the recurring sheet.
- Rates for January; the school pays its December invoice in January (a receipt against the invoice number).
- A purchase order for paper (under the limit), a sales order from the factory, the trade counter's bills.
- The opening balances of 2026 come from the closing: show the trial balance on 9 January 2026 (opening = 2025's closing).

## 15. Reports to show at the end

| Report | Tool |
|---|---|
| Trial balance and profit and loss for December 2025; balance sheet on 31 December 2025 and on 9 January 2026 | report tools |
| Purchase requests, orders, approvals: who approved what, and when | `list_documents`, `approvals`, `document_details` history, `audit` |
| Sales: offers won and lost, orders invoiced in part, open orders | `list_documents`, `document_details` made |
| Serial numbers: which laptop went to which client | `lots_and_serials` |
| Paper: cartons bought, reams sold | `stock`, `report` item-tracking |
| EUR and USD: purchases, payments, exchange differences | `account_ledger`, `exchange_rates` |
| The year closing: the check, the closed year, the refused late postings | `year_closing` check, the progress log |
| User activity: each user's documents and changes | `audit` activity and rows |
| Open items, the VAT return for December 2025 | `open_items`, `vat_return` |

## 16. Missing / not possible

| What | What is done instead |
|---|---|
| A buyer's reorder suggestions (minimum stock) | The buyer reads `stock` and orders by hand |
| A supplier price list in foreign currency per supplier | The price is typed on each purchase line |
| Approving as a second user without that user's own sign-in | The approver's own token (made by that user), or the administrator approves |
| Czech EET / e-invoicing (ISDOC) and the control statement (kontrolní hlášení) | Check the guide; list it if missing |
| Payroll | One journal entry |
