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 efade9b9ae)
Co-authored-by: Jeffry Suryadharma <41689493+jeffrysurya@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