Skip to content

Commit

Permalink
fix: reset the incoming rate on changing of the warehouse (backport #…
Browse files Browse the repository at this point in the history
…38925) (#38926)

fix: reset the incoming rate on changing of the warehouse (#38925)

(cherry picked from commit 161ae1e)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
  • Loading branch information
mergify[bot] and rohitwaghchaure authored Dec 22, 2023
1 parent 8f643f0 commit 82960e3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions erpnext/public/js/utils/sales_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ erpnext.sales_common = {
refresh_field("incentives",row.name,row.parentfield);
}

warehouse(doc, cdt, cdn) {
if (doc.docstatus === 0 && doc.is_return && !doc.return_against) {
frappe.model.set_value(cdt, cdn, "incoming_rate", 0.0);
}
}

toggle_editable_price_list_rate() {
var df = frappe.meta.get_docfield(this.frm.doc.doctype + " Item", "price_list_rate", this.frm.doc.name);
var editable_price_list_rate = cint(frappe.defaults.get_default("editable_price_list_rate"));
Expand Down

0 comments on commit 82960e3

Please sign in to comment.