mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-12 17:51:20 +00:00
refactor: removed redundant message display for each item row cost center update
(cherry picked from commit 4376ca5f1d)
This commit is contained in:
@@ -447,22 +447,21 @@ erpnext.sales_common = {
|
|||||||
args: { project: this.frm.doc.project },
|
args: { project: this.frm.doc.project },
|
||||||
callback: function (r, rt) {
|
callback: function (r, rt) {
|
||||||
if (!r.exc) {
|
if (!r.exc) {
|
||||||
$.each(me.frm.doc["items"] || [], function (i, row) {
|
if (r.message) {
|
||||||
if (r.message) {
|
$.each(me.frm.doc["items"] || [], function (i, row) {
|
||||||
frappe.model.set_value(
|
frappe.model.set_value(
|
||||||
row.doctype,
|
row.doctype,
|
||||||
row.name,
|
row.name,
|
||||||
"cost_center",
|
"cost_center",
|
||||||
r.message
|
r.message
|
||||||
);
|
);
|
||||||
frappe.msgprint(
|
});
|
||||||
__(
|
frappe.msgprint(
|
||||||
"Cost Center For Item with Item Code {0} has been Changed to {1}",
|
__("Cost Center for Item rows has been updated to {0}", [
|
||||||
[row.item_name, r.message]
|
r.message,
|
||||||
)
|
])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user