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
Fix nullish check for PO
Gaurav Bhatt904d3d3cff30
diff --git a/packages/documents/src/utils/purchase-order.ts b/packages/documents/src/utils/purchase-order.tsindex 32e211669f..c846532889 100644--- a/packages/documents/src/utils/purchase-order.ts+++ b/packages/documents/src/utils/purchase-order.ts@@ -11,9 +11,12 @@ export function getLineDescription(case "Comment":return line?.description;default:+ // Use `||` (not `??`) so an empty-string supplier part number falls+ // through to the item id. Supplier parts with no part number get+ // backfilled onto the line as "", and `??` would render a blank line.return (- line?.supplierPartId ??- line?.supplierPartIdFromSupplier ??+ line?.supplierPartId ||+ line?.supplierPartIdFromSupplier ||line?.itemReadableId);}