mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
fix: description overwrite on qty change (#44606)
This commit is contained in:
@@ -267,18 +267,21 @@ frappe.ui.form.on("Material Request", {
|
|||||||
},
|
},
|
||||||
callback: function (r) {
|
callback: function (r) {
|
||||||
const d = item;
|
const d = item;
|
||||||
const allow_to_change_fields = [
|
let allow_to_change_fields = [
|
||||||
"actual_qty",
|
"actual_qty",
|
||||||
"projected_qty",
|
"projected_qty",
|
||||||
"min_order_qty",
|
"min_order_qty",
|
||||||
"item_name",
|
"item_name",
|
||||||
"description",
|
|
||||||
"stock_uom",
|
"stock_uom",
|
||||||
"uom",
|
"uom",
|
||||||
"conversion_factor",
|
"conversion_factor",
|
||||||
"stock_qty",
|
"stock_qty",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (overwrite_warehouse) {
|
||||||
|
allow_to_change_fields.push("description");
|
||||||
|
}
|
||||||
|
|
||||||
if (!r.exc) {
|
if (!r.exc) {
|
||||||
$.each(r.message, function (key, value) {
|
$.each(r.message, function (key, value) {
|
||||||
if (!d[key] || allow_to_change_fields.includes(key)) {
|
if (!d[key] || allow_to_change_fields.includes(key)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user