From e12ad2ed7bd6e696a40b553182696e75496e8951 Mon Sep 17 00:00:00 2001 From: grabowski Date: Fri, 16 Oct 2026 11:29:26 +0700 Subject: [PATCH] ERPNext runs the whole plant; every tool we build integrates with it Decided by the user (October 2026): the whole plant runs ERPNext, and all tooling we develop has to interact with it. digital-factory.md: standing decision in the summary; decision 10 (ERPNext owns the business documents, the factory application owns the floor; ERPNext names are the shared keys); new section 'ERPNext: the plant's ERP' with the ownership table (customers, prices, sales orders, items and BOMs, work orders and job cards per station, batches and quality inspections per compound lot, serial numbers for metal parts, downtime entries, delivery notes, assets, accounting, payroll vs. cycles, per-record inspection, genealogy and the hash-chained log staying in the factory application), the integration rules (one typed Frappe REST client in cnx-factory, an integration user per tool, webhooks in, transactional outbox with idempotent postings so the floor never waits on the ERP, business-sized postings, customisation as a Frappe app in Gitea, nightly reconciliation, no public ERPNext endpoint, new tools use the same client), hosting on NixOS (no nixpkgs module, NixOS/nixpkgs #241921; Avunu frappe-nix as the start, frappe_docker as oci-containers fallback; MariaDB + Redis; vinyl-erp on site behind the gateway proxy; OIDC sign-on; upgrades on a restored copy), Thai localisation (Ecosoft erpnext_thailand: VAT, WHT, PND, billing notes; Ecosoft as partner to quote; payroll and BOI reporting to check), phasing (dev ERPNext now; accounting and assets from the first capex invoice; manufacturing at commissioning) and estimates. ERPNext added to the architecture diagram, services, machines (vinyl-erp), module list, backup, cost, build order and open decisions; the old 'ERP out of scope, decide after launch' line replaced. artist-platform.md: price list, customers, sales orders, campaign pledges as payment entries, through the plant's outbox. traceability.md: one ERP, one set of keys. README summary. total-investment.md added scope: ERPNext (to quote, not in the sum, no licence fee). --- README.md | 5 +- docs/artist-platform.md | 17 +++ docs/digital-factory.md | 183 +++++++++++++++++++++++++++++-- docs/finance/total-investment.md | 1 + docs/traceability.md | 6 + 5 files changed, 201 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 077a9f2..db52f39 100644 --- a/README.md +++ b/README.md @@ -149,8 +149,9 @@ The detail lives in dedicated documents: shipment, and the requirements this sets for the factory software - [Digital factory systems plan](docs/digital-factory.md): every system that has to exist for environment, machine, QC and genealogy data to land - in one database keyed to one record identity: the plant as one more site - in B4L's existing NixOS fleet (the cnx-network clan: mesh, DNS, fleet + in one database keyed to one record identity, with ERPNext as the + plant's ERP that every tool we build integrates with: the plant as one + more site in B4L's existing NixOS fleet (the cnx-network clan: mesh, DNS, fleet monitoring, site gateway module, public proxy), what changes in that repo, VLAN zoning, Telegraf/MQTT acquisition source by source, QC instrument integration, the factory application, alerting, backup, diff --git a/docs/artist-platform.md b/docs/artist-platform.md index 49abd00..de58423 100644 --- a/docs/artist-platform.md +++ b/docs/artist-platform.md @@ -421,6 +421,23 @@ No SaaS beyond the payment provider (Opn/Omise, 2C2P or a bank gateway, to be chosen), in line with the plan's standing rule that every plant service runs on the NixOS fleet. +**ERPNext** (decided October 2026: the plant runs ERPNext, and every tool +we build interacts with it; [digital factory](digital-factory.md#erpnext-the-plants-erp)). +For the platform that means: + +- the **price list** behind the calculator is an ERPNext price list + (the demos' `R` list is its prototype), synced out to the public + process, so the calculator and the invoice never disagree; +- an artist or label account is linked to one ERPNext **customer**; a + direct order becomes a **sales order** when it is confirmed; +- a **campaign** stays in the public process while it runs; when it + succeeds it becomes a sales order, the pledges become **payment + entries** against it in the ring-fenced account, and fan shipments + become delivery notes; the refunds of a missed campaign are posted the + same way; +- every posting goes through the plant's integration layer and its + outbox over the mesh; the public side never talks to ERPNext directly. + **Personal data.** Fans' names and addresses are personal data under PDPA, with CNX as controller as the seller of record. An artist gets fan contact details only where the fan ticked a consent box; that list diff --git a/docs/digital-factory.md b/docs/digital-factory.md index 500ab3e..2d111d3 100644 --- a/docs/digital-factory.md +++ b/docs/digital-factory.md @@ -21,6 +21,14 @@ Nothing is built twice. Vendor instrument PCs (Keyence, vision controllers, PLC HMIs) are appliances, not servers: they export into the NixOS estate and never host a service of ours. +**Standing decision (October 2026): the whole plant runs ERPNext**, +self-hosted on a NixOS machine in the same clan. It is the master for +customers, prices, orders, money, items, stock and assets, and every tool +this plan builds (the factory application with its stations and customer +portal, the artist platform, the instrument integrations) reads from and +writes to it through one integration layer; none keeps a second master of +what ERPNext owns ([ERPNext](#erpnext-the-plants-erp)). + ## What the fleet already provides Read the clan's own runbook (`docs/` in the repo, served on `control`) for @@ -69,7 +77,8 @@ TODO list or small extensions to existing modules): "this record, that cycle, those conditions" never needs the time-series store; the curve behind the snapshot is one PromQL range query away. (TimescaleDB in PostgreSQL is the fallback if that split proves - awkward; it is not the starting point.) + awkward; it is not the starting point.) Business documents (sales + orders, stock, invoices) are ERPNext's, decision 10. 3. **MQTT is the plant bus, Telegraf is the universal collector.** Every machine, meter and sensor is read by a Telegraf instance on the edge collector nearest it (Modbus, OPC UA, Siemens S7 and MQTT inputs are @@ -107,6 +116,14 @@ TODO list or small extensions to existing modules): live feedback loops that the staff use to improve production, rather than only for management reporting, decide whether a plant succeeds ([exhibitor briefing](suppliers/making-vinyl-europe-2026-exhibitors.md#after-the-show)). +10. **ERPNext owns the business, the factory application owns the floor.** + ERPNext holds every business document (customer, sales order, work + order, job card, batch, quality inspection, stock entry, delivery + note, invoice, asset); the factory application holds what happens at + machine speed (cycles, per-record inspection, metrology, genealogy, + gates, the hash-chained log) and posts results to ERPNext in + business-sized pieces. ERPNext document names are the keys both sides + share ([ERPNext](#erpnext-the-plants-erp)). ## The systems on one page @@ -114,7 +131,8 @@ TODO list or small extensions to existing modules): |---|---|---|---| | Site gateway | PPPoE WAN, VLAN zoning, DHCP/DNS, NTP for the site, internal TLS proxy, CrowdSec | `gw--1` (existing `cnx.router` module) | Build | | Plant core | PostgreSQL, Mosquitto, Telegraf persister, VictoriaMetrics + vmalert + Grafana, Alertmanager, factory application, file datasets on ZFS | `vinyl-core` | Build | -| Factory application | Orders, gates, genealogy, materials, press runs, QC verdicts, packaging, fulfillment, customer portal, audit log | `vinyl-core` | Build (v1), Launch (v2) | +| Factory application | Orders, gates, genealogy, materials, press runs, QC verdicts, packaging, fulfillment, customer portal, audit log; the ERPNext integration layer | `vinyl-core` | Build (v1), Launch (v2) | +| ERPNext | Accounting with Thai VAT and withholding tax, customers, prices, sales and purchase orders, items, BOMs, work orders and job cards, stock and batches, incoming quality inspections, assets and maintenance, payroll | `vinyl-erp` | from the first capex invoice; manufacturing at commissioning | | Edge collectors | Telegraf per machine zone, disk-backed store-and-forward, NTP to the OT segment, vision result receiver | `vinyl-edge-press`, `vinyl-edge-util`, `vinyl-edge-galv` | Build, Expand | | Environmental monitoring | Zone temperature, humidity, PM, differential pressure; alarms; correlation with production | RS485 loops into the edge collectors | Build | | Machine telemetry | Presses, extruders, hydraulics, boiler, chiller, compressor, heat pump, HVAC, PV, BESS, energy and water meters | edge collectors | Build | @@ -154,6 +172,7 @@ flowchart LR DB[(PostgreSQL)] APP[Factory application] AM[Alertmanager] + ERP[(ERPNext
vinyl-erp)] end subgraph GW[gw-site-1] PX[Caddy internal proxy
factory.site1.cnx.network] @@ -178,6 +197,8 @@ flowchart LR MQ --> VM MQ --> APP APP --> DB + APP -->|REST, outbox| ERP + ERP -.->|webhooks| APP ST --> PX --> APP VM --> AM --> PH APP -.mesh.-> WEB --> CUST @@ -205,6 +226,7 @@ Hardware classes are planning positions; models are chosen at purchase. |---|---|---|---| | `gw-lpn-1` | Site gateway: `cnx.router` with the plant VLANs, internal proxy for the factory application and Grafana, NTP for the site | Topton 1U N300, 4x 2.5G (fleet standard); a 10G SFP+ variant if the core server link warrants it | IT room | | `vinyl-core` | PostgreSQL, Mosquitto, Telegraf persister, VictoriaMetrics + vmalert + Grafana, Alertmanager, factory application, ZFS datasets for files (audio captures, inspection images, metrology raw data, CoA scans, client audio) | 1U/2U server, ECC RAM 64 to 128 GB, mirrored NVMe for OS and database, HDD mirror or raidz for files, dual PSU on UPS | IT room | +| `vinyl-erp` | ERPNext (Frappe web, workers, scheduler, socket.io), MariaDB, Redis, the Thai localisation app and our `cnx_erp` app | 1U server, 32 GB RAM, mirrored NVMe, on UPS; or a VM on `vinyl-core` if its hardware has room | IT room | | `vinyl-backup` | Borg server for the plant clients, ZFS receive target for `vinyl-core`'s datasets, PostgreSQL streaming replica, pgBackRest repository | tower or 2U, large HDD pool | separate room from `vinyl-core` (archive side of the building) | | `vinyl-edge-press` | Telegraf (OPC UA / S7 to presses and extruders, Modbus to hydraulics and label oven), vision result receiver, SFTP target for inspection images, chrony serving the OT segment, disk-backed MQTT buffer | fanless DIN-rail IPC, 2 LAN, 2 to 4 RS485 | press hall control cabinet | | `vinyl-edge-util` | Telegraf (Modbus to boiler, chiller, compressor, heat pump, energy meters, inverters, BESS; BACnet or Modbus to the HVAC BMS), zone environment loops, dry-contact I/O for fire panel, BESS detection and UPS | same class, more RS485 | electrical room or utility yard cabinet | @@ -222,8 +244,8 @@ Office audio intake and gate approvals happen from ordinary staff laptops on the `lan` VLAN through the same proxy; no dedicated machine. Stations run a kiosk browser (`cage` plus Firefox or Chromium) pointed at the application; badge readers and scanners are USB HID keyboard devices, so -there is no driver work. Fifteen plant machines at launch, about twenty at -maturity; every one is a directory and a line in the inventory. +there is no driver work. Sixteen plant machines at launch, about twenty-one +at maturity; every one is a directory and a line in the inventory. ## Networks @@ -554,10 +576,144 @@ Core entities: `customer`, `order`, `release`, `side`, `audio_asset`, `carton_lot`, `lab_result`, `packaging_check`, `shipment`, `operator`, `shift`, `event` (the hash chain). +Where a module touches a business document, the document is ERPNext's +and the module holds its production side: the order is an ERPNext sales +order, a run is a work order, each station step is a job card, a PVC lot +is a batch with its quality inspection, a shipment is a delivery note +([ERPNext](#erpnext-the-plants-erp)). + Stations use the same application in kiosk mode: an operator taps a badge (the same card the access-control system issues, so one ID) and scans whatever the step asks for. No forms longer than one screen. +## ERPNext: the plant's ERP + +Decided October 2026: **the whole plant runs ERPNext**, the open-source ERP +on the Frappe framework (GPLv3, no licence fee; version 15 is the current +stable line). It closes the item this plan had left for after launch, and +it sets a rule for everything we build: **every tool has to interact with +ERPNext**, through the integration described here. + +### Who owns what + +| Object | Master | The other side keeps | +|---|---|---| +| Customers, contacts, addresses | ERPNext | the factory application scopes the portal by the ERPNext customer; the artist platform links each account to one | +| Price list, item prices, pricing rules | ERPNext | the artist-platform calculator reads them; the demos' price list becomes an ERPNext price list | +| Quotations, sales orders, invoices, payments (fan pre-orders in the ring-fenced account included) | ERPNext | the artist platform creates them; the factory application reads the order | +| Items and BOMs: one item per release and format (record, sleeves, jacket, labels, compound per copy), raw materials and packaging | ERPNext | the factory application reads the BOM of the run | +| Work order per press run; job cards per operation (cutting, plating, stamper prep, test pressings, pressing, packing); workstations (presses, lathe, plating cells, Sibert line, packing) | ERPNext | the stations' work orders are these job cards: kiosk scans and times post back as time logs and completed quantity | +| Stock: compound lots as batches, label and carton lots, finished goods, warehouses including the archive | ERPNext | the factory application knows which lot sat in which hopper for every cycle and posts the consumption | +| Incoming lab gate per compound lot | Quality Inspection in ERPNext, with a template carrying the parameters and limits of [quality automation](quality-automation.md) | instrument files and the CoA scan in the factory application | +| Metal parts: lacquers, fathers, mothers, stampers | serial numbers in ERPNext for location and value (warehouse: archive, rack, press) | genealogy, metrology, play counts and stamper sets per mother in the factory application | +| Gates, per-cycle rows, per-record optical results, audio scores, telemetry, environment, the hash-chained event log, client audio | factory application and VictoriaMetrics only: thousands of rows a day are not ERP documents | ERPNext gets the totals: good, rejected and scrap to regrind per job card and run | +| Stops | Downtime Entry in ERPNext per stop (workstation, reason, from, to) | the PLC detail | +| Deliveries | delivery notes in ERPNext | carrier and tracking per consignment on both sides | +| Assets: presses, lathe, galvanics, Sibert line, utilities, PV and BESS, IT | ERPNext asset register, depreciation, maintenance schedules | telemetry and run hours | +| Purchasing, suppliers, accounting, Thai VAT and withholding tax, payroll | ERPNext, with the HR app for payroll | nothing | + +### How every tool interacts with it + +1. **One integration layer.** A typed client for the Frappe REST API + (`/api/resource/` and whitelisted methods) lives in + `cnx-factory` and is the only path in or out. Each tool authenticates + as its own integration user (API key and secret in clan vars) whose + role grants only the document types it writes. ERPNext pushes changes + (submitted sales orders and work orders, purchase receipts, items and + prices) to the factory application with Frappe's webhooks. +2. **Outbox, not live calls.** Every posting is written to an outbox + table in the same transaction as the floor event and sent by a worker + with retries; each carries the event's ID in a custom field, so a + retry never creates a second document. ERPNext down for an upgrade + stops nothing on the floor; the outbox catches up (decision 8 + extended). +3. **Business-sized postings.** Per job card, per run, per lot, per + stop, per shift. Never per record or per cycle. +4. **ERPNext names are the shared keys** (sales order, work order, job + card, batch, serial number). The factory application keeps its own IDs + for records, cycles and parts and stores the ERPNext name beside them; + the record key on the sleeve never changes. +5. **Customisation as code.** Custom fields, document types, print + formats and webhooks ship as one Frappe app in our Gitea (working name + `cnx_erp`), installed and upgraded by the deployment, never clicked + into production by hand. +6. **Nightly reconciliation** of totals per work order and per batch in + both directions; a mismatch is an alarm, not a silent fix. +7. **The public side never reaches ERPNext directly.** The artist + platform's public process (see [artist platform](artist-platform.md)) + posts through the plant's API over the mesh; payment-provider webhooks + land on the public process and become payment entries through the + same outbox. No ERPNext endpoint is published. +8. **New tools follow the same rule.** A dashboard, a script or a kiosk + app built later uses the same client and an integration user of its + own. A tool that cannot read from or write to ERPNext this way is not + finished. + +### Hosting on NixOS + +- ERPNext has no package or module in nixpkgs (the request, + NixOS/nixpkgs#241921, has been open since 2023). Community Nix packaging + exists: Avunu's [frappe-nix](https://github.com/Avunu/frappe-nix) (a + NixOS module `services.frappe` with per-site systemd units, a uv2nix + Python environment and a database snapshot before every migration) and + pub.solar's erpnext-nix. Plan: start from frappe-nix, pinned as a flake + input in the clan repo. Fallback: the official frappe_docker images + declared as `virtualisation.oci-containers` on the same NixOS machine, + still declared in the clan, never a hand-built Docker host. Both + checked October 2026. +- **MariaDB**, ERPNext's standard database (10.11 on the version 15 + stack), with Redis. PostgreSQL support in Frappe is growing but is not + ERPNext's main path, so the plant runs two database engines. Backups: + Frappe's site backup plus mariabackup to `vinyl-backup` and the + off-site Borg set, and the quarterly restore drill includes ERPNext. +- **On site** (decision 8): machine `vinyl-erp`, reached by the office + through the gateway proxy at `erp.lpn1.cnx.network`; staff sign on with + the plant's OIDC provider (Frappe supports custom OAuth providers for + login); the external accountant over the mesh. +- **Upgrades** run on a restored copy first; the clan pins the ERPNext + version, so a major upgrade is a reviewed change, not a surprise. + +### Thai localisation and a partner + +- [erpnext_thailand](https://github.com/ecosoft-frappe/erpnext_thailand) + (Ecosoft, Bangkok; version 15; Frappe Cloud marketplace, checked + October 2026): Thai VAT including service VAT at payment, withholding + tax and its certificates, PND and purchase and sales tax reports for + the Revenue Department, billing notes, deposit invoices and Bank of + Thailand exchange rates. +- **Ecosoft** (ecosoft.co.th) is a Frappe certified partner and the + maintainer of that app; ask it for an implementation and support quote + alongside doing it in-house. Its site shows an ERPNext rollout at a + firm named Lamphun Plastpack. +- **Payroll**: Thai social security and PND 1 are not in that app's + list; check what Frappe HR covers with configuration and what Ecosoft + uses. +- **BOI**: machinery and raw materials imported under promotion have to + be accounted for ([BOI](boi.md)); the asset register and the stock + ledger are where that record lives. Check the raw-material reporting + the BOI asks for against what ERPNext produces before go-live. + +### Phasing and cost + +- **Now:** a dev ERPNext next to the dev trio behind `gw-cnx-1`, the + `cnx_erp` app skeleton, and the integration client in `cnx-factory` v0 + against it. +- **From the first capex invoice:** accounting, purchasing and the asset + register, so the BOI asset list and depreciation start there. The + build's cost entries in proplan (project CNX-01) are the source for + capitalising the plant at handover. +- **Commissioning and launch:** items, BOMs, workstations, inspection + templates, work orders and job cards; stations post job cards. +- **Expand:** serial numbers for in-house metal parts; payroll if it did + not start earlier. + +Estimates: no licence; `vinyl-erp` 2,000 to 4,000 USD of hardware (none +if it runs as a VM); ERPNext configuration (chart of accounts, Thai tax, +items, BOMs, workstations, inspection templates, print formats) 1 to 2 +person-months or a partner quote; the integration and the `cnx_erp` app +1.5 to 2.5 person-months; Nix packaging and the clan module 0.5 to 1 +person-month. + ## Observability and alerting Two tiers, split by where the data is: @@ -599,8 +755,10 @@ instead of its simulation. - **VictoriaMetrics**: `vmbackup` snapshots to `vinyl-backup` nightly; the fleet's own open item (backing up `control`'s TSDB) gets a destination at the same time. -- **Configuration**: the clan repo and `cnx-factory` in Gitea; any machine - is rebuilt from them. +- **ERPNext**: Frappe's site backup and mariabackup to `vinyl-backup` + nightly, in the off-site Borg set, restored in the same drill. +- **Configuration**: the clan repo, `cnx-factory` and the `cnx_erp` app in + Gitea; any machine is rebuilt from them. - **Restore drill quarterly**: restore the database to a scratch VM and open a random order's trace in the portal. A backup that has never been restored does not count. The `BackupStale` rule already watches the @@ -693,6 +851,9 @@ Aligned with the [roadmap](roadmap.md) phases. plant machine exists, and the machines move to the plant when it does. - Land the three router-module extensions on `gw-cnx-1` first, where they are also useful. +- Stand up a dev ERPNext beside the dev trio (frappe-nix module, or the + container fallback) and build the integration client against it from + `cnx-factory` v0 onward. - Start `cnx-factory` v0 against a press simulator (the state machine in the plant operation page is the seed: same states, same cycle timing) so orders, gates, genealogy and press cycles can be exercised end to end @@ -742,6 +903,7 @@ options, which come back with the quotes. Fleet pieces already paid for |---|---| | `gw-lpn-1` (Topton 1U, fleet standard) | 300 to 500 | | `vinyl-core` and `vinyl-backup` servers, UPS, rack | 8,000 to 15,000 | +| `vinyl-erp` server (none if it runs as a VM) | 2,000 to 4,000 | | Omada switches and APs for the building, industrial switches in the cabinets, cabling allowance | 4,000 to 8,000 | | 3 edge collectors with I/O modules and enclosures | 3,000 to 6,000 | | 8 station kiosks with readers, scanners, one barcode verifier, one darkfield camera | 8,000 to 15,000 | @@ -749,8 +911,9 @@ options, which come back with the quotes. Fleet pieces already paid for | energy meters (10 feeders), water meters, level transmitters | 3,000 to 6,000 | | audio QC hardware (turntable, arm, cartridge, phono stage, interface) | 2,000 to 5,000 | | off-site backup storage, per year | 100 to 500 | -| **Hardware total** | **~32,000 to 64,000** | +| **Hardware total** | **~34,000 to 68,000** | | `cnx-factory` to v1 (orders through shipments, stations, portal) | 4 to 6 person-months | +| ERPNext: configuration with Thai tax, the integration and the `cnx_erp` app, Nix packaging | 3 to 5.5 person-months, or a partner quote for the configuration | | Clan modules, router extensions, collectors, dashboards and rules to commissioning | 1 to 2 person-months | | Vision, metrology and audio pipeline integration (Launch and Expand) | 3 to 5 person-months, plus integrator fees in the vision quote | @@ -779,7 +942,9 @@ Build onward, part-time at launch; add it to the headcount. not a plant service. The brand domain decision stays open. - Portal availability during a plant WAN outage: accept it (the portal is a view of live data) or add a read replica on the fleet side later. -- Accounting and ERP: out of scope for the application; if an ERP is - adopted later it references the same order IDs. Decide after launch. +- ERPNext (decided October 2026, see its section): own machine or a VM + on `vinyl-core`; frappe-nix or the container fallback; Ecosoft or + in-house for the configuration; payroll localisation; the BOI + raw-material reporting; when the company's books move into it. - Dead-wax code readability on black and coloured vinyl with a camera: test with samples before the packaging station is designed. diff --git a/docs/finance/total-investment.md b/docs/finance/total-investment.md index 7aab36f..86dd015 100644 --- a/docs/finance/total-investment.md +++ b/docs/finance/total-investment.md @@ -50,6 +50,7 @@ building, software and stamper prep lines, and the contingency on top). | Press fleet changed (October 2026) to two Newbilt Duplex systems (two presses each, EX 50 main extruder and EX 35 colour extruder) plus one Newbilt Classic, replacing the two blocks above (930k – 1,290k): Duplex system 1 as the first block (350k – 370k; the quote's second-extruder option becomes the EX 35), system 2 ~230k – 300k (two presses at the quoted ~115k per press and extruder set as the yardstick, plus hydraulic unit and EX 35, estimate; no EX 35 price on file), the Classic ~290k – 460k (the AD12 band per press as a placeholder; no Newbilt price on file) | −60k (low case) / −160k (high case) | −2.0M / −5.3M | estimate, [pressing line](../equipment/pressing-line.md); the Newbilt re-quote replaces it. The utilities for five presses are re-sized in the row below | | Utilities re-sized for the five-press fleet (October 2026): boiler bank 2 × 500 kg/h, chiller bank 3 × 250 kW with plate heat exchanger and tanks, larger softener and loop treatment ([steam and cooling](../steam-cooling.html)) | +185k (low case) / +294k (high case) | +6.1M / +9.7M | estimate, [utilities CSV](utilities-investment.csv) re-based from 24.0M – 41.6M to 30.1M – 51.3M THB | | Utility yard built for four boiler and four chiller modules (October 2026): yard ~379 m² against 178 m² ([scale](../scale.md#detached-utility-yard-parking-and-what-that-moves)) | 73k – 122k | 2.4M – 4.0M | estimate: the building rate above on the ~200 m² the yard grows by; the open chiller compound costs less than a building, so this is the cautious end. The valved branches and feeders for the empty positions are not priced yet | +| ERPNext for the whole plant (October 2026): configuration with Thai tax, integration with every tool, Nix packaging; `vinyl-erp` server | to quote | to quote | not in the sum: 3 to 5.5 person-months in-house or a partner quote (Ecosoft), plus 2k to 4k USD hardware ([digital factory](../digital-factory.md#erpnext-the-plants-erp)); no licence fee | | Archive mobile shelving for the father and mother archive (October 2026) | to quote | to quote | not in the sum: A-Z Solutions publishes no prices; quote it and a Thai supplier ([facility security](../facility-security.md#archive-room-mobile-shelving)) | | **Added so far** | **~678k – 1,027k** | **~22.3M – 33.9M** | about 13 to 17% on the full-vision subtotal | diff --git a/docs/traceability.md b/docs/traceability.md index 6d8805c..7fff175 100644 --- a/docs/traceability.md +++ b/docs/traceability.md @@ -45,6 +45,12 @@ For any order, the customer can follow the full chain: mother, stamper, press run, box) gets an ID, and every ID knows its parents. A customer complaint about one record resolves to a specific stamper, press, shift, and compound lot. +- **One ERP, one set of keys**: business documents (orders, work orders + and job cards, lots, deliveries, invoices) live in ERPNext, which the + whole plant runs; the traceability detail lives in the factory + application and carries the same ERPNext document names, so a trace and + an invoice point at the same order + ([digital factory](digital-factory.md#erpnext-the-plants-erp)). - **Environment attached**: the whole-factory HVAC monitoring (temperature, humidity, PM per zone) is logged on the same timeline, so any production window can be correlated with plant conditions.