From 1022198cc8b6f82add14adc5e3c64d5ab01caf68 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 18 Jan 2013 16:47:39 +0530 Subject: [PATCH] fixes in purchase price list --- buying/doctype/purchase_common/purchase_common.js | 4 ++-- controllers/buying_controller.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/buying/doctype/purchase_common/purchase_common.js b/buying/doctype/purchase_common/purchase_common.js index 9fe3edcf8d3..549ec48bde5 100644 --- a/buying/doctype/purchase_common/purchase_common.js +++ b/buying/doctype/purchase_common/purchase_common.js @@ -28,14 +28,14 @@ erpnext.buying.BuyingController = erpnext.utils.Controller.extend({ if(this.frm.fields_dict.price_list_name) { this.frm.fields_dict.price_list_name.get_query = function() { return repl("select distinct price_list_name from `tabItem Price` \ - where for_buying = 1 and price_list_name like \"%s%%\""); + where buying = 1 and price_list_name like \"%s%%\""); }; } if(this.frm.fields_dict.price_list_currency) { this.frm.fields_dict.price_list_currency.get_query = function() { return repl("select distinct ref_currency from `tabItem Price` \ - where price_list_name=\"%(price_list_name)s\" and for_buying = 1 \ + where price_list_name=\"%(price_list_name)s\" and buying = 1 \ and ref_currency like \"%s%%\"", {price_list_name: me.frm.doc.price_list_name}); }; diff --git a/controllers/buying_controller.py b/controllers/buying_controller.py index ae24cfe10a6..d7a2964c49e 100644 --- a/controllers/buying_controller.py +++ b/controllers/buying_controller.py @@ -66,5 +66,5 @@ class BuyingController(TransactionBase): if not valid_conversion_rate: msgprint(_('Please enter valid ') + conversion_rate_label + (': ') - + ("1 %s = [?] %s" % _(currency, self.company_currency)), + + ("1 %s = [?] %s" % (currency, self.company_currency)), raise_exception=True)