At a Glance
Module purpose: Seed-only scaffolds (PR draft, RFQ / pricelist round) that deep-copy header and detail rows into a new transactional record on instantiation · Audience: Requestor (PR), Purchaser (pricelist), Sysadmin · Key entities/tables:tb_purchase_request_template,tb_pricelist_template· Sub-pages: 2


Templates in Carmen are seed-only documents — they themselves never enter a workflow or post to any ledger. Their purpose is to prefill a new transactional record (a PR draft, an RFQ pricelist round) with header values and detail rows that the operator would otherwise re-enter every time. When a user picks Create from Template, the relevant fields are cloned into a brand-new draft record; from that point on the new record is independent and the template is unchanged.
The behaviours below apply to every template variant in the system:
tb_purchase_request_template, tb_pricelist_template) carry their own primary key and audit columns, but are never referenced as parents by transactional records.draft (editable, not yet selectable in pickers) → active (selectable when creating new records) → inactive (retired from new pickers, still readable on historical records).created_*, updated_*, deleted_* are present, and hard-delete is blocked once the template has been used at least once.../carmen-inventory-frontend/app/(root)/(protected)/procurement/purchase-request-template/ — PR template frontend page.../carmen-inventory-frontend/app/(root)/(protected)/vendor-management/price-list-template/ — Pricelist template frontend page.../carmen/docs/purchase-request-management/PR-User-Experience.md — template-based PR creation flow.../carmen-turborepo-backend-v2/packages/prisma-shared-schema-tenant/prisma/schema.prisma — tb_purchase_request_template, tb_pricelist_template.