transaction date issue in pricing rule fixed

This commit is contained in:
Nabin Hait 2015-03-09 14:54:37 +05:30
parent 7e98eb3ab7
commit e2f054cc27
2 changed files with 3 additions and 1 deletions

View File

@ -112,6 +112,8 @@ class AccountsController(TransactionBase):
if item.get("item_code"):
args = parent_dict.copy()
args.update(item.as_dict())
if not args.get("transaction_date"):
args["transaction_date"] = args.get("posting_date")
ret = get_item_details(args)
for fieldname, value in ret.items():

View File

@ -148,7 +148,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
order_type: me.frm.doc.order_type,
is_pos: cint(me.frm.doc.is_pos),
is_subcontracted: me.frm.doc.is_subcontracted,
transaction_date: me.frm.doc.transaction_date,
transaction_date: me.frm.doc.transaction_date || me.frm.doc.posting_date,
ignore_pricing_rule: me.frm.doc.ignore_pricing_rule,
doctype: item.doctype,
name: item.name,