From 57835f0a3763416ba86f4b43aac146444602a01b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 16 Sep 2019 14:48:16 +0530 Subject: [PATCH] fix: Company is required to get bin details (#19058) --- .../manufacturing/doctype/production_plan/production_plan.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.js b/erpnext/manufacturing/doctype/production_plan/production_plan.js index 2406235324..2aeea5827d 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) {