fix: Company is required to get bin details (#19058)

This commit is contained in:
Nabin Hait 2019-09-16 14:48:16 +05:30 committed by GitHub
parent 72dcb51177
commit 57835f0a37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {