Skip to content

Commit

Permalink
fix: incorrect amount in the material request item (backport #39567) (#…
Browse files Browse the repository at this point in the history
…39568)

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>
(cherry picked from commit c26f7bb)
  • Loading branch information
mergify[bot] committed Jan 27, 2024
1 parent 26ca27a commit abfd183
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions erpnext/stock/doctype/material_request/material_request.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,13 @@ erpnext.buying.MaterialRequestController = class MaterialRequestController exten
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
Expand Down

0 comments on commit abfd183

Please sign in to comment.