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.

fix: fix upsertCurrency to match new schema

Rob Carringtonb7b6b19f674a
diff --git a/apps/carbon/app/modules/accounting/accounting.models.ts b/apps/carbon/app/modules/accounting/accounting.models.ts
index 846ce76359..bdc3ca1a52 100644
--- a/apps/carbon/app/modules/accounting/accounting.models.ts
+++ b/apps/carbon/app/modules/accounting/accounting.models.ts
@@ -180,9 +180,7 @@ export const accountSubcategoryValidator = z.object({
export const currencyValidator = z.object({
id: zfd.text(z.string().optional()),
- name: z.string().min(1, { message: "Name is required" }),
code: z.string().min(1, { message: "Code is required" }),
- symbol: z.string().min(1, { message: "Symbol is required" }),
decimalPlaces: zfd.numeric(z.number().min(0).max(4)),
exchangeRate: zfd.numeric(z.number().min(0, { message: "Rate is required" })),
});
diff --git a/packages/database/src/swagger-docs-schema.ts b/packages/database/src/swagger-docs-schema.ts
index 6a101f6a7a..7595033bae 100644
--- a/packages/database/src/swagger-docs-schema.ts
+++ b/packages/database/src/swagger-docs-schema.ts
@@ -47091,7 +47091,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",
},
@@ -47140,7 +47140,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",
},