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
chore: regenerate types and alter view
Sidwebworksfee68343643c
diff --git a/packages/database/src/types.ts b/packages/database/src/types.tsindex 249891fe25..a9585354b2 100644--- a/packages/database/src/types.ts+++ b/packages/database/src/types.ts@@ -12283,7 +12283,7 @@ export type Database = {{foreignKeyName: "inboundInspectionSample_trackedEntityId_fkey"columns: ["trackedEntityId"]- isOneToOne: true+ isOneToOne: falsereferencedRelation: "trackedEntity"referencedColumns: ["id"]},@@ -31524,7 +31524,7 @@ export type Database = {employeeId: string | nullexpirationDate: string | nullid: string- internalNotes: string | null+ internalNotes: Json | nulllocationId: string | nullnotes: Json | nullrevisionId: number@@ -31543,7 +31543,7 @@ export type Database = {employeeId?: string | nullexpirationDate?: string | nullid?: string- internalNotes?: string | null+ internalNotes?: Json | nulllocationId?: string | nullnotes?: Json | nullrevisionId?: number@@ -31562,7 +31562,7 @@ export type Database = {employeeId?: string | nullexpirationDate?: string | nullid?: string- internalNotes?: string | null+ internalNotes?: Json | nulllocationId?: string | nullnotes?: Json | nullrevisionId?: number@@ -39227,7 +39227,7 @@ export type Database = {},]}- searchIndex_d8nlqei680h02ctl3jt0: {+ searchIndex_d8lth5d460h02afg19og: {Row: {createdAt: stringdescription: string | null@@ -39269,7 +39269,7 @@ export type Database = {}Relationships: []}- searchIndex_Lk5DVhpLGA5fxtFQYdhWY3: {+ searchIndex_M3T8GH5QxJoQYRZ3nQzQMQ: {Row: {createdAt: stringdescription: string | null@@ -57062,14 +57062,14 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["supplierCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["supplierCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]@@ -57659,7 +57659,7 @@ export type Database = {expirationDate: string | nullfavorite: boolean | nullid: string | null- internalNotes: string | null+ internalNotes: Json | nulllocationId: string | nulllocationName: string | nullnotes: Json | null@@ -60495,21 +60495,21 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["invoiceCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["shipmentCountryCode"]+ columns: ["invoiceCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["shipmentCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]diff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.tsindex e3f6775fe5..a9585354b2 100644--- a/packages/database/supabase/functions/lib/types.ts+++ b/packages/database/supabase/functions/lib/types.ts@@ -12142,7 +12142,7 @@ export type Database = {inspectedBy: string | nullnotes: string | nullstatus: Database["public"]["Enums"]["inboundInspectionSampleStatus"]- trackedEntityId: string+ trackedEntityId: string | nullupdatedAt: string | nullupdatedBy: string | null}@@ -12156,7 +12156,7 @@ export type Database = {inspectedBy?: string | nullnotes?: string | nullstatus?: Database["public"]["Enums"]["inboundInspectionSampleStatus"]- trackedEntityId: string+ trackedEntityId?: string | nullupdatedAt?: string | nullupdatedBy?: string | null}@@ -12170,7 +12170,7 @@ export type Database = {inspectedBy?: string | nullnotes?: string | nullstatus?: Database["public"]["Enums"]["inboundInspectionSampleStatus"]- trackedEntityId?: string+ trackedEntityId?: string | nullupdatedAt?: string | nullupdatedBy?: string | null}@@ -12283,7 +12283,7 @@ export type Database = {{foreignKeyName: "inboundInspectionSample_trackedEntityId_fkey"columns: ["trackedEntityId"]- isOneToOne: true+ isOneToOne: falsereferencedRelation: "trackedEntity"referencedColumns: ["id"]},@@ -13011,6 +13011,7 @@ export type Database = {replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]requiresInspection: booleanrevision: string | null+ sourcingType: Database["public"]["Enums"]["sourcingType"]thumbnailPath: string | nulltrackingMethod: string | nulltype: Database["public"]["Enums"]["itemType"]@@ -13037,6 +13038,7 @@ export type Database = {replenishmentSystem?: Database["public"]["Enums"]["itemReplenishmentSystem"]requiresInspection?: booleanrevision?: string | null+ sourcingType?: Database["public"]["Enums"]["sourcingType"]thumbnailPath?: string | nulltrackingMethod?: string | nulltype: Database["public"]["Enums"]["itemType"]@@ -13063,6 +13065,7 @@ export type Database = {replenishmentSystem?: Database["public"]["Enums"]["itemReplenishmentSystem"]requiresInspection?: booleanrevision?: string | null+ sourcingType?: Database["public"]["Enums"]["sourcingType"]thumbnailPath?: string | nulltrackingMethod?: string | nulltype?: Database["public"]["Enums"]["itemType"]@@ -31521,7 +31524,7 @@ export type Database = {employeeId: string | nullexpirationDate: string | nullid: string- internalNotes: string | null+ internalNotes: Json | nulllocationId: string | nullnotes: Json | nullrevisionId: number@@ -31540,7 +31543,7 @@ export type Database = {employeeId?: string | nullexpirationDate?: string | nullid?: string- internalNotes?: string | null+ internalNotes?: Json | nulllocationId?: string | nullnotes?: Json | nullrevisionId?: number@@ -31559,7 +31562,7 @@ export type Database = {employeeId?: string | nullexpirationDate?: string | nullid?: string- internalNotes?: string | null+ internalNotes?: Json | nulllocationId?: string | nullnotes?: Json | nullrevisionId?: number@@ -39224,7 +39227,7 @@ export type Database = {},]}- searchIndex_d8nlqei680h02ctl3jt0: {+ searchIndex_d8lth5d460h02afg19og: {Row: {createdAt: stringdescription: string | null@@ -39266,7 +39269,7 @@ export type Database = {}Relationships: []}- searchIndex_Lk5DVhpLGA5fxtFQYdhWY3: {+ searchIndex_M3T8GH5QxJoQYRZ3nQzQMQ: {Row: {createdAt: stringdescription: string | null@@ -55468,6 +55471,7 @@ export type Database = {| nullrevision: string | nullrevisions: Json | null+ sourcingType: Database["public"]["Enums"]["sourcingType"] | nullsupplierIds: string | nulltags: string[] | nullthumbnailPath: string | null@@ -57058,14 +57062,14 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["supplierCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["supplierCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]@@ -57655,7 +57659,7 @@ export type Database = {expirationDate: string | nullfavorite: boolean | nullid: string | null- internalNotes: string | null+ internalNotes: Json | nulllocationId: string | nulllocationName: string | nullnotes: Json | null@@ -60491,21 +60495,21 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["invoiceCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["shipmentCountryCode"]+ columns: ["invoiceCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["shipmentCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]@@ -61102,6 +61106,7 @@ export type Database = {customerLocationId: string | nullcustomerReference: string | nullcustomFields: Json | null+ displayStatus: Database["public"]["Enums"]["salesOrderStatus"] | nulldropShipment: boolean | nullexchangeRate: number | nullexchangeRateUpdatedAt: string | null@@ -63791,6 +63796,7 @@ export type Database = {| nullrevision: string | nullrevisions: Json | null+ sourcingType: Database["public"]["Enums"]["sourcingType"] | nullsupplierIds: string | nulltags: string[] | nullthumbnailPath: string | null@@ -65495,6 +65501,7 @@ export type Database = {requiresInspection: booleanrevision: stringrevisions: Json+ sourcingType: Database["public"]["Enums"]["sourcingType"]tags: string[]thumbnailPath: stringunitOfMeasure: string@@ -65513,6 +65520,19 @@ export type Database = {pickingListLineId: string}[]}+ get_picking_list_tracked_available: {+ Args: { p_picking_list_id: string }+ Returns: {+ availableQuantity: number+ createdAt: string+ expirationDate: string+ itemId: string+ readableId: string+ storageUnitId: string+ storageUnitName: string+ trackedEntityId: string+ }[]+ }get_picking_schedule: {Args: { p_company_id: string; p_location_id: string; p_search?: string }Returns: {@@ -66009,6 +66029,7 @@ export type Database = {requiresInspection: booleanrevision: stringrevisions: Json+ sourcingType: Database["public"]["Enums"]["sourcingType"]tags: string[]thumbnailPath: stringunitOfMeasure: string@@ -66819,6 +66840,7 @@ export type Database = {| "Purchase Order"| "Maintenance Consumption"| "Non-Conformance"+ | "Inbound Inspection"itemLedgerType:| "Purchase"| "Sale"@@ -68108,6 +68130,7 @@ export const Constants = {"Purchase Order","Maintenance Consumption","Non-Conformance",+ "Inbound Inspection",],itemLedgerType: ["Purchase",diff --git a/packages/database/supabase/migrations/20260622195346_purchasing-rfq-internal-notes-json.sql b/packages/database/supabase/migrations/20260622195346_purchasing-rfq-internal-notes-json.sqlindex f6b3b2f7bf..afb42f1b69 100644--- a/packages/database/supabase/migrations/20260622195346_purchasing-rfq-internal-notes-json.sql+++ b/packages/database/supabase/migrations/20260622195346_purchasing-rfq-internal-notes-json.sql@@ -3,6 +3,11 @@-- rich-text Editor writes a JSONContent object, so the TEXT column stored a JSON-- string that the loader handed back to the Editor unparsed, rendering raw JSON.-- Align the column type with the rest of the codebase.+--+-- The "purchasingRfqs" view selects rfq.* so it depends on this column and must be+-- dropped before the type change, then recreated unchanged.++DROP VIEW IF EXISTS "purchasingRfqs";ALTER TABLE "purchasingRfq"ALTER COLUMN "internalNotes" TYPE JSON USING@@ -11,3 +16,13 @@ ALTER TABLE "purchasingRfq"ELSE "internalNotes"::JSONEND,ALTER COLUMN "internalNotes" SET DEFAULT '{}';++CREATE OR REPLACE VIEW "purchasingRfqs" WITH(SECURITY_INVOKER=true) AS+ SELECT+ rfq.*,+ l."name" AS "locationName",+ (SELECT COUNT(*) FROM "purchasingRfqSupplier" rs WHERE rs."purchasingRfqId" = rfq.id) AS "supplierCount",+ (SELECT COALESCE(array_agg(s."id" ORDER BY s."id"), ARRAY[]::TEXT[]) FROM "purchasingRfqSupplier" rs JOIN "supplier" s ON s.id = rs."supplierId" WHERE rs."purchasingRfqId" = rfq.id) AS "supplierIds",+ EXISTS(SELECT 1 FROM "purchasingRfqFavorite" rf WHERE rf."rfqId" = rfq.id AND rf."userId" = auth.uid()::text) AS favorite+ FROM "purchasingRfq" rfq+ LEFT JOIN "location" l ON l.id = rfq."locationId";diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.poindex fcb5ca9d98..e52d8904c5 100644--- a/packages/locale/locales/tr/erp.po+++ b/packages/locale/locales/tr/erp.po@@ -1095,6 +1095,9 @@ msgstr "Bilanço"msgid "Balloon"msgstr "Balon"+msgid "Bars show each week's flow: <0>supply</0> pushes inventory up, <1>demand</1> pulls it down. The <2>line</2> is your projected on-hand inventory — when it dips below <3>safety stock</3> you're at risk, and below zero is a <4>stockout</4>."+msgstr ""+msgid "Base Currency"msgstr "Temel Para Birimi"@@ -1125,6 +1128,9 @@ msgstr "Lot Boyutu"msgid "Batch Tracking"msgstr "Lot Takibi"+msgid "Below safety stock"+msgstr ""+msgid "Beta"msgstr "Beta"@@ -1614,6 +1620,12 @@ msgstr "İçe Aktarmayı Onayla"msgid "Confirm Password"msgstr "Şifreyi Onayla"+msgid "Confirmed incoming stock — purchase & production orders (bars above zero)."+msgstr ""++msgid "Confirmed outgoing stock — sales orders & job materials (bars below zero)."+msgstr ""+msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."msgstr "Carbon'ı muhasebe, proje yönetimi ve CAD araçlarınızla ve çok daha fazlasıyla bağlayın."@@ -3959,6 +3971,9 @@ msgstr "Çözülen fiyatın nasıl hesaplandığı."msgid "How this price was calculated"msgstr "Bu fiyat nasıl hesaplandı"+msgid "How to read this chart"+msgstr ""+msgid "Humidity"msgstr "Nemlilik"@@ -5471,6 +5486,9 @@ msgstr "Bu görünüme herhangi bir sıralama uygulanmadı"msgid "No stock"msgstr "Stok yok"+msgid "No stockout projected in the next 48 weeks"+msgstr ""+msgid "No suppliers yet"msgstr "Henüz tedarikçi yok"@@ -5969,6 +5987,9 @@ msgstr "Plan"msgid "Plan Type"msgstr "Plan Türü"+msgid "Planned"+msgstr ""+msgid "Planned End"msgstr "Planlanan Bitiş"@@ -6220,9 +6241,29 @@ msgstr "İlerleme"msgid "Project"msgstr "Proje"+msgid "Projected demand exploded from BOMs and forecasts."+msgstr ""++msgid "Projected inventory"+msgstr ""++msgid "Projected on hand"+msgstr ""+msgid "Projected stock"msgstr "Tahmini stok"+#. placeholder {0}: formatWeek(stockoutDate)+msgid "Projected stockout the week of {0}"+msgstr ""++#. placeholder {0}: formatWeek(belowSafetyDate)+msgid "Projected to drop below safety stock the week of {0}"+msgstr ""++msgid "Projected to stay above safety stock"+msgstr ""+msgid "Projection"msgstr "Projeksiyon"@@ -6869,6 +6910,9 @@ msgstr "Kurallar"msgid "Run Test"msgstr "Testi Çalıştır"+msgid "Running inventory after each week's supply and demand — the line."+msgstr ""+msgid "Running Total"msgstr "Kümülatif Toplam"@@ -6878,6 +6922,10 @@ msgstr "Güvenlik stoğu"msgid "Safety Stock"msgstr "Güvenlik Stoğu"+#. placeholder {0}: numberFormatter.format(safetyStockValue)+msgid "Safety stock ({0})"+msgstr ""+msgid "Safety Stock:"msgstr "Güvenlik Stoğu:"@@ -7681,6 +7729,9 @@ msgstr "Stok Transfer Sihirbazı"msgid "Stock Transfers"msgstr "Stok Transferleri"+msgid "Stockout"+msgstr ""+msgid "Storage client not available"msgstr "Depolama istemcisi kullanılamıyor"@@ -7759,6 +7810,9 @@ msgstr "Başarıyla yeni bir revizyon oluşturuldu"msgid "Suffix"msgstr "Sonek"+msgid "Suggested orders you haven't placed yet."+msgstr ""+msgid "Suggestion"msgstr "Öneri"@@ -7988,6 +8042,9 @@ msgstr "Nakit indirimi için mevcut olan gün sayısı hesaplama yönteminden itmsgid "The amount of days after the calculation method that the payment is due"msgstr "Ödeme vadesinin hesaplama yönteminden sonraki gün sayısı"+msgid "The dashed threshold you don't want inventory to fall below."+msgstr ""+msgid "The date the customer expects to receive the goods"msgstr "Müşterinin malı almayı beklediği tarih"@@ -8877,6 +8934,10 @@ msgstr "Web Sitesi"msgid "Wednesday"msgstr "Çarşamba"+#. placeholder {0}: dateFormatter.format(parseDate(d.startDate).toDate(getLocalTimeZone()))+msgid "Week of {0}"+msgstr ""+msgid "Weeks Open"msgstr "Açık Haftalar"