[fixes] buying/selling price lists, communication and website settings

This commit is contained in:
Anand Doshi
2013-06-12 17:40:36 +05:30
parent 9c901e75cd
commit 060d9248d3
23 changed files with 162 additions and 67 deletions

View File

@@ -28,13 +28,13 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
if(this.frm.fields_dict.price_list_name) {
this.frm.set_query("price_list_name", function() {
return repl("select distinct price_list_name from `tabItem Price` \
where buying = 1 and price_list_name like \"%s%%\"");
return repl("select name, currency from `tabPrice List` \
where buying_or_selling = 'Buying' and name like \"%s%%\"");
});
this.frm.set_query("price_list_currency", function() {
return repl("select distinct ref_currency from `tabItem Price` \
where price_list_name=\"%(price_list_name)s\" and buying = 1 \
where price_list_name=\"%(price_list_name)s\" and buying_or_selling = 'Buying' \
and ref_currency like \"%s%%\"",
{price_list_name: me.frm.doc.price_list_name});
});

View File

@@ -102,7 +102,7 @@ def _get_price_list_rate(args, item_bean, meta):
"parentfield": "ref_rate_details",
"price_list_name": args.price_list_name,
"ref_currency": args.price_list_currency,
"buying": 1})
"buying_or_selling": "Buying"})
if price_list_rate:
out.import_ref_rate = \
flt(price_list_rate[0].ref_rate * args.plc_conversion_rate / args.conversion_rate)