# Peixaria Demo Matosinhos: 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 fish shop (peixaria) in Matosinhos, next to Porto, Portugal, in the local Gamma ERP, through Claude and a connector for the shop's own company. It follows the same logic as the other plans: one step at a time, a table before every change, a yes before every change and before every posting.

What is different in a fish shop:
- **Fresh fish is bought every morning** at the fish auction (lota) and from a wholesaler, and sold by the kilo.
- **Whole salmon and hake are taken apart** with a **disassembly**: a whole fish goes out of stock, and fillets or steaks (and the head and bones for soup) come in, each by its recovered %. The rest is waste, at the average cost.
- **Every fresh fish carries the EU label data** as properties of its product: scientific name, FAO catch area, wild or farmed, and fishing gear. Each product shows them, so the label can be printed from them.
- **Salted cod (bacalhau) and frozen fish are tracked by lot** with an expiry date. Fresh fish can't carry lots, because the ERP refuses lots on anything taken apart.
- **A restaurant buys every day on invoice** (30 days), so open client invoices show up.

## 1. Where it runs

| Item | Value |
|---|---|
| ERP screens | http://127.0.0.1:8090 (also http://localhost:8090) |
| Claude connector (new) | `gamma-erp-peixe` → `http://127.0.0.1:8090/mcp`, signed in as `peixe.owner` |
| Other connectors | Don't use any other Gamma ERP connector you may have (another company's) |
| Database | PostgreSQL on 127.0.0.1:5433, database `gamma_erp` |
| Company | Peixaria Demo Matosinhos, code `PEIXEMAT`, Portuguese pack, currency EUR |
| Credentials | `peixe-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-peixe__*` tools (or the same server over HTTP, see the install section).
2. Call `list_workplaces` first. The workplace must be `PEIXEMAT`.
3. Before every change, show a table of exactly what will be created and wait for a yes. Only then call the tool with `confirm=true`.
4. Posting and reversing are final. Disassemblies and till payments post at once, and a disassembly is never reversed. Say so before asking.
5. Nothing is deleted: a wrong row is switched off and corrected.
6. Read the guide instead of guessing (`gamma-erp://guide/README.md`, then stock (disassembly, recipes, lots), point-of-sale (shop, paying, shifts), documents (payments and open invoices), types and categories (properties), accounting and users-and-rights).
7. Use only what the ERP supports. When something can't be done, don't work around it: add it to the "Missing / not possible" list (section 16) and carry on.
8. Show draft documents in groups (one week at a time) and post them only after a yes.
9. The Portuguese chart keeps its account names in Portuguese. Product and partner names are in Portuguese, with the English in brackets in the tables shown to the user.

## 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 "Peixaria Demo Matosinhos" --code PEIXEMAT --country PT --username peixe.owner --activity GENERAL
```

It prints three lines: `Company … made, … configuration rows loaded. peixe.owner is its administrator.`, then `First password: …` and `First Claude token: GE_…`. Both secrets are shown only once:
- Save them in `peixe-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 `peixe.owner` on the screens (account menu › Claude tokens).

### 3. Connect Claude to the company

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

This adds the connector `gamma-erp-peixe` 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 `PEIXEMAT`; `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 `peixe.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-peixe` 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 `PEIXEMAT`, 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 `peixe-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 the ERP if needed, make the company with `create-company`, connect `gamma-erp-peixe` | To do: needs the user's yes (the company can't be undone) |
| 1 | Company details, bank, cash desk, the shop, the cold room, two tills, settings | To do |
| 2 | Users, roles, menus, rights, "bills need an open shift" = No | To do |
| 3 | Partners (9) | To do |
| 4 | Product categories and types, with the label properties; lots on salted and frozen fish | To do |
| 5 | Products: 10 fresh fish, 2 whole fish to take apart, 3 cuts, 4 salted and frozen, 2 packaging | To do |
| 6 | The disassembly recipes (salmon, hake) | To do |
| 7 | Sale prices, the restaurant's prices, the till's menu | To do |
| 8 | Opening: capital, till float, first stock of salted and frozen fish | To do |
| 9 | Simulation, weeks 1 and 2 | To do |
| 10 | Month end, with the recurring cost and payment sheets | To do |
| 11 | Reports | To do |

