diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.js b/erpnext/manufacturing/doctype/production_plan/production_plan.js index 24062353248..2aeea5827db 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.js +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.js @@ -272,11 +272,12 @@ frappe.ui.form.on("Production Plan Item", { frappe.ui.form.on("Material Request Plan Item", { warehouse: function(frm, cdt, cdn) { const row = locals[cdt][cdn]; - if (row.warehouse && row.item_code) { + if (row.warehouse && row.item_code && frm.doc.company) { frappe.call({ method: "erpnext.manufacturing.doctype.production_plan.production_plan.get_bin_details", args: { row: row, + company: frm.doc.company, for_warehouse: row.warehouse }, callback: function(r) {