diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index 3c622972c4c..f9e51acf27f 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -117,7 +117,7 @@ def apply_pricing_rule(args): args_copy = copy.deepcopy(args) args_copy.update(item) out.append(get_pricing_rule_for_item(args_copy)) - if set_serial_nos_based_on_fifo: + if set_serial_nos_based_on_fifo and not args.get('is_return'): out.append(get_serial_no_for_item(args_copy)) return out diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index f8aa7cff577..908b8693e29 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -728,7 +728,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ "sales_partner": me.frm.doc.sales_partner, "ignore_pricing_rule": me.frm.doc.ignore_pricing_rule, "doctype": me.frm.doc.doctype, - "name": me.frm.doc.name + "name": me.frm.doc.name, + "is_return": cint(me.frm.doc.is_return) }; },