## 4. Step 0: the new company

Follow "Install the ERP and run everything in one go" above: it installs the ERP if it isn't running, and makes the company with:

`create-company --company "Peixaria Demo Matosinhos" --code PEIXEMAT --country PT --username peixe.owner --activity GENERAL`

Activity GENERAL loads the whole Portuguese pack (chart, documents, posting rules, VAT, disassembly, lots, the till, stock).

## 5. Step 1: company, money and places

| What | Code | Detail |
|---|---|---|
| Company details (`set_company_details`) | PEIXEMAT | Trade name Peixaria Demo; address Rua Brito Capelo, 4450 Matosinhos, Portugal; NIF 500000000 (placeholder); phone and e-mail placeholders |
| Bank account (`add_cost_center`, BANK) | BANK0 | "Banco – conta à ordem" (current account), EUR, on the pack's bank account |
| Cash desk (`add_cost_center`, CASH_DESK) | CASH_DESK0 | "Caixa da loja" (shop cash desk), EUR, on the pack's cash account |
| The shop, a point of sale of kind Shop (`add_cost_center`, POS_SHOP) | POS_PEIXE0 | "Peixaria Demo – Rua Brito Capelo": the fish on ice at the counter |
| Cold room (WAREHOUSE) | WH_FRIO | "Câmara frigorífica" (cold room and freezer): salted cod, frozen fish, and the whole salmon before cutting |
| Morning till (TILL) | TILL0 | "Caixa manhã (07:00–13:30)" (morning till), under the shop |
| Afternoon till (TILL) | TILL1 | "Caixa tarde (13:30–19:30)" (afternoon till), under the shop |
| The shop's point-of-sale settings (`save_configuration_row`) | – | Screen Shop; cash desk = Caixa da loja; walk-in client = the general client; payment method Cash (Multibanco card often) |

Open Tuesday to Saturday 07:00–19:30 in two shifts, Sunday 07:00–13:00 (morning only), closed on Monday (no auction on Monday).

## 6. Step 2: users, roles and access

### 6.1 Users (`add_user`)

| User name | Name | Role | Place |
|---|---|---|---|
| peixe.owner | Owner (made in step 0) | Administrator | PEIXEMAT |
| peixe.contabilista | Accountant (contabilista certificado, off-site) | Finance | PEIXEMAT |
| peixe.caixa.manha | Seller, morning | Cashier | TILL0 |
| peixe.caixa.tarde | Seller, afternoon | Cashier | TILL1 |

Passwords are generated, saved to `peixe-credentials.txt` and changed at the first sign-in.

The 4 workers, 2 per shift:
- Morning 07:00–13:30: 1 seller (POS: weighs and bills) + 1 fishmonger (scales, guts and cuts the fish, fills the ice).
- Afternoon 13:30–19:30: 1 seller (POS) + 1 fishmonger (also delivers to the restaurant, cleans the counter).

Only the two sellers use the ERP. Users are not employees: never link them. The owner isn't one of the 4 workers, takes no wage, buys at the auction at dawn, and records the purchases and the disassemblies in the ERP.

### 6.2 Menus and rights (`role_access`, then `set_role_access`)

| Role | Menu | Rights |
|---|---|---|
| Finance | Dashboard; Documents › Purchases, Sales, Cash desk, Bank, Journal, Recurring journal, Reversals; Reports › Trial balance, Profit and loss, Balance sheet, Account ledger, Client and supplier ledger, Open invoices, Ageing, VAT books, VAT return, VAT return by boxes | Documents of those categories: read all, write. Clients and suppliers: read all. No till, no products, no prices |
| Cashier | Point of sale, POS shifts | Documents: Sales, Cash desk (read own, write) |

### 6.3 Document types and the till setting

- `set_document_type_users`: give role Finance the purchase invoice, sales invoice, supplier payments and client receipts (bank and cash), journal entry, the recurring journal sheet (FKR) with its row type, and their reversal types. Read the codes with `document_types` first.
- `save_configuration_row`: the shop's setting "Bills need an open shift" = No, because back-dated October bills can't have a shift. One live shift is shown at month end.

