[fix] During making credit note from sales invoice, system fetching new serial no instead of old serial no from the sales invoice

This commit is contained in:
Rohit Waghchaure 2017-03-28 12:09:07 +05:30
parent 3e43f275a0
commit 5ecbaa408b
2 changed files with 3 additions and 2 deletions

View File

@ -117,7 +117,7 @@ def apply_pricing_rule(args):
args_copy = copy.deepcopy(args) args_copy = copy.deepcopy(args)
args_copy.update(item) args_copy.update(item)
out.append(get_pricing_rule_for_item(args_copy)) 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)) out.append(get_serial_no_for_item(args_copy))
return out return out

View File

@ -728,7 +728,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
"sales_partner": me.frm.doc.sales_partner, "sales_partner": me.frm.doc.sales_partner,
"ignore_pricing_rule": me.frm.doc.ignore_pricing_rule, "ignore_pricing_rule": me.frm.doc.ignore_pricing_rule,
"doctype": me.frm.doc.doctype, "doctype": me.frm.doc.doctype,
"name": me.frm.doc.name "name": me.frm.doc.name,
"is_return": cint(me.frm.doc.is_return)
}; };
}, },