From 2dc719e55be4bb30682678d3550585ba07ad1c3e Mon Sep 17 00:00:00 2001 From: Priec Date: Tue, 21 Jul 2026 22:20:20 +0200 Subject: [PATCH] money --- invoice-print-setup.md | 44 ++++++++++++++++++++++++++++++++++++++++++ server | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/invoice-print-setup.md b/invoice-print-setup.md index 98813f5..14b254e 100644 --- a/invoice-print-setup.md +++ b/invoice-print-setup.md @@ -448,3 +448,47 @@ typst compile \ The client currently exports the API-backed JSON and saves the document snapshot, but it does not invoke the Typst compiler itself. + +## Deterministic five-person company simulation + +The repository also contains a standalone bootstrap that creates a separate +`small_company_2026` profile, installs its Steel calculations, and pushes all +fixture rows through the same gRPC APIs used by the client: + +```text +server/scripts/bootstrap_small_company.py +``` + +It expects the existing passwordless users `admin` and `filipko`. The admin +token is used only for table definitions and scripts. The accountant token is +used for every business-row insert. + +Preview the scope without contacting the server: + +```bash +python3 server/scripts/bootstrap_small_company.py --dry-run +``` + +Create and populate the profile: + +```bash +python3 server/scripts/bootstrap_small_company.py +``` + +If a run stops after creating some objects, resume from its checkpoint: + +```bash +python3 server/scripts/bootstrap_small_company.py --resume +``` + +The checkpoint defaults to `small_company_2026.bootstrap-state.json`. It +contains table IDs, script IDs, and inserted row IDs, but no access tokens or +passwords. The bootstrap does not delete an existing profile. If the profile +already exists without its matching checkpoint, it stops instead of modifying +unknown data. + +The fixed scenario includes five employees, customers, suppliers, products, +CRM leads, sales orders, invoices and partial payments, purchase orders, +supplier invoices, stock movements and positions, expenses, and service time +entries. It verifies parent totals, outstanding balances, and stock values by +reading the rows back after insertion. diff --git a/server b/server index 33db98c..d32d24d 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 33db98ce94e45c5c1b5ef8051e96420f3e033a6a +Subproject commit d32d24d447f1999b0a7fb4da75745ebba5aae63f