Skip to content

Commit e0c35d6

Browse files
fix: incorrect amount in the material request item (backport #39567) (#39569)
fix: incorrect amount in the material request item (#39567) fix: incoorect amount in the material request (cherry picked from commit 2bdfdee) Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
1 parent 14aa9d3 commit e0c35d6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

erpnext/stock/doctype/material_request/material_request.js

+7
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,13 @@ erpnext.buying.MaterialRequestController = class MaterialRequestController exten
514514
schedule_date() {
515515
set_schedule_date(this.frm);
516516
}
517+
518+
qty(doc, cdt, cdn) {
519+
var row = frappe.get_doc(cdt, cdn);
520+
row.amount = flt(row.qty) * flt(row.rate);
521+
frappe.model.set_value(cdt, cdn, "amount", row.amount);
522+
refresh_field("amount", row.name, row.parentfield);
523+
}
517524
};
518525

519526
// for backward compatibility: combine new and previous states

0 commit comments

Comments
 (0)