[fix] During making credit note from sales invoice, system fetching new serial no instead of old serial no from the sales invoice
diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
index 3c62297..f9e51ac 100644
--- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
+++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
@@ -117,7 +117,7 @@
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 f8aa7cf..908b869 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -728,7 +728,8 @@
"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)
};
},