Skip to content

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.

feat: add outside processing description to purchase order

Brad Barbin59d41110801a
diff --git a/packages/database/src/types.ts b/packages/database/src/types.ts
index 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: string
inventoryJobCompletedNotificationGroup: string[]
+ kanbanOutput: Database["public"]["Enums"]["kanbanOutput"]
materialGeneratedIds: boolean
productLabelSize: string | null
rfqReadyNotificationGroup: string[]
@@ -2256,6 +2257,7 @@ export type Database = {
digitalQuoteNotificationGroup?: string[]
id: string
inventoryJobCompletedNotificationGroup?: string[]
+ kanbanOutput?: Database["public"]["Enums"]["kanbanOutput"]
materialGeneratedIds?: boolean
productLabelSize?: string | null
rfqReadyNotificationGroup?: string[]
@@ -2269,6 +2271,7 @@ export type Database = {
digitalQuoteNotificationGroup?: string[]
id?: string
inventoryJobCompletedNotificationGroup?: string[]
+ kanbanOutput?: Database["public"]["Enums"]["kanbanOutput"]
materialGeneratedIds?: boolean
productLabelSize?: string | null
rfqReadyNotificationGroup?: string[]
@@ -10214,6 +10217,7 @@ export type Database = {
Row: {
assignee: string | null
companyId: string
+ completeAllOnScan: boolean
createdAt: string
createdBy: string
customFields: Json | null
@@ -10256,6 +10260,7 @@ export type Database = {
Insert: {
assignee?: string | null
companyId: string
+ completeAllOnScan?: boolean
createdAt?: string
createdBy: string
customFields?: Json | null
@@ -10298,6 +10303,7 @@ export type Database = {
Update: {
assignee?: string | null
companyId?: string
+ completeAllOnScan?: boolean
createdAt?: string
createdBy?: string
customFields?: Json | null
@@ -11650,12 +11656,15 @@ export type Database = {
kanban: {
Row: {
autoRelease: boolean
+ autoStartJob: boolean
companyId: string
+ completedBarcodeOverride: string | null
conversionFactor: number
createdAt: string
createdBy: string
id: string
itemId: string
+ jobId: string | null
locationId: string
purchaseUnitOfMeasureCode: string | null
quantity: number
@@ -11667,12 +11676,15 @@ export type Database = {
}
Insert: {
autoRelease?: boolean
+ autoStartJob?: boolean
companyId: string
+ completedBarcodeOverride?: string | null
conversionFactor?: number
createdAt?: string
createdBy: string
id?: string
itemId: string
+ jobId?: string | null
locationId: string
purchaseUnitOfMeasureCode?: string | null
quantity: number
@@ -11684,12 +11696,15 @@ export type Database = {
}
Update: {
autoRelease?: boolean
+ autoStartJob?: boolean
companyId?: string
+ completedBarcodeOverride?: string | null
conversionFactor?: number
createdAt?: string
createdBy?: string
id?: string
itemId?: string
+ jobId?: string | null
locationId?: string
purchaseUnitOfMeasureCode?: string | null
quantity?: 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: boolean
createdAt: string
createdBy: string
customFields: Json | null
@@ -13341,6 +13378,7 @@ export type Database = {
}
Insert: {
companyId: string
+ completeAllOnScan?: boolean
createdAt?: string
createdBy: string
customFields?: Json | null
@@ -13370,6 +13408,7 @@ export type Database = {
}
Update: {
companyId?: string
+ completeAllOnScan?: boolean
createdAt?: string
createdBy?: string
customFields?: Json | null
@@ -24716,6 +24755,7 @@ export type Database = {
quoteOperation: {
Row: {
companyId: string
+ completeAllOnScan: boolean
createdAt: string
createdBy: string
customFields: Json | null
@@ -24750,6 +24790,7 @@ export type Database = {
}
Insert: {
companyId: string
+ completeAllOnScan?: boolean
createdAt?: string
createdBy: string
customFields?: Json | null
@@ -24784,6 +24825,7 @@ export type Database = {
}
Update: {
companyId?: string
+ completeAllOnScan?: boolean
createdAt?: string
createdBy?: string
customFields?: Json | null
@@ -39784,12 +39826,16 @@ export type Database = {
kanbans: {
Row: {
autoRelease: boolean | null
+ autoStartJob: boolean | null
companyId: string | null
+ completedBarcodeOverride: string | null
conversionFactor: number | null
createdAt: string | null
createdBy: string | null
id: string | null
itemId: string | null
+ jobId: string | null
+ jobReadableId: string | null
locationId: string | null
locationName: string | null
name: 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: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
},
{
foreignKeyName: "partner_id_fkey"
- columns: ["id"]
+ columns: ["supplierLocationId"]
isOneToOne: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
@@ -42055,6 +42122,7 @@ export type Database = {
itemName: string | null
itemReadableId: string | null
jobId: string | null
+ jobOperationDescription: string | null
jobOperationId: string | null
locationId: string | null
modelId: string | null
@@ -42352,14 +42420,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["supplierCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["supplierCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -45406,14 +45474,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["paymentCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["paymentCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "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.ts
index 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: string
inventoryJobCompletedNotificationGroup: string[]
+ kanbanOutput: Database["public"]["Enums"]["kanbanOutput"]
materialGeneratedIds: boolean
productLabelSize: string | null
rfqReadyNotificationGroup: string[]
@@ -2256,6 +2257,7 @@ export type Database = {
digitalQuoteNotificationGroup?: string[]
id: string
inventoryJobCompletedNotificationGroup?: string[]
+ kanbanOutput?: Database["public"]["Enums"]["kanbanOutput"]
materialGeneratedIds?: boolean
productLabelSize?: string | null
rfqReadyNotificationGroup?: string[]
@@ -2269,6 +2271,7 @@ export type Database = {
digitalQuoteNotificationGroup?: string[]
id?: string
inventoryJobCompletedNotificationGroup?: string[]
+ kanbanOutput?: Database["public"]["Enums"]["kanbanOutput"]
materialGeneratedIds?: boolean
productLabelSize?: string | null
rfqReadyNotificationGroup?: string[]
@@ -10214,6 +10217,7 @@ export type Database = {
Row: {
assignee: string | null
companyId: string
+ completeAllOnScan: boolean
createdAt: string
createdBy: string
customFields: Json | null
@@ -10256,6 +10260,7 @@ export type Database = {
Insert: {
assignee?: string | null
companyId: string
+ completeAllOnScan?: boolean
createdAt?: string
createdBy: string
customFields?: Json | null
@@ -10298,6 +10303,7 @@ export type Database = {
Update: {
assignee?: string | null
companyId?: string
+ completeAllOnScan?: boolean
createdAt?: string
createdBy?: string
customFields?: Json | null
@@ -11650,12 +11656,15 @@ export type Database = {
kanban: {
Row: {
autoRelease: boolean
+ autoStartJob: boolean
companyId: string
+ completedBarcodeOverride: string | null
conversionFactor: number
createdAt: string
createdBy: string
id: string
itemId: string
+ jobId: string | null
locationId: string
purchaseUnitOfMeasureCode: string | null
quantity: number
@@ -11667,12 +11676,15 @@ export type Database = {
}
Insert: {
autoRelease?: boolean
+ autoStartJob?: boolean
companyId: string
+ completedBarcodeOverride?: string | null
conversionFactor?: number
createdAt?: string
createdBy: string
id?: string
itemId: string
+ jobId?: string | null
locationId: string
purchaseUnitOfMeasureCode?: string | null
quantity: number
@@ -11684,12 +11696,15 @@ export type Database = {
}
Update: {
autoRelease?: boolean
+ autoStartJob?: boolean
companyId?: string
+ completedBarcodeOverride?: string | null
conversionFactor?: number
createdAt?: string
createdBy?: string
id?: string
itemId?: string
+ jobId?: string | null
locationId?: string
purchaseUnitOfMeasureCode?: string | null
quantity?: 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: boolean
createdAt: string
createdBy: string
customFields: Json | null
@@ -13341,6 +13378,7 @@ export type Database = {
}
Insert: {
companyId: string
+ completeAllOnScan?: boolean
createdAt?: string
createdBy: string
customFields?: Json | null
@@ -13370,6 +13408,7 @@ export type Database = {
}
Update: {
companyId?: string
+ completeAllOnScan?: boolean
createdAt?: string
createdBy?: string
customFields?: Json | null
@@ -24716,6 +24755,7 @@ export type Database = {
quoteOperation: {
Row: {
companyId: string
+ completeAllOnScan: boolean
createdAt: string
createdBy: string
customFields: Json | null
@@ -24750,6 +24790,7 @@ export type Database = {
}
Insert: {
companyId: string
+ completeAllOnScan?: boolean
createdAt?: string
createdBy: string
customFields?: Json | null
@@ -24784,6 +24825,7 @@ export type Database = {
}
Update: {
companyId?: string
+ completeAllOnScan?: boolean
createdAt?: string
createdBy?: string
customFields?: Json | null
@@ -39784,12 +39826,16 @@ export type Database = {
kanbans: {
Row: {
autoRelease: boolean | null
+ autoStartJob: boolean | null
companyId: string | null
+ completedBarcodeOverride: string | null
conversionFactor: number | null
createdAt: string | null
createdBy: string | null
id: string | null
itemId: string | null
+ jobId: string | null
+ jobReadableId: string | null
locationId: string | null
locationName: string | null
name: 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: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
},
{
foreignKeyName: "partner_id_fkey"
- columns: ["id"]
+ columns: ["supplierLocationId"]
isOneToOne: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
@@ -42055,6 +42122,7 @@ export type Database = {
itemName: string | null
itemReadableId: string | null
jobId: string | null
+ jobOperationDescription: string | null
jobOperationId: string | null
locationId: string | null
modelId: string | null
@@ -42352,14 +42420,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["supplierCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["supplierCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -45406,14 +45474,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["paymentCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["paymentCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "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.sql
similarity index 95%
rename from packages/database/supabase/migrations/20251001000000_add-job-operation-description-to-purchase-order-lines.sql
rename to packages/database/supabase/migrations/20251001161407_add-description-to-po-line.sql
index 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 view
DROP 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.id
LEFT JOIN "jobOperation" jo ON jo."id" = pl."jobOperationId"
-);
+);
\ No newline at end of file
diff --git a/packages/documents/src/pdf/PurchaseOrderPDF.tsx b/packages/documents/src/pdf/PurchaseOrderPDF.tsx
index 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>