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: get material types

Sidwebworks630f82c716a8
diff --git a/apps/erp/app/modules/items/items.service.ts b/apps/erp/app/modules/items/items.service.ts
index e8c721d3b4..3d6bd0709e 100644
--- a/apps/erp/app/modules/items/items.service.ts
+++ b/apps/erp/app/modules/items/items.service.ts
@@ -2904,15 +2904,11 @@ export async function deleteMaterialType(
export async function getMaterialTypes(
client: SupabaseClient<Database>,
companyId: string,
- materialFormId: string,
- materialSubstanceId: string,
args?: GenericQueryFilters & { search: string | null }
) {
let query = client
.from("materialTypes")
.select("*", { count: "exact" })
- .eq("materialFormId", materialFormId)
- .eq("materialSubstanceId", materialSubstanceId)
.or(`companyId.eq.${companyId},companyId.is.null`);
if (args?.search) {