Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
docs(production): say first-touch numbering runs under every timing
Raul1e26a8e7d580
diff --git a/apps/erp/app/modules/inventory/inventory.service.ts b/apps/erp/app/modules/inventory/inventory.service.tsindex 561d8bddae..a0a1549299 100644--- a/apps/erp/app/modules/inventory/inventory.service.ts+++ b/apps/erp/app/modules/inventory/inventory.service.ts@@ -23511,10 +23511,10 @@ export async function issueMaterial(throw new NotFoundError("Tracked entity not found");}- // First-touch numbering (serialNumberTiming = 'production'). A no-op- // for a unit already numbered, which is every unit under the default- // timing. A Consumed entity is not cut to one unit below, so it is- // numbered only when it already holds one.+ // First-touch numbering: numbers a unit that has none yet, whatever+ // the timing (under 'production' every unit; otherwise only a unit+ // left unnumbered by a timing change). A Consumed entity is not cut to+ // one unit below, so it is numbered only when it already holds one.await sequence.assignSerialNumberIfMissing(trx, {trackedEntityId,companyId,@@ -23826,8 +23826,8 @@ export async function issueMaterial(entity.attributes as TrackedEntityAttributes;// A unit scrapped before it completed an operation never reached a- // completion hook, so number it here (serialNumberTiming =- // 'production'). It consumed real material and needs an identifier+ // completion hook, so number it here if it has no number yet (it is+ // cut to one unit below). It consumed real material and needs an identifier// on its scrap journal, NCR and lineage; its replacement must not// take the number this unit should have had.await sequence.assignSerialNumberIfMissing(trx, {