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
feat: add outside processing description to purchase order
Brad Barbin59d41110801a
diff --git a/packages/database/src/types.ts b/packages/database/src/types.tsindex 4e121c4b85..0566bf6c42 100644--- a/packages/database/src/types.ts+++ b/packages/database/src/types.ts@@ -2243,6 +2243,7 @@ export type Database = {digitalQuoteNotificationGroup: string[]id: stringinventoryJobCompletedNotificationGroup: string[]+ kanbanOutput: Database["public"]["Enums"]["kanbanOutput"]materialGeneratedIds: booleanproductLabelSize: string | nullrfqReadyNotificationGroup: string[]@@ -2256,6 +2257,7 @@ export type Database = {digitalQuoteNotificationGroup?: string[]id: stringinventoryJobCompletedNotificationGroup?: string[]+ kanbanOutput?: Database["public"]["Enums"]["kanbanOutput"]materialGeneratedIds?: booleanproductLabelSize?: string | nullrfqReadyNotificationGroup?: string[]@@ -2269,6 +2271,7 @@ export type Database = {digitalQuoteNotificationGroup?: string[]id?: stringinventoryJobCompletedNotificationGroup?: string[]+ kanbanOutput?: Database["public"]["Enums"]["kanbanOutput"]materialGeneratedIds?: booleanproductLabelSize?: string | nullrfqReadyNotificationGroup?: string[]@@ -10214,6 +10217,7 @@ export type Database = {Row: {assignee: string | nullcompanyId: string+ completeAllOnScan: booleancreatedAt: stringcreatedBy: stringcustomFields: Json | null@@ -10256,6 +10260,7 @@ export type Database = {Insert: {assignee?: string | nullcompanyId: string+ completeAllOnScan?: booleancreatedAt?: stringcreatedBy: stringcustomFields?: Json | null@@ -10298,6 +10303,7 @@ export type Database = {Update: {assignee?: string | nullcompanyId?: string+ completeAllOnScan?: booleancreatedAt?: stringcreatedBy?: stringcustomFields?: Json | null@@ -11650,12 +11656,15 @@ export type Database = {kanban: {Row: {autoRelease: boolean+ autoStartJob: booleancompanyId: string+ completedBarcodeOverride: string | nullconversionFactor: numbercreatedAt: stringcreatedBy: stringid: stringitemId: string+ jobId: string | nulllocationId: stringpurchaseUnitOfMeasureCode: string | nullquantity: number@@ -11667,12 +11676,15 @@ export type Database = {}Insert: {autoRelease?: boolean+ autoStartJob?: booleancompanyId: string+ completedBarcodeOverride?: string | nullconversionFactor?: numbercreatedAt?: stringcreatedBy: stringid?: stringitemId: string+ jobId?: string | nulllocationId: stringpurchaseUnitOfMeasureCode?: string | nullquantity: number@@ -11684,12 +11696,15 @@ export type Database = {}Update: {autoRelease?: boolean+ autoStartJob?: booleancompanyId?: string+ completedBarcodeOverride?: string | nullconversionFactor?: numbercreatedAt?: stringcreatedBy?: stringid?: stringitemId?: string+ jobId?: string | nulllocationId?: stringpurchaseUnitOfMeasureCode?: string | nullquantity?: number@@ -11798,6 +11813,27 @@ export type Database = {referencedRelation: "tools"referencedColumns: ["id"]},+ {+ foreignKeyName: "kanban_jobId_fkey"+ columns: ["jobId"]+ isOneToOne: false+ referencedRelation: "job"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "kanban_jobId_fkey"+ columns: ["jobId"]+ isOneToOne: false+ referencedRelation: "jobs"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "kanban_jobId_fkey"+ columns: ["jobId"]+ isOneToOne: false+ referencedRelation: "openProductionOrders"+ referencedColumns: ["id"]+ },{foreignKeyName: "kanban_locationId_fkey"columns: ["locationId"]@@ -13312,6 +13348,7 @@ export type Database = {methodOperation: {Row: {companyId: string+ completeAllOnScan: booleancreatedAt: stringcreatedBy: stringcustomFields: Json | null@@ -13341,6 +13378,7 @@ export type Database = {}Insert: {companyId: string+ completeAllOnScan?: booleancreatedAt?: stringcreatedBy: stringcustomFields?: Json | null@@ -13370,6 +13408,7 @@ export type Database = {}Update: {companyId?: string+ completeAllOnScan?: booleancreatedAt?: stringcreatedBy?: stringcustomFields?: Json | null@@ -24716,6 +24755,7 @@ export type Database = {quoteOperation: {Row: {companyId: string+ completeAllOnScan: booleancreatedAt: stringcreatedBy: stringcustomFields: Json | null@@ -24750,6 +24790,7 @@ export type Database = {}Insert: {companyId: string+ completeAllOnScan?: booleancreatedAt?: stringcreatedBy: stringcustomFields?: Json | null@@ -24784,6 +24825,7 @@ export type Database = {}Update: {companyId?: string+ completeAllOnScan?: booleancreatedAt?: stringcreatedBy?: stringcustomFields?: Json | null@@ -39784,12 +39826,16 @@ export type Database = {kanbans: {Row: {autoRelease: boolean | null+ autoStartJob: boolean | nullcompanyId: string | null+ completedBarcodeOverride: string | nullconversionFactor: number | nullcreatedAt: string | nullcreatedBy: string | nullid: string | nullitemId: string | null+ jobId: string | null+ jobReadableId: string | nulllocationId: string | nulllocationName: string | nullname: string | null@@ -39906,6 +39952,27 @@ export type Database = {referencedRelation: "tools"referencedColumns: ["id"]},+ {+ foreignKeyName: "kanban_jobId_fkey"+ columns: ["jobId"]+ isOneToOne: false+ referencedRelation: "job"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "kanban_jobId_fkey"+ columns: ["jobId"]+ isOneToOne: false+ referencedRelation: "jobs"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "kanban_jobId_fkey"+ columns: ["jobId"]+ isOneToOne: false+ referencedRelation: "openProductionOrders"+ referencedColumns: ["id"]+ },{foreignKeyName: "kanban_locationId_fkey"columns: ["locationId"]@@ -40983,14 +41050,14 @@ export type Database = {},{foreignKeyName: "partner_id_fkey"- columns: ["supplierLocationId"]+ columns: ["id"]isOneToOne: falsereferencedRelation: "supplierLocation"referencedColumns: ["id"]},{foreignKeyName: "partner_id_fkey"- columns: ["id"]+ columns: ["supplierLocationId"]isOneToOne: falsereferencedRelation: "supplierLocation"referencedColumns: ["id"]@@ -42055,6 +42122,7 @@ export type Database = {itemName: string | nullitemReadableId: string | nulljobId: string | null+ jobOperationDescription: string | nulljobOperationId: string | nulllocationId: string | nullmodelId: string | null@@ -42352,14 +42420,14 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["supplierCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["supplierCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]@@ -45406,14 +45474,14 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["paymentCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["paymentCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]@@ -49247,6 +49315,7 @@ export type Database = {| "Credit Memo"| "Blanket Order"| "Return Order"+ kanbanOutput: "label" | "qrcode" | "url"makeMethodStatus: "Draft" | "Active" | "Archived"methodOperationOrder: "After Previous" | "With Previous"methodType: "Buy" | "Make" | "Pick"diff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.tsindex 4e121c4b85..0566bf6c42 100644--- a/packages/database/supabase/functions/lib/types.ts+++ b/packages/database/supabase/functions/lib/types.ts@@ -2243,6 +2243,7 @@ export type Database = {digitalQuoteNotificationGroup: string[]id: stringinventoryJobCompletedNotificationGroup: string[]+ kanbanOutput: Database["public"]["Enums"]["kanbanOutput"]materialGeneratedIds: booleanproductLabelSize: string | nullrfqReadyNotificationGroup: string[]@@ -2256,6 +2257,7 @@ export type Database = {digitalQuoteNotificationGroup?: string[]id: stringinventoryJobCompletedNotificationGroup?: string[]+ kanbanOutput?: Database["public"]["Enums"]["kanbanOutput"]materialGeneratedIds?: booleanproductLabelSize?: string | nullrfqReadyNotificationGroup?: string[]@@ -2269,6 +2271,7 @@ export type Database = {digitalQuoteNotificationGroup?: string[]id?: stringinventoryJobCompletedNotificationGroup?: string[]+ kanbanOutput?: Database["public"]["Enums"]["kanbanOutput"]materialGeneratedIds?: booleanproductLabelSize?: string | nullrfqReadyNotificationGroup?: string[]@@ -10214,6 +10217,7 @@ export type Database = {Row: {assignee: string | nullcompanyId: string+ completeAllOnScan: booleancreatedAt: stringcreatedBy: stringcustomFields: Json | null@@ -10256,6 +10260,7 @@ export type Database = {Insert: {assignee?: string | nullcompanyId: string+ completeAllOnScan?: booleancreatedAt?: stringcreatedBy: stringcustomFields?: Json | null@@ -10298,6 +10303,7 @@ export type Database = {Update: {assignee?: string | nullcompanyId?: string+ completeAllOnScan?: booleancreatedAt?: stringcreatedBy?: stringcustomFields?: Json | null@@ -11650,12 +11656,15 @@ export type Database = {kanban: {Row: {autoRelease: boolean+ autoStartJob: booleancompanyId: string+ completedBarcodeOverride: string | nullconversionFactor: numbercreatedAt: stringcreatedBy: stringid: stringitemId: string+ jobId: string | nulllocationId: stringpurchaseUnitOfMeasureCode: string | nullquantity: number@@ -11667,12 +11676,15 @@ export type Database = {}Insert: {autoRelease?: boolean+ autoStartJob?: booleancompanyId: string+ completedBarcodeOverride?: string | nullconversionFactor?: numbercreatedAt?: stringcreatedBy: stringid?: stringitemId: string+ jobId?: string | nulllocationId: stringpurchaseUnitOfMeasureCode?: string | nullquantity: number@@ -11684,12 +11696,15 @@ export type Database = {}Update: {autoRelease?: boolean+ autoStartJob?: booleancompanyId?: string+ completedBarcodeOverride?: string | nullconversionFactor?: numbercreatedAt?: stringcreatedBy?: stringid?: stringitemId?: string+ jobId?: string | nulllocationId?: stringpurchaseUnitOfMeasureCode?: string | nullquantity?: number@@ -11798,6 +11813,27 @@ export type Database = {referencedRelation: "tools"referencedColumns: ["id"]},+ {+ foreignKeyName: "kanban_jobId_fkey"+ columns: ["jobId"]+ isOneToOne: false+ referencedRelation: "job"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "kanban_jobId_fkey"+ columns: ["jobId"]+ isOneToOne: false+ referencedRelation: "jobs"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "kanban_jobId_fkey"+ columns: ["jobId"]+ isOneToOne: false+ referencedRelation: "openProductionOrders"+ referencedColumns: ["id"]+ },{foreignKeyName: "kanban_locationId_fkey"columns: ["locationId"]@@ -13312,6 +13348,7 @@ export type Database = {methodOperation: {Row: {companyId: string+ completeAllOnScan: booleancreatedAt: stringcreatedBy: stringcustomFields: Json | null@@ -13341,6 +13378,7 @@ export type Database = {}Insert: {companyId: string+ completeAllOnScan?: booleancreatedAt?: stringcreatedBy: stringcustomFields?: Json | null@@ -13370,6 +13408,7 @@ export type Database = {}Update: {companyId?: string+ completeAllOnScan?: booleancreatedAt?: stringcreatedBy?: stringcustomFields?: Json | null@@ -24716,6 +24755,7 @@ export type Database = {quoteOperation: {Row: {companyId: string+ completeAllOnScan: booleancreatedAt: stringcreatedBy: stringcustomFields: Json | null@@ -24750,6 +24790,7 @@ export type Database = {}Insert: {companyId: string+ completeAllOnScan?: booleancreatedAt?: stringcreatedBy: stringcustomFields?: Json | null@@ -24784,6 +24825,7 @@ export type Database = {}Update: {companyId?: string+ completeAllOnScan?: booleancreatedAt?: stringcreatedBy?: stringcustomFields?: Json | null@@ -39784,12 +39826,16 @@ export type Database = {kanbans: {Row: {autoRelease: boolean | null+ autoStartJob: boolean | nullcompanyId: string | null+ completedBarcodeOverride: string | nullconversionFactor: number | nullcreatedAt: string | nullcreatedBy: string | nullid: string | nullitemId: string | null+ jobId: string | null+ jobReadableId: string | nulllocationId: string | nulllocationName: string | nullname: string | null@@ -39906,6 +39952,27 @@ export type Database = {referencedRelation: "tools"referencedColumns: ["id"]},+ {+ foreignKeyName: "kanban_jobId_fkey"+ columns: ["jobId"]+ isOneToOne: false+ referencedRelation: "job"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "kanban_jobId_fkey"+ columns: ["jobId"]+ isOneToOne: false+ referencedRelation: "jobs"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "kanban_jobId_fkey"+ columns: ["jobId"]+ isOneToOne: false+ referencedRelation: "openProductionOrders"+ referencedColumns: ["id"]+ },{foreignKeyName: "kanban_locationId_fkey"columns: ["locationId"]@@ -40983,14 +41050,14 @@ export type Database = {},{foreignKeyName: "partner_id_fkey"- columns: ["supplierLocationId"]+ columns: ["id"]isOneToOne: falsereferencedRelation: "supplierLocation"referencedColumns: ["id"]},{foreignKeyName: "partner_id_fkey"- columns: ["id"]+ columns: ["supplierLocationId"]isOneToOne: falsereferencedRelation: "supplierLocation"referencedColumns: ["id"]@@ -42055,6 +42122,7 @@ export type Database = {itemName: string | nullitemReadableId: string | nulljobId: string | null+ jobOperationDescription: string | nulljobOperationId: string | nulllocationId: string | nullmodelId: string | null@@ -42352,14 +42420,14 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["supplierCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["supplierCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]@@ -45406,14 +45474,14 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["paymentCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["paymentCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]@@ -49247,6 +49315,7 @@ export type Database = {| "Credit Memo"| "Blanket Order"| "Return Order"+ kanbanOutput: "label" | "qrcode" | "url"makeMethodStatus: "Draft" | "Active" | "Archived"methodOperationOrder: "After Previous" | "With Previous"methodType: "Buy" | "Make" | "Pick"diff --git a/packages/database/supabase/migrations/20251001000000_add-job-operation-description-to-purchase-order-lines.sql b/packages/database/supabase/migrations/20251001161407_add-description-to-po-line.sqlsimilarity index 95%rename from packages/database/supabase/migrations/20251001000000_add-job-operation-description-to-purchase-order-lines.sqlrename to packages/database/supabase/migrations/20251001161407_add-description-to-po-line.sqlindex 3df7b1287f..3db0a8d7b6 100644--- a/packages/database/supabase/migrations/20251001000000_add-job-operation-description-to-purchase-order-lines.sql+++ b/packages/database/supabase/migrations/20251001161407_add-description-to-po-line.sql@@ -1,4 +1,3 @@--- Add jobOperation description to purchaseOrderLines viewDROP VIEW IF EXISTS "purchaseOrderLines";CREATE OR REPLACE VIEW "purchaseOrderLines" WITH(SECURITY_INVOKER=true) AS (@@ -28,4 +27,4 @@ CREATE OR REPLACE VIEW "purchaseOrderLines" WITH(SECURITY_INVOKER=true) AS (LEFT JOIN "modelUpload" imu ON imu.id = i."modelUploadId"LEFT JOIN "supplierPart" sp ON sp."supplierId" = so."supplierId" AND sp."itemId" = i.idLEFT JOIN "jobOperation" jo ON jo."id" = pl."jobOperationId"-);+);\ No newline at end of filediff --git a/packages/documents/src/pdf/PurchaseOrderPDF.tsx b/packages/documents/src/pdf/PurchaseOrderPDF.tsxindex 7ffd7738f0..6a7dd89bb4 100644--- a/packages/documents/src/pdf/PurchaseOrderPDF.tsx+++ b/packages/documents/src/pdf/PurchaseOrderPDF.tsx@@ -212,7 +212,7 @@ const PurchaseOrderPDF = ({{purchaseOrder.purchaseOrderType === "Outside Processing" &&line.jobOperationDescription && (<Text style={tw("text-[9px] opacity-80 mt-1")}>- Operation: {line.jobOperationDescription}+ {line.jobOperationDescription}</Text>)}</View>