Specify phase 5: stock accounting and machines

Mark finished phase 1 and 2 items in the specification, and add
chapter 19 for phase 5: stock items, purchases at moving average
cost, consumption, stock counts, machines (printers, label cutters)
with work lists, counters and maintenance logged by the machine's
user, and a touch-screen machine console. Open questions move to
chapter 20 with new questions for phase 5.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
2026-11-26 07:09:51 +02:00
co-authored by Claude Sonnet 5.5
parent bc3dbf16a4
commit 42b470d01c
2 changed files with 128 additions and 25 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ An ERP / work-management system (*toiminnanohjausjärjestelmä*) for a small (5
- **The specification is `docs/maarittely.md`** (Finnish). It defines roles and the permission table, money visibility, customers, customer jobs (*asiakastyö*) with fields and enum keys, Kanban, tasks, time entries, expenses, the service unit → service → work type hierarchy and pricing, Fennoa billing export, the data model, the phases with phase 1 in detail, and open questions. Read it before designing any domain feature. `määrittely.txt` is the original description with the customer's answers to questions 1–53, referenced as *(K12)* in the spec.
- **Language rule:** code (identifiers, tables, columns, enum keys) is in English; the specification is in Finnish. The UI is in Finnish (default) and English: every UI string lives in `lang/fi/*.php` **and** `lang/en/*.php` with the same keys and placeholders (`tests/Unit/TranslationFilesTest.php` fails otherwise). Number, money and date formats stay Finnish in both languages; the quick sale receipt is always Finnish.
- **Language choice:** a user's language is `users.locale` (`Users\Domain\Enums\Locale`), changed in the profile menu (`resources/views/components/profile-menu.blade.php`, which also holds the theme radios and logout) through `POST /locale` (`SwitchLocaleController` → `ChangePreferredLocale`). Signed-out pages keep it in the session (`partials/locale-switch.blade.php`). The `SetLocale` web middleware applies the account's language, then the session's, then `APP_LOCALE`; `User` implements `HasLocalePreference`, so emails go out in the user's language.
- **Build in phases, not all at once** (spec chapter 15). (1) auth and users, customers with contacts and billing units, service units/work types, customer jobs, mobile quick intake, job Kanban, basic tasks, time entries on tasks with a weekly view; (2) pricing and products, money fields and visibility, expenses, hour approval and locking, Fennoa CSV/Excel export, quick sales; (3) task columns, checklists, comments, images, workflow templates, calendar; (4) subcontractor views, reports, notifications, Fennoa API, and last the simplification of job fields per service unit (K31, moved from phase 3).
- **Build in phases, not all at once** (spec chapter 15). (1) auth and users, customers with contacts and billing units, service units/work types, customer jobs, mobile quick intake, job Kanban, basic tasks, time entries on tasks with a weekly view; (2) pricing and products, money fields and visibility, expenses, hour approval and locking, Fennoa CSV/Excel export, quick sales; (3) task columns, checklists, comments, images, workflow templates, calendar; (4) subcontractor views, reports, notifications, Fennoa API, and last the simplification of job fields per service unit (K31, moved from phase 3); (5) stock accounting (items, purchases at cost, consumption, stock counts) and machines (job tasks on a machine's work list, maintenance items and history, a touch-screen machine console for logging work, used material and maintenance), spec chapter 19.
- **Access control is central.** Roles: admin (*pääkäyttäjä*), management (*johto*), employee (*työntekijä*), intern (*harjoittelija*), subcontractor (*alihankkija*). Management is admin minus user management, settings and permanent deletion. Employees and interns see all jobs ("my jobs" filter on by default) and may create jobs and customers; they see only consumer product prices unless given personal money permissions. Interns have an end date after which they can't log in, plus a supervisor (information only). Subcontractors see only jobs they are attached to and no rates or quote/billing amounts.
- **UI targets:** logged-in users only (no public pages besides login). It must work on phones (new-job intake, time entry) and on FullHD desktops.