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: update state on method type change in bom

Brad Barbine222e39f02a0
diff --git a/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx b/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx
index ec59cbc808..287616d04d 100644
--- a/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx
+++ b/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx
@@ -833,6 +833,12 @@ function MaterialForm({
name="methodType"
label="Method Type"
value={itemData.methodType}
+ onChange={(value) => {
+ setItemData((d) => ({
+ ...d,
+ methodType: value?.value as MethodType,
+ }));
+ }}
isConfigured={rulesByField.has(key("methodType"))}
onConfigure={
configurable && !temporaryItems[item.id]
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx b/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx
index dd82651b26..05eefb279c 100644
--- a/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx
@@ -876,6 +876,12 @@ function MaterialForm({
name="methodType"
label="Method Type"
value={itemData.methodType}
+ onChange={(value) => {
+ setItemData((d) => ({
+ ...d,
+ methodType: value?.value as MethodType,
+ }));
+ }}
replenishmentSystem="Buy and Make"
/>
<Shelf
diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx
index d0d037a0f4..437fe6df1c 100644
--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx
+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx
@@ -840,6 +840,12 @@ function MaterialForm({
name="methodType"
label="Method Type"
value={itemData.methodType}
+ onChange={(value) => {
+ setItemData((d) => ({
+ ...d,
+ methodType: value?.value as MethodType,
+ }));
+ }}
replenishmentSystem="Buy and Make"
/>
<Shelf