Description
Source
Reported by Olcay Akcabelen after testing the 3.12.0 release. His note opens with thanks for the new version, then lists four delivery issues, one translation complaint, and one question about a field in the product editor.
Reproduced against upstream/main at f9a95dd0.
What was reported
Delivery orders:
- The delivery address has to be re-entered every time, because there is no address field in the customer details.
- The printed delivery receipt lacks amount information, so the delivery person cannot see how much to collect.
- The order note does not appear on the printed delivery receipt. He uses that field for instructions such as "do not ring the doorbell".
Product and settings screens:
- Translations for his preferred language were overlooked on the newly added stock/recipe and authorization/permission screens.
- A question, not a complaint: what is the purpose of the "stock product" dropdown that was recently added to the product editing screen?
What the investigation found
Items 1, 3, 5 reproduce. Item 2 is a documented product decision, so it stays as is. Item 4 is half right: the stock and recipe screens are translated, the permission screens are not.
1. Customer address: the backend is finished, the form never asks for it
Every layer except the input already handles a customer address.
main/db.ts:5657has theaddress TEXTcolumn oncustomers.main/routes/customers.ts:301(create) andmain/routes/customers.ts:435(update) accept, validate and persist it. The comment at line 309 says "The delivery slip prints the address in full, so an over-long address is bounded here".main/routes/printers.ts:752reads it when building the delivery slip:order.delivery_address || customer?.address.tests/delivery-slip-printing.test.tscovers the fallback and passes today, including "the order-recorded address wins over the standing customer address".
frontend/src/components/pos/CreateCustomerModal.tsx and frontend/src/components/pos/EditCustomerModal.tsx collect name and phone only. No address, no email, no notes. Because nothing writes the column, it stays NULL, and the customer address fallback on the slip can never fire. The reporter therefore retypes the address on every order.
PR #906 built the print side and said so in its own description: "no customer-address column, customer-level address write, or customers.address read was added". The input side was left for later and never filed.
2. Amount on the delivery slip: no change, and here is why
The reporter is printing the courier slip, not the standard receipt, and that document carries no money by design.
main/printers/document-delivery-slip.ts:66defines the order fields the slip reads: order number, timestamp, type, delivery address and customer name. There are no amount columns in the type.frontend/src/lib/printer/delivery-slip-encoder.ts:1states it: "A courier slip has no money on it and no mask option".docs/reference/api.mddocuments the endpoint as printing "the full customer number, the delivery address, and the items. No bill is required, so a slip can be handed over before the customer pays."
The reasoning holds. The slip prints at dispatch, before the customer settles, so there is no settled total to show. orders.total exists (main/db.ts:5713) and could be read, but printing a figure that has not been paid and may still change is a product decision, not a bug fix. The remainder of this work (courier slip without charging, a payment type field) is already tracked as S4 in #830 and inside #694.
Leaving this as is. If a merchant wants the amount on the sheet, the receipt is the document that carries it.
3. Order note: stored, then dropped
The note is captured and saved. It is printed on nothing.
- Entered as
cart.orderNotes(frontend/src/store/cart.ts:19). - Persisted to
orders.special_instructions(frontend/src/app/(dashboard)/pos/page.tsx:656and:820). - No print path reads the order-level value.
main/printers/document-delivery-slip.ts:74readsspecial_instructionsfrom the item row only, and the receipt builders never look at it.
"do not ring the doorbell" is saved and then silently dropped from every document, including the courier slip meant for the person standing at the door.
This is not covered by #694, which frames notes as a field still to be added. The field exists. It just has no renderer.
4. Translations: the stock screens are fine, the permission screens are not
npm run test:translations passes. All 24 locales carry every key, and the 43 inventory.* keys are genuinely translated. The values that match English in de, es, fr, it, nl, pt and fil are correct cognates: German "Manager" and "Name", Dutch "Product", French "Date" and "Actions".
The permission screens are a real defect, and the translation suite cannot see it. Three separate things render in English there.
Capability labels. frontend/src/components/settings/PermissionMatrix.tsx:283 renders permissionLabel(permission.id) for every row. That function is at line 78:
export function permissionLabel(permissionId: PermissionId): string {
return permissionId.split('.').map((part) => part.replace(/-/g, ' ')).join(' · ');
}It splits the raw permission id into English words. shared/permissions.ts:50 defines 69 permission ids, so 69 rows print orders · status · update, held orders · manage, mobile access · manage. frontend/src/components/settings/PermissionAuditLog.tsx:124 calls the same function.
Area headers. PermissionMatrix.tsx:275 renders the group header as area.replace(/-/g, ' '), also raw English. The definitions use 18 areas.
The raw id. The same cell prints permission.id in a <code> block below the label. That one is a deliberate developer aid and is fine to keep.
ADMINISTRATIVE_SURFACE_KEYS (PermissionMatrix.tsx:59) is not a label map. It maps 4 ids to the self-access warning sentences at line 297, and does not help with labels.
Nothing is missing from the locale files, so none of these labels are ever looked up. That is why it passed review and why npm run i18n:check stays green.
The translations already exist. They were orphaned. permissionMatrix.capabilities holds 48 finished labels, "Cancel pending order items" and "Manage supplies and recipes" among them, fully translated in all 24 locales with none missing and none left in English. permissionMatrix.areas holds 11 translated area names, and all 11 still correspond to a real area.
1dafe9b1 (#489) wrote both namespaces for the read-only permission matrix, which read capabilities.<key> and areas.<area>. 707fa86b (PR #913, add configurable role permissions) replaced that matrix with the configurable editor and stopped reading either namespace. The keys were left in every locale file. A grep across the settings components and the app directory finds no reader for them today.
This is a regression that shipped in 3.12.0 through #913, not a set of screens that were never translated. It arrived in the same release the reporter is thanking us for.
5. The "stock product" dropdown is Inventory product, and it is undocumented
frontend/src/app/(dashboard)/products/page.tsx:789. Added by #817 in 3.12.0.
It links a sellable product to an inventory-only product so that selling one deducts stock from the other. For example, "Espresso shot" points at inventory product "Coffee beans 1kg" with a deduction per sale of 20. The option list filters to products that have no inventory_product_id of their own, so chains are impossible. It is the lightweight alternative to a recipe or bill of materials, not a second recipe system.
The label in en.json is "Inventory product" with no hint text, which is why it reads as unexplained. The field works. The complaint is that nothing tells the user what it does.
Scope
Lettered to avoid confusion with the numbered findings above. Four independent changes, each shippable on its own.
- A (finding 1): an address field in
CreateCustomerModalandEditCustomerModal, sent on create and on update. - B (finding 3): the order note printed on the delivery slip. The receipt is left alone for now, see the implementation note.
- C (finding 4): the permission matrix and audit log to use the already-translated
permissionMatrix.capabilitiesandpermissionMatrix.areaskeys, plus new keys for the permission ids and areas that have no existing label. - D (finding 5): a one line hint under the
Inventory productselect in the product editor.
Suggested order: A, then B, then D, then C. A is the smallest and the one the reporter hit hardest. C is the only one with real translation work.
Out of scope:
- Any change to the courier slip's money handling. Item 2 is a no change by decision.
- Any new print setting. The note and the address are facts about an order, not merchant preferences.
- Any change to
customers.view.docs/reference/product-invariants.mdrecords that a printed slip is a handout, not a secure artefact, and that a permission change here would be a product migration. - Reworking the recipe or BOM system. Only copy changes.
Implementation notes
A: main/routes/customers.ts already validates address length through validateCustomerAddress and returns 400 on failure. The frontend must surface that error instead of a generic toast, or an over-long address fails silently from the user's point of view.
B: the slip is the priority, since that is the document the reporter printed. Adding the note to the receipt is a separate call. The receipt has its own layout and column budget, and tests/receipt-column-oracle.test.ts pins the emitted cells, so any added line shows up as a golden diff. If the receipt is changed later, regenerate with RECEIPT_COLUMN_GOLDEN=write npm run test:receipt-column-oracle. Ship the slip first, then decide the receipt on its own.
C: this is a lookup table, not a translation project. Add PERMISSION_LABEL_KEYS: Record<PermissionId, PermissionKey> in PermissionMatrix.tsx mapping each of the 69 ids onto the existing permissionMatrix.capabilities keys, and have permissionLabel call the translator with that key. Do the same for the area headers, mapping the 18 areas onto permissionMatrix.areas. Keep the id-splitting as the fallback for an unmapped or unknown id so a bad response cannot crash the row.
All 48 capability keys are still reachable, none is dead. The gap runs the other way. Six ids have no sensible existing label and need new keys: refunds.view and refunds.initiate (fold to one), cash.shifts.view, cash.movements.manage and cash.movements.void (fold to one), cash.day-close (distinct from shiftClose), authorization.manage, and mobile-access.manage. Three more would land on a misleading key if forced: tax-configuration.manage onto taxPacksManage, reports.daily-sales.export onto menuImportExport, and kitchen.status.update, which has no home at all. Write those in English, then translate.
Seven of the 18 areas have no areas.* key and need one: apps, authorization, cash, inventory, printing, tables, tax. That is 7 area keys plus roughly 6 to 9 capability keys, so 13 to 16 new keys and roughly 310 to 380 strings across 24 locales. A language added later must inherit the check, so derive the locale list from frontend/src/lib/i18n/languages.ts the way tests/permission-matrix-self-access.test.ts already does.
D: one label and one hint string in en.json, then translations.
Verification
npm run test:delivery-slip # slip still prints address fallback and bounds
npm run test:authorization-permissions
npm run test:translations
npm run i18n:check
npm run lint
npm run build:frontend
npm run test:receipt-column-oracle # only if the receipt layout changes
npm run test:e2e:browserBaseline as of f9a95dd0: test:delivery-slip reports 30 passing, 0 failing. test:translations passes. i18n:check passes today, so a green run after C proves nothing on its own. Add a test asserting that every id in PERMISSION_DEFINITIONS and every area resolves to a real key present in all locales, otherwise the next permission added ships untranslated again.
Handoff notes
- Nothing in this issue exists as an open issue or a PR. The open PR queue is dependency bumps plus draft feat: add configurable service charge support #829.
- "delivery" order type issues/limitations #694 and S4 in [EPIC] Public-support findings (4 - 29 Sep 2026) - close-out tracker #830 overlap finding 2 only, and both treat the note as a field still to be added. It already exists.
- feat(print): delivery address on receipt #906 shipped the print side of finding 1 and is why the fallback works.
- fix: align restricted staff permissions #913 shipped finding 4, in the commit that orphaned the translations it should have been using.
- Repo is on
upstream/mainatf9a95dd0with no local commits. Branch from a fresh sync before starting.
Activity
fix: delivery slip note, permission labels & printer token hardening (#…