feat: the 10x15 label at Finalizado (Marcus 10/11, point 10)
When an order reaches Finalizado, the Kanban on the computer that opted in (Integrações > Etiqueta 10x15) prints a 10x15 label rendered by the server: the Tiny order number in large type (DTF-<n> when there is none), customer, DTF · N folhas · X m, the delivery line, date and time, the Revisor and a QR with the number. One automatic print per order (label_prints, claimed once); Revisor, Expedição, Gestão and the administrators can reprint. Chrome with --kiosk-printing prints without the dialog. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
12
app/migrations/202611111530_label-prints.sql
Normal file
12
app/migrations/202611111530_label-prints.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
-- Front 10: the 10x15 cm label at Finalizado (Marcus, 2026-11-10). One 'auto'
|
||||
-- print per order, decided by the unique partial index, so two computers
|
||||
-- asking at once cannot both print it; a reprint is always another row.
|
||||
CREATE TABLE IF NOT EXISTS dtf_local.label_prints (
|
||||
id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
|
||||
order_id uuid NOT NULL REFERENCES dtf_local.orders(id) ON DELETE CASCADE,
|
||||
reason text NOT NULL CHECK (reason IN ('auto','reprint')),
|
||||
printed_by text NOT NULL,
|
||||
printed_at timestamptz NOT NULL DEFAULT now()
|
||||
);
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS label_prints_one_auto
|
||||
ON dtf_local.label_prints(order_id) WHERE reason='auto';
|
||||
Reference in New Issue
Block a user