mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-07 15:25:19 +00:00
* fix: description overwrite on qty change (#44606)
(cherry picked from commit 9ad79625e0)
# Conflicts:
# erpnext/stock/doctype/material_request/material_request.js
* chore: fix conflicts
---------
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
@@ -226,11 +226,16 @@ frappe.ui.form.on('Material Request', {
|
|||||||
},
|
},
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
const d = item;
|
const d = item;
|
||||||
const allow_to_change_fields = ['actual_qty', 'projected_qty', 'min_order_qty', 'item_name', 'description', 'stock_uom', 'uom', 'conversion_factor', 'stock_qty'];
|
|
||||||
|
|
||||||
if(!r.exc) {
|
let allow_to_change_fields = ['actual_qty', 'projected_qty', 'min_order_qty', 'item_name', 'description', 'stock_uom', 'uom', 'conversion_factor', 'stock_qty'];
|
||||||
$.each(r.message, function(key, value) {
|
|
||||||
if(!d[key] || allow_to_change_fields.includes(key)) {
|
if (overwrite_warehouse) {
|
||||||
|
allow_to_change_fields.push("description");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!r.exc) {
|
||||||
|
$.each(r.message, function (key, value) {
|
||||||
|
if (!d[key] || allow_to_change_fields.includes(key)) {
|
||||||
d[key] = value;
|
d[key] = value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user