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: don't use default shelf for null shelf

Brad Barbin509be325fbc1
diff --git a/apps/erp/app/modules/inventory/ui/Inventory/InventoryShelves.tsx b/apps/erp/app/modules/inventory/ui/Inventory/InventoryShelves.tsx
index c84f58d23d..c25a680d02 100644
--- a/apps/erp/app/modules/inventory/ui/Inventory/InventoryShelves.tsx
+++ b/apps/erp/app/modules/inventory/ui/Inventory/InventoryShelves.tsx
@@ -78,6 +78,8 @@ const InventoryShelves = ({
const [selectedShelfId, setSelectedShelfId] = useState<string | null>(null);
const openAdjustmentModal = (shelfId?: string) => {
+ console.log(shelfId);
+ console.log(`setting selected shelf id to ${shelfId}`);
setSelectedShelfId(shelfId || null);
adjustmentModal.onOpen();
};
@@ -179,7 +181,7 @@ const InventoryShelves = ({
itemId: pickMethod.itemId,
quantity: quantity,
locationId: pickMethod.locationId,
- shelfId: selectedShelfId || pickMethod.defaultShelfId,
+ shelfId: selectedShelfId || undefined,
adjustmentType: isSerial ? "Positive Adjmt." : "Set Quantity",
trackedEntityId: nanoid(),
}}