Merge pull request #39342 from frappe/mergify/bp/version-15-hotfix/pr-38970
fix: use local attribute range in multiple item variant dialog (backport #38970)
This commit is contained in:
commit
049864e7a2
@ -600,28 +600,14 @@ $.extend(erpnext.item, {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
frappe.call({
|
|
||||||
method: "frappe.client.get",
|
|
||||||
args: {
|
|
||||||
doctype: "Item Attribute",
|
|
||||||
name: d.attribute
|
|
||||||
}
|
|
||||||
}).then((r) => {
|
|
||||||
if(r.message) {
|
|
||||||
const from = r.message.from_range;
|
|
||||||
const to = r.message.to_range;
|
|
||||||
const increment = r.message.increment;
|
|
||||||
|
|
||||||
let values = [];
|
let values = [];
|
||||||
for(var i = from; i <= to; i = flt(i + increment, 6)) {
|
for(var i = d.from_range; i <= d.to_range; i = flt(i + d.increment, 6)) {
|
||||||
values.push(i);
|
values.push(i);
|
||||||
}
|
}
|
||||||
attr_val_fields[d.attribute] = values;
|
attr_val_fields[d.attribute] = values;
|
||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
promises.push(p);
|
promises.push(p);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user