## 7. Step 3: partners (`register_setup`, then `save_register_row`, register `partners`)

| Name | Category | Payment days | NIF (placeholder) | Supplies / buys |
|---|---|---|---|---|
| Lota Demo Matosinhos (the fish auction) | Suppliers | 7 | 500000001 | Sardines, horse mackerel, hake, octopus, squid, sea bream, sea bass: every morning, Tuesday to Saturday |
| Pescado Demo Importação Lda (fish wholesaler) | Suppliers | 15 | 500000002 | Whole salmon (twice a week), prawns, clams |
| Bacalhau Demo SA (salted and frozen fish) | Suppliers | 30 | 500000003 | Salted cod, frozen prawns, frozen hake fillets: by lot |
| Embalagens Demo Lda (packaging) | Suppliers | 30 | 500000004 | Bags, wrapping paper |
| Imobiliária Demo Matosinhos Lda (landlord) | Suppliers | 0 | 500000005 | Rent €1,500/month |
| Energia Demo SA (electricity) | Suppliers | 30 | 500000006 | Electricity about €600/month (the cold room, freezer, ice machine, display) |
| Águas Demo Matosinhos (water) | Suppliers | 30 | 500000007 | Water about €90/month |
| Contabilidade Demo Lda (accountant) | Suppliers | 30 | 500000008 | Fee €200/month |
| Restaurante Demo do Porto Lda (a restaurant) | Clients | 30 | 500000009 | Fish every day except Monday, invoiced weekly |

Counter sales go to the company's general client.

## 8. Step 4: categories, types and the label properties

| What | Proposal |
|---|---|
| Product categories | Peixe fresco (fresh fish), Peixe para cortar (whole fish to take apart), Filetes e postas (fillets and steaks), Bacalhau e congelados (salted cod and frozen), Embalagens (packaging) |
| Product types | "Peixe fresco" (unit kg, VAT 6 %, no lots, with the label properties); "Peixe congelado" (unit kg or piece, VAT 6 %, **tracks lots**, an expired lot can't go to a client, with the label properties); Goods for packaging |
| Units | kg and piece exist |

**Label properties** on the types "Peixe fresco" and "Peixe congelado" (`save_register_type` with `properties`):

| Property | Code | Kind | Choices |
|---|---|---|---|
| Nome científico (scientific name) | SCIENTIFIC_NAME | Text | – |
| Zona de captura FAO (FAO catch area) | FAO_AREA | List | 27 Atlântico Nordeste, 34 Atlântico Centro-Este, 37 Mediterrâneo, 41 Atlântico Sudoeste, 61 Pacífico Noroeste |
| Método de produção (production method) | METHOD | List | Capturado no mar (caught at sea), Aquicultura (farmed) |
| Arte de pesca (fishing gear) | GEAR | List | Redes de cerco (seine nets), Redes de arrasto (trawls), Redes de emalhar (gillnets), Anzóis e palangres (hooks and lines), Armadilhas (pots and traps), – (farmed) |

## 9. Step 5: products (`save_register_row`, register `products`)

### 9.1 VAT (the Portuguese pack has 23 %, 13 %, 6 % and 0 %)

| Goods | Expected rate |
|---|---|
| Fresh, salted and frozen fish and seafood (bought and sold) | 6 % |
| Bags, wrapping paper | 23 % |
| Rent, electricity, accountant | 23 % (rent: only if the landlord opted for VAT, else exempt: confirm) |
| Water | 6 % |

Show the user which VAT group each product gets before saving.

### 9.2 Fresh fish (category Peixe fresco, type Peixe fresco, unit kg), with the label values

| Code | Name | Cost per kg (excl. VAT) | Price per kg (VAT incl.) | Scientific name | FAO area | Method | Gear |
|---|---|---|---|---|---|---|---|
| FRE-SAR | Sardinha (sardines) | €3.50 | €7.90 | Sardina pilchardus | 27 | Caught at sea | Seine nets |
| FRE-CAR | Carapau (horse mackerel) | €3.00 | €6.90 | Trachurus trachurus | 27 | Caught at sea | Seine nets |
| FRE-ROB | Robalo (sea bass) | €8.00 | €15.90 | Dicentrarchus labrax | 27 | Farmed | – |
| FRE-DOU | Dourada (sea bream) | €7.00 | €13.90 | Sparus aurata | 27 | Farmed | – |
| FRE-POL | Polvo (octopus) | €9.00 | €16.90 | Octopus vulgaris | 27 | Caught at sea | Pots and traps |
| FRE-LUL | Lulas (squid) | €8.50 | €15.50 | Loligo vulgaris | 27 | Caught at sea | Trawls |
| FRE-CAM | Camarão fresco (prawns) | €14.00 | €24.90 | Penaeus kerathurus | 34 | Caught at sea | Trawls |
| FRE-AME | Amêijoa (clams) | €9.00 | €16.00 | Ruditapes decussatus | 27 | Farmed | – |
| FRE-PES | Pescada inteira (whole hake, sold whole) | €6.50 | €12.90 | Merluccius merluccius | 27 | Caught at sea | Trawls |
| FRE-SAL | Salmão inteiro (whole salmon, sold whole) | €9.50 | €15.90 | Salmo salar | 27 | Farmed | – |

### 9.3 Whole fish to take apart and their cuts (unit kg)

The shop keeps a separate whole fish for cutting, so the counter's whole fish and the fish taken apart don't mix:

| Code | Name | Category | Cost (excl. VAT) | Price per kg (VAT incl.) |
|---|---|---|---|---|
| COR-SAL | Salmão para filetar (salmon to fillet) | Peixe para cortar | €9.50 | – (taken apart) |
| COR-PES | Pescada para postas (hake to cut into steaks) | Peixe para cortar | €6.50 | – (taken apart) |
| FIL-SAL | Filete de salmão (salmon fillet) | Filetes e postas | (from the disassembly) | €22.90 |
| FIL-SCB | Cabeça e espinha de salmão (salmon head and bones, for soup) | Filetes e postas | (from the disassembly) | €3.50 |
| FIL-PPO | Posta de pescada (hake steak) | Filetes e postas | (from the disassembly) | €14.90 |

Each cut carries the label values of its fish (Salmo salar / 27 / farmed; Merluccius merluccius / 27 / trawls).

### 9.4 Salted cod and frozen fish (category Bacalhau e congelados, type Peixe congelado, tracked by lot)

| Code | Name | Unit | Cost (excl. VAT) | Price (VAT incl.) | Expiry after delivery |
|---|---|---|---|---|---|
| CON-BAC | Bacalhau graúdo (salted cod, large) | kg | €11.00 | €18.90 per kg | 9 months |
| CON-BAM | Bacalhau demolhado congelado (soaked frozen cod, 1 kg) | piece | €7.50 | €12.90 | 12 months |
| CON-CAM | Camarão congelado 1 kg (frozen prawns) | piece | €9.00 | €15.90 | 12 months |
| CON-FPE | Filetes de pescada congelados 400 g (frozen hake fillets) | piece | €3.20 | €5.95 | 12 months |

Label values: Gadus morhua / 27 / caught at sea / trawls for the cod; Penaeus vannamei / 61 / farmed for the prawns; Merluccius hubbsi / 41 / caught at sea / trawls for the hake fillets. Each delivery is a lot `<code>-<delivery date>` with its expiry date (`lot` and `lotExpiry` on the purchase line); a sale takes the earliest expiry first.

### 9.5 Packaging

| Code | Name | Unit | Cost (excl. VAT) | Price (VAT incl.) |
|---|---|---|---|---|
| EMB-SAC | Saco de plástico (plastic bag, charged by law) | piece | €0.05 | €0.10 |
| EMB-PAP | Papel de embrulho (wrapping paper) | piece | €0.02 | – (not charged; booked as a cost when bought) |

## 10. Step 6: the disassembly recipes (`save_configuration_row`, model `product-recipes`)

A disassembly reads a product's recipe backwards: each ingredient comes back by its quantity × the recovered %, and what is not recovered is waste, at the average cost. Per **1 kg** of whole fish:

| Whole fish | Comes back | Quantity | Recovered % |
|---|---|---|---|
| Salmão para filetar (COR-SAL) | Filete de salmão (FIL-SAL) | 0.55 kg | 100 |
| | Cabeça e espinha de salmão (FIL-SCB) | 0.20 kg | 100 |
| | (the remaining 25 % is skin, guts and trim: waste) | – | – |
| Pescada para postas (COR-PES) | Posta de pescada (FIL-PPO) | 0.70 kg | 100 |
| | (the remaining 30 % is head, bones and guts: waste) | – | – |

Check with `calculate_production` (disassemble=true, 10 kg) and show what comes back and what is lost.

## 11. Step 7: prices and the till's menu

1. Sale prices (`save_configuration_row`, the sale-price model; read its columns first): every product's price per kg or per piece, VAT included, from 2026-10-01. Fresh fish prices change with the auction: on a day the auction is dear, change the line's price on the bill rather than the price list.
2. The restaurant's prices (sale prices for the client Restaurante Demo do Porto, excl. VAT): sea bass €12.50/kg, sea bream €11.00/kg, octopus €13.50/kg, hake steaks €12.00/kg, salmon fillet €18.50/kg.
3. The till's sale menu: one menu for the shop, open 07:00–19:30, in groups Peixe fresco, Marisco (seafood), Filetes e postas, Bacalhau e congelados, and Sacos. Both tills use it.
4. Check with `unpaid_pos_bills` on TILL0 that the shop's settings show nothing missing.

## 12. Opening (13 October)

| Document | Detail |
|---|---|
| Owner's capital | €10,000 into the bank (bank receipt against the owner's capital account of the Portuguese chart) |
| Till float | €150 from the bank into Caixa da loja |
| First stock of salted and frozen fish (purchase invoice, Bacalhau Demo, into the cold room, with lots and expiry) | Salted cod 40 kg, soaked frozen cod 30, frozen prawns 25, frozen hake fillets 40 |
| Packaging (Embalagens Demo) | Bags 1,000, wrapping paper 2,000 |

