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
refactor: rename payments to billing
Brad Barbind638663dad77
diff --git a/apps/erp/app/components/AvatarMenu.tsx b/apps/erp/app/components/AvatarMenu.tsxindex d115383d0b..da9dcbe097 100644--- a/apps/erp/app/components/AvatarMenu.tsx+++ b/apps/erp/app/components/AvatarMenu.tsx@@ -160,7 +160,7 @@ const AvatarMenu = () => {{edition === Edition.Cloud && isOwner() && (<DropdownMenuItem asChild>- <Link to={path.to.settingsPayment}>+ <Link to={path.to.billing}><DropdownMenuIcon icon={<LuCreditCard />} /><span>Manage Subscription</span></Link>diff --git a/apps/erp/app/modules/settings/ui/useSettingsSubmodules.tsx b/apps/erp/app/modules/settings/ui/useSettingsSubmodules.tsxindex 313a487df8..f73fabcc16 100644--- a/apps/erp/app/modules/settings/ui/useSettingsSubmodules.tsx+++ b/apps/erp/app/modules/settings/ui/useSettingsSubmodules.tsx@@ -26,8 +26,8 @@ const settingsRoutes: AuthenticatedRouteGroup[] = [icon: <LuFactory />,},{- name: "Payment",- to: path.to.settingsPayment,+ name: "Billing",+ to: path.to.billing,role: "employee",icon: <LuCreditCard />,requiresOwnership: true,diff --git a/apps/erp/app/routes/x+/settings+/payment.tsx b/apps/erp/app/routes/x+/settings+/billing.tsxsimilarity index 98%rename from apps/erp/app/routes/x+/settings+/payment.tsxrename to apps/erp/app/routes/x+/settings+/billing.tsxindex 3633a51d8d..4ecac0dbf6 100644--- a/apps/erp/app/routes/x+/settings+/payment.tsx+++ b/apps/erp/app/routes/x+/settings+/billing.tsx@@ -35,7 +35,7 @@ import { path } from "~/utils/path";export const handle: Handle = {breadcrumb: "Payment",- to: path.to.settingsPayment,+ to: path.to.billing,};const transferOwnershipValidator = z.object({@@ -177,7 +177,7 @@ export default function PaymentSettings() {spacing={4}className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4">- <Heading size="h3">Payment</Heading>+ <Heading size="h3">Billing</Heading>{edition === Edition.Cloud && isOwner() && (<><Card>@@ -232,7 +232,7 @@ export default function PaymentSettings() {</VStack></CardContent><CardFooter>- <Form method="post" action={path.to.settingsPayment}>+ <Form method="post" action={path.to.billing}><input type="hidden" name="intent" value="billing-portal" /><Button type="submit">Manage Subscription</Button></Form>diff --git a/apps/erp/app/utils/path.ts b/apps/erp/app/utils/path.tsindex 14d830fb8a..ae8780bee9 100644--- a/apps/erp/app/utils/path.ts+++ b/apps/erp/app/utils/path.ts@@ -326,6 +326,7 @@ export const path = {generatePath(`${x}/inventory/batch-property/${itemId}/property`),batchPropertyOrder: (itemId: string) =>generatePath(`${x}/inventory/batch-property/${itemId}/property/order`),+ billing: `${x}/settings/billing`,bulkEditPermissions: `${x}/users/bulk-edit-permissions`,bulkUpdateItems: `${x}/items/update`,bulkUpdateProductionPlanning: `${x}/production/planning/update`,@@ -350,7 +351,6 @@ export const path = {company: `${x}/settings/company`,companySwitch: (companyId: string) =>generatePath(`${x}/settings/company/switch/${companyId}`),- settingsPayment: `${x}/settings/payment`,configurationParameter: (itemId: string) =>generatePath(`${x}/part/${itemId}/parameter`),configurationParameterGroup: (itemId: string) =>diff --git a/packages/database/src/swagger-docs-schema.ts b/packages/database/src/swagger-docs-schema.tsindex 9e724b3019..a5610910ad 100644--- a/packages/database/src/swagger-docs-schema.ts+++ b/packages/database/src/swagger-docs-schema.ts@@ -14295,6 +14295,87 @@ export default {tags: ["location"],},},+ "/kanbans": {+ get: {+ parameters: [+ {+ $ref: "#/parameters/rowFilter.kanbans.id",+ },+ {+ $ref: "#/parameters/rowFilter.kanbans.itemId",+ },+ {+ $ref: "#/parameters/rowFilter.kanbans.replenishmentSystem",+ },+ {+ $ref: "#/parameters/rowFilter.kanbans.quantity",+ },+ {+ $ref: "#/parameters/rowFilter.kanbans.locationId",+ },+ {+ $ref: "#/parameters/rowFilter.kanbans.companyId",+ },+ {+ $ref: "#/parameters/rowFilter.kanbans.createdAt",+ },+ {+ $ref: "#/parameters/rowFilter.kanbans.createdBy",+ },+ {+ $ref: "#/parameters/rowFilter.kanbans.updatedAt",+ },+ {+ $ref: "#/parameters/rowFilter.kanbans.updatedBy",+ },+ {+ $ref: "#/parameters/rowFilter.kanbans.name",+ },+ {+ $ref: "#/parameters/rowFilter.kanbans.readableIdWithRevision",+ },+ {+ $ref: "#/parameters/rowFilter.kanbans.locationName",+ },+ {+ $ref: "#/parameters/select",+ },+ {+ $ref: "#/parameters/order",+ },+ {+ $ref: "#/parameters/range",+ },+ {+ $ref: "#/parameters/rangeUnit",+ },+ {+ $ref: "#/parameters/offset",+ },+ {+ $ref: "#/parameters/limit",+ },+ {+ $ref: "#/parameters/preferCount",+ },+ ],+ responses: {+ "200": {+ description: "OK",+ schema: {+ items: {+ $ref: "#/definitions/kanbans",+ },+ type: "array",+ },+ },+ "206": {+ description: "Partial Content",+ },+ },+ tags: ["kanbans"],+ },+ },"/companies": {get: {parameters: [@@ -63638,7 +63719,7 @@ export default {properties: {id: {description:- "Note:\nThis is a Foreign Key to `supplierLocation.id`.<fk table='supplierLocation' column='id'/>",+ "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `supplierLocation.id`.<fk table='supplierLocation' column='id'/>",format: "text",type: "string",},@@ -63687,7 +63768,7 @@ export default {},supplierLocationId: {description:- "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `supplierLocation.id`.<fk table='supplierLocation' column='id'/>",+ "Note:\nThis is a Foreign Key to `supplierLocation.id`.<fk table='supplierLocation' column='id'/>",format: "text",type: "string",},@@ -66903,6 +66984,75 @@ export default {},type: "object",},+ kanbans: {+ properties: {+ id: {+ description: "Note:\nThis is a Primary Key.<pk/>",+ format: "text",+ type: "string",+ },+ itemId: {+ description:+ "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",+ format: "text",+ type: "string",+ },+ replenishmentSystem: {+ enum: ["Buy", "Make", "Buy and Make"],+ format: 'public."itemReplenishmentSystem"',+ type: "string",+ },+ quantity: {+ format: "integer",+ type: "integer",+ },+ locationId: {+ description:+ "Note:\nThis is a Foreign Key to `location.id`.<fk table='location' column='id'/>",+ format: "text",+ type: "string",+ },+ companyId: {+ description:+ "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",+ format: "text",+ type: "string",+ },+ createdAt: {+ format: "timestamp with time zone",+ type: "string",+ },+ createdBy: {+ description:+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",+ format: "text",+ type: "string",+ },+ updatedAt: {+ format: "timestamp with time zone",+ type: "string",+ },+ updatedBy: {+ description:+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",+ format: "text",+ type: "string",+ },+ name: {+ format: "text",+ type: "string",+ },+ readableIdWithRevision: {+ format: "text",+ type: "string",+ },+ locationName: {+ format: "text",+ type: "string",+ },+ },+ type: "object",+ },companies: {properties: {id: {@@ -93573,6 +93723,93 @@ export default {in: "query",type: "string",},+ "body.kanbans": {+ name: "kanbans",+ description: "kanbans",+ required: false,+ in: "body",+ schema: {+ $ref: "#/definitions/kanbans",+ },+ },+ "rowFilter.kanbans.id": {+ name: "id",+ required: false,+ in: "query",+ type: "string",+ },+ "rowFilter.kanbans.itemId": {+ name: "itemId",+ required: false,+ in: "query",+ type: "string",+ },+ "rowFilter.kanbans.replenishmentSystem": {+ name: "replenishmentSystem",+ required: false,+ in: "query",+ type: "string",+ },+ "rowFilter.kanbans.quantity": {+ name: "quantity",+ required: false,+ in: "query",+ type: "string",+ },+ "rowFilter.kanbans.locationId": {+ name: "locationId",+ required: false,+ in: "query",+ type: "string",+ },+ "rowFilter.kanbans.companyId": {+ name: "companyId",+ required: false,+ in: "query",+ type: "string",+ },+ "rowFilter.kanbans.createdAt": {+ name: "createdAt",+ required: false,+ in: "query",+ type: "string",+ },+ "rowFilter.kanbans.createdBy": {+ name: "createdBy",+ required: false,+ in: "query",+ type: "string",+ },+ "rowFilter.kanbans.updatedAt": {+ name: "updatedAt",+ required: false,+ in: "query",+ type: "string",+ },+ "rowFilter.kanbans.updatedBy": {+ name: "updatedBy",+ required: false,+ in: "query",+ type: "string",+ },+ "rowFilter.kanbans.name": {+ name: "name",+ required: false,+ in: "query",+ type: "string",+ },+ "rowFilter.kanbans.readableIdWithRevision": {+ name: "readableIdWithRevision",+ required: false,+ in: "query",+ type: "string",+ },+ "rowFilter.kanbans.locationName": {+ name: "locationName",+ required: false,+ in: "query",+ type: "string",+ },"body.companies": {name: "companies",description: "companies",diff --git a/packages/database/src/types.ts b/packages/database/src/types.tsindex 9845ce172c..24f6ebdb13 100644--- a/packages/database/src/types.ts+++ b/packages/database/src/types.ts@@ -41820,14 +41820,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"]@@ -44255,14 +44255,14 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["invoiceCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["invoiceCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]diff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.tsindex 9845ce172c..24f6ebdb13 100644--- a/packages/database/supabase/functions/lib/types.ts+++ b/packages/database/supabase/functions/lib/types.ts@@ -41820,14 +41820,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"]@@ -44255,14 +44255,14 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["invoiceCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["invoiceCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]