fix: incorrect amount in the material request item (#39567)
fix: incoorect amount in the material request
diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js
index d90b71a..03fe20b 100644
--- a/erpnext/stock/doctype/material_request/material_request.js
+++ b/erpnext/stock/doctype/material_request/material_request.js
@@ -514,6 +514,13 @@
schedule_date() {
set_schedule_date(this.frm);
}
+
+ qty(doc, cdt, cdn) {
+ var row = frappe.get_doc(cdt, cdn);
+ row.amount = flt(row.qty) * flt(row.rate);
+ frappe.model.set_value(cdt, cdn, "amount", row.amount);
+ refresh_field("amount", row.name, row.parentfield);
+ }
};
// for backward compatibility: combine new and previous states