mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-22 03:35:43 +00:00
fix amount not updated when change rate in material request (backport #39606) (backport #39614) (#39621)
fix amount not updated when change rate in material request (backport #39606) (#39614) fix amount not updated when change rate in material request (#39606) * fix amount not updated when change rate in material request * make code consistent (cherry picked from commitefade9b9ae) Co-authored-by: Jeffry Suryadharma <41689493+jeffrysurya@users.noreply.github.com> (cherry picked from commit2389b41f51) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
@@ -429,6 +429,9 @@ frappe.ui.form.on("Material Request Item", {
|
||||
|
||||
rate: function(frm, doctype, name) {
|
||||
const item = locals[doctype][name];
|
||||
item.amount = flt(item.qty) * flt(item.rate);
|
||||
frappe.model.set_value(doctype, name, "amount", item.amount);
|
||||
refresh_field("amount", item.name, item.parentfield);
|
||||
frm.events.get_item_data(frm, item, false);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user