From 822bc581f3965f85f0080cfc0b2426520538fccb Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Mon, 3 Jun 2024 10:09:20 +0530 Subject: [PATCH] fix: Do no apply pricing rule on qty change for mapped docs (cherry picked from commit 2b1242170c87f558945df18d3414903a3311570b) --- erpnext/public/js/controllers/transaction.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 937b19d9abb..139ab4bff0f 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1246,8 +1246,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } qty(doc, cdt, cdn) { - if (!this.frm.doc.__onload?.load_after_mapping) { - let item = frappe.get_doc(cdt, cdn); + let item = frappe.get_doc(cdt, cdn); + if (!this.is_a_mapped_document(item)) { // item.pricing_rules = '' frappe.run_serially([ () => this.remove_pricing_rule_for_item(item),