From 39a289145c37012036fcb3fbe3e1fc0e645e77f8 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 15 Feb 2016 11:42:18 +0530 Subject: [PATCH] [fix] fetch price list rate --- erpnext/public/js/controllers/transaction.js | 6 ++++-- erpnext/stock/get_item_details.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index b6698df0b8..5c93ef0b5d 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -280,7 +280,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ var party_type = "Supplier"; var party_account_field = 'credit_to'; } - + var party = me.frm.doc[frappe.model.scrub(party_type)]; if(party) { return frappe.call({ @@ -643,7 +643,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ "item_code": d.item_code, "item_group": d.item_group, "brand": d.brand, - "qty": d.qty + "qty": d.qty, + "parenttype": d.parenttype, + "parent": d.parent }); } }; diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 55483506bb..22dbe5195f 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -196,7 +196,7 @@ def get_default_cost_center(args, item): or args.get("cost_center")) def get_price_list_rate(args, item_doc, out): - meta = frappe.get_meta(args.doctype) + meta = frappe.get_meta(args.parenttype or args.doctype) if meta.get_field("currency"): validate_price_list(args)