Skip to content

Commit

Permalink
Merge pull request #30731 from frappe/mergify/bp/version-13-hotfix/pr…
Browse files Browse the repository at this point in the history
…-30728

fix: Price changing on creating Sales return from Delivery Note (backport #30728)
  • Loading branch information
deepeshgarg007 authored Apr 18, 2022
2 parents 183ff53 + 93fe840 commit d6126b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion erpnext/public/js/controllers/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -1500,6 +1500,11 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
return;
}

// Target doc created from a mapped doc
if (this.frm.doc.__onload && this.frm.doc.__onload.ignore_price_list) {
return;
}

return this.frm.call({
method: "erpnext.accounts.doctype.pricing_rule.pricing_rule.apply_pricing_rule",
args: { args: args, doc: me.frm.doc },
Expand Down Expand Up @@ -1616,7 +1621,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
me.remove_pricing_rule(frappe.get_doc(d.doctype, d.name));
}

if (d.free_item_data) {
if (d.free_item_data.length > 0) {
me.apply_product_discount(d);
}

Expand Down

0 comments on commit d6126b6

Please sign in to comment.