## 13. Simulation

Period: **Tuesday 13 to Sunday 25 October 2026** (the shop is closed on Mondays), month end on 31 October. Check first that October 2026 is not a closed period.

### 13.1 Every morning (Tuesday to Saturday): buying and cutting

1. **Auction purchase** (purchase invoice, Lota Demo, into the shop), what the day will sell, e.g. on a weekday: sardines 15 kg, horse mackerel 10 kg, hake to sell whole 12 kg, hake to cut 15 kg, octopus 8 kg, squid 6 kg, sea bream 10 kg, sea bass 10 kg. About 50 % more on Friday and Saturday. Saturday also buys for Sunday.
2. **Wholesaler** (Pescado Demo, Tuesday and Friday): salmon to fillet 20 kg, whole salmon to sell whole 8 kg, prawns 6 kg, clams 8 kg.
3. **Disassembly** (`calculate_production` disassemble=true, then `produce` disassemble=true at the shop): the day's hake to cut into steaks; on Tuesday and Friday the salmon into fillets and head and bones. Posted at once and never reversed: show the week's disassemblies first.

### 13.2 Every day: counter sales and the restaurant

1. One bill per till per day (`save_draft_document` with the shop's bill type; from the till, to the general client), then `post_document`, then `pay_pos_bills` (Multibanco card and cash) on the same till. Quantities in kg with two decimals, as weighed.

| Day | Total sales (VAT incl.) | Morning (TILL0) | Afternoon (TILL1) |
|---|---|---|---|
| Tuesday–Friday | €700–1,100 | about 70 % | about 30 % |
| Saturday | €1,500–2,200 | about 65 % | about 35 % |
| Sunday | €900–1,300 | 100 % | – |

The mix by revenue: fresh fish 55 % (sardines and horse mackerel the most kilos, sea bass and sea bream the most money), seafood (octopus, squid, prawns, clams) 20 %, fillets and steaks 15 %, salted cod and frozen 9 %, bags 1 %. A day never sells more of a fresh fish than was bought and cut: keep the kilos sold below the stock.

2. **The restaurant:** each day except Monday, a delivery note's worth of fish (sea bass 3 kg, sea bream 3 kg, octopus 2 kg, hake steaks 2 kg, salmon fillet 1.5 kg, varied) on a weekly **sales invoice** to Restaurante Demo do Porto at its prices, dated Saturday, 30 days. Both October invoices stay open.

Bills are written by Claude as the owner, not as the sellers.

### 13.3 Unsold fresh fish

Fresh fish left in the evening is sold the next morning at a lower price on the bill's line. What can't be sold any more stays in stock: the ERP has no write-off document (section 16). Keep the daily purchases close to the day's sales, so little is left.

### 13.4 Supplier payments

- The auction (7 days) is paid every Tuesday for the week before, by hand from the bank, **each payment against one invoice by its number**.
- The wholesaler (15 days): the first week's invoices are paid on 27 October; the rest stay open.
- Bacalhau Demo and the packaging firm (30 days): open in October.

### 13.5 Approval

Show each week's drafts as one group: purchases, disassemblies, 12 bills, the restaurant's invoice, payments, with totals. Post only after a yes.

## 14. Month end (31 October)

The fixed monthly bills (rent, electricity, water, the accountant's fee) run on **two recurring journal sheets**: one books the costs at month end, the other pays them a few days later. Both are repeated each month with `repeat_document`, and each repeat is posted only on a yes. Nothing runs by itself.

1. **Recurring cost sheet**, 31 October 2026 (`save_journal_sheet`, type FKR, row type GJR, place PEIXEMAT):

| Row | Debit | Credit |
|---|---|---|
| Renda (rent, Imobiliária Demo Matosinhos) | Rent expense €1,500 | Supplier Imobiliária Demo Matosinhos €1,500 |
| Eletricidade (electricity, Energia Demo) | Electricity expense €600 | Supplier Energia Demo €600 |
| Água (water, Águas Demo Matosinhos) | Water expense €90 | Supplier Águas Demo Matosinhos €90 |
| Contabilidade (accountant, Contabilidade Demo) | Professional fees €200 | Supplier Contabilidade Demo €200 |
| **Total** | **€2,390** | **€2,390** |

Use the Portuguese chart's accounts (names in Portuguese). VAT on these bills: if the sheet can't carry VAT, the four costs go in as purchase invoices instead and are paid one by one against each invoice number, not on a sheet. Decide with the user.

2. **Recurring payment sheet**, 5 November 2026 (`save_journal_sheet`, type FKR, row type GJR, place PEIXEMAT): October's bills paid from the bank.

| Row | Debit | Credit |
|---|---|---|
| Rent paid | Supplier Imobiliária Demo Matosinhos €1,500 | Banco – conta à ordem €1,500 |
| Electricity paid | Supplier Energia Demo €600 | Banco – conta à ordem €600 |
| Water paid | Supplier Águas Demo Matosinhos €90 | Banco – conta à ordem €90 |
| Accountant paid | Supplier Contabilidade Demo €200 | Banco – conta à ordem €200 |
| **Total** | **€2,390** | **€2,390** |

These rows clear each supplier's balance; they name no invoice, because the costs are sheet rows, not invoices.

3. **Repeat for November** (`repeat_document`, `post=false` for both): the cost sheet on 30 November 2026 and the payment sheet on 5 December 2026. Show both copies, and post them only on a yes. Change an amount on a copy (e.g. the real electricity bill) with `save_journal_sheet` before posting.
4. **Wages** of the 4 workers: one journal entry, 4 × €1,000 = €4,000 (wages expense against the bank), not payroll.
5. **Stock count:** the ERP has no stock count document. Show the `stock` report (the shop and the cold room: fresh fish and cuts in kg, salted and frozen by lot, packaging, with value) as the count, and list it as missing. Show the lots with `lots_and_serials` (kind lot, stock).
6. **Live, on today's date:** open a shift on TILL0 with `pos_shift` (€150 in the drawer) and close it with the cash counted.

Note: two weeks of sales against a full month of costs and wages may show a loss. If the user wants, put 50 % of the month's costs and wages instead. The payment sheet is dated 5 November, so October's balance sheet still shows the four bills as owed.

## 15. Reports to show at the end

| Report | Tool | Period |
|---|---|---|
| Trial balance | `trial_balance` | 1–31 October 2026 |
| Profit and loss | `profit_and_loss` | 1–31 October 2026 |
| Balance sheet | `balance_sheet` | 31 October 2026 |
| Stock in the shop and the cold room, with value (fish in kg, frozen by lot) | `stock`, `lots_and_serials` | 31 October |
| Sales by fish, in kg and euros | `sales_lines` (sales, by product) | 13–25 October |
| The disassemblies: whole fish in, fillets and steaks out, waste, and the cost per kg of a fillet | The Disassembly documents (`list_documents`, `get_document`) | 13–25 October |
| Gross margin per fish and per cut | Sales lines against the purchase prices and the cuts' cost | 13–25 October |
| Bought vs sold per fresh fish (what was left over) | `report` item-tracking per fish | 13–25 October |
| Sales by shift (morning vs afternoon) | `sales_lines` by place (TILL0 vs TILL1) | 13–25 October |
| The label data of each fish (scientific name, FAO area, method, gear) | `get_register_row` per product | – |
| Open client invoices (the restaurant) and open supplier invoices | `open_items` | 31 October |
| Suppliers' balances for the monthly bills (owed on 31 October, zero after 5 November) | `account_ledger` on the supplier account | 31 October and 5 November |
| VAT return (6 % and 23 %) | `vat_return` | October 2026 |
| Missing / not possible | Section 16 | – |

## 16. Missing / not possible

| What | What is done instead |
|---|---|
| Writing off fish that can't be sold any more | The pack has no write-off document: it stays in stock and shows in the stock report; ask the user, as for the flower shop (leave it, or a goods transfer to a place "Abate") |
| Lots on fresh fish | The ERP refuses lots on what is taken apart; only salted and frozen fish track lots |
| Buying at the auction (bids, the auction's fees and the fishermen's sale notes) | Each morning's purchase is one invoice from the auction at the price paid |
| Printing the EU fish label at the counter | The label data are on each product; printing labels is not in the ERP |
| A scale linked to the till | Weights are typed on the bill (kg, two decimals) |
| A stock count document | The `stock` report at month end is shown as the count |
| Opening a till shift on a past date | "Bills need an open shift" = No; one live shift is shown with `pos_shift` |
| Documents written as the sellers | Claude writes them as the owner; the tills separate the shifts |
| Portuguese certified invoicing software (ATCUD, SAF-T PT, the QR code on receipts) | Check the guide. If the ERP has none, the simulated bills are not certified Portuguese invoices; list it |
| Payroll | Wages are one journal entry |

## 17. Order of work and approvals

| # | Step | Tools | Approval |
|---|---|---|---|
| 0 | Install if needed, new company and connector | `docker compose`, `create-company`, `claude mcp add` | Yes first (the company can't be undone) |
| 1 | `list_workplaces` = PEIXEMAT, company, bank, cash desk, shop, cold room, tills, settings | `set_company_details`, `add_cost_center`, `save_configuration_row` | One yes for section 5 |
| 2 | Users, menus, rights, till setting | `add_user`, `set_role_access`, `set_document_type_users`, `save_configuration_row` | One yes for section 6 |
| 3 | Partners | `register_setup`, `save_register_row` | One yes for section 7 |
| 4 | Categories, types, the label properties, lots on frozen | `save_register_category`, `save_register_type` | One yes for section 8 |
| 5 | 21 products with VAT and their label values | `save_register_row` | One yes for section 9, with the VAT groups named |
| 6 | The two disassembly recipes, checked | `save_configuration_row`, `calculate_production` | One yes for section 10 |
| 7 | Prices, the restaurant's prices, the till's menu | `save_configuration_row` | One yes |
| 8 | Opening and the first stock | `save_draft_document`, `post_document` | Yes before posting (final) |
| 9 | Week 1, then week 2: auction and wholesaler purchases, disassemblies, bills, the restaurant's invoice, payments | `save_draft_document`, `produce` (disassemble), `post_document`, `pay_pos_bills` | Yes per week before posting (final) |
| 10 | Month end: cost sheet (31 Oct), payment sheet (5 Nov), their November repeats (not posted), wages, stock and lots, one live shift | `save_journal_sheet`, `repeat_document`, journal, `stock`, `lots_and_serials`, `pos_shift` | Yes before posting each sheet, each repeat and each journal |
| 11 | Reports and the missing list | report tools | – |
