Skip to content

Commit

Permalink
fix: Set actual qty and basic rate in SE on warehouse triggers (`get_…
Browse files Browse the repository at this point in the history
…warehouse_details`)

- set `actual_qty` on source and target warehouse change

(cherry picked from commit 1ce45f6)
  • Loading branch information
marination authored and mergify[bot] committed May 11, 2022
1 parent 97ea1f5 commit 30b0aee
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions erpnext/stock/doctype/stock_entry/stock_entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,9 @@ frappe.ui.form.on('Stock Entry', {
},
callback: function(r) {
if (!r.exc) {
$.extend(child, r.message);
["actual_qty", "basic_rate"].forEach((field) => {
frappe.model.set_value(cdt, cdn, field, (r.message[field] || 0.0));
});
frm.events.calculate_basic_amount(frm, child);
}
}
Expand Down Expand Up @@ -1069,8 +1071,8 @@ function attach_bom_items(bom_no) {

function check_should_not_attach_bom_items(bom_no) {
return (
bom_no === undefined ||
(erpnext.stock.bom && erpnext.stock.bom.name === bom_no)
bom_no === undefined ||
(erpnext.stock.bom && erpnext.stock.bom.name === bom_no)
);
}

Expand Down

0 comments on commit 30b0aee

Please sign in to comment.