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 commit efade9b9aee13c4702c69841cdb6766f305d5b30) Co-authored-by: Jeffry Suryadharma <41689493+jeffrysurya@users.noreply.github.com>
This commit is contained in:
parent
daafe45dd4
commit
9e36ab7de7
@ -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);
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user