fixes in purchase price list

This commit is contained in:
Nabin Hait 2013-01-18 16:47:39 +05:30
parent 396f47d029
commit 1022198cc8
2 changed files with 3 additions and 3 deletions

View File

@ -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});
};

View File

@ -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)