Exchange rate issue fixed
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index 878c9ce..27500a5 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -219,7 +219,6 @@
this.get_exchange_rate(this.frm.doc.currency, company_currency,
function(exchange_rate) {
me.frm.set_value("conversion_rate", exchange_rate);
- me.conversion_rate();
});
} else {
this.conversion_rate();
@@ -234,6 +233,7 @@
this.frm.doc.plc_conversion_rate !== this.frm.doc.conversion_rate) {
this.frm.set_value("plc_conversion_rate", this.frm.doc.conversion_rate);
}
+
if(flt(this.frm.doc.conversion_rate)>0.0) {
if(this.frm.doc.ignore_pricing_rule) {
this.calculate_taxes_and_totals();
@@ -452,6 +452,7 @@
"currency": me.frm.doc.currency,
"conversion_rate": me.frm.doc.conversion_rate,
"price_list": me.frm.doc.selling_price_list || me.frm.doc.buying_price_list,
+ "price_list_currency": me.frm.doc.price_list_currency,
"plc_conversion_rate": me.frm.doc.plc_conversion_rate,
"company": me.frm.doc.company,
"transaction_date": me.frm.doc.transaction_date || me.frm.doc.posting_date,
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index e24f67a..3c820fa 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -402,9 +402,9 @@
price_list_currency = get_price_list_currency(args.price_list)
plc_conversion_rate = args.plc_conversion_rate
- if (not plc_conversion_rate) or (price_list_currency != args.price_list_currency):
- plc_conversion_rate = get_exchange_rate(price_list_currency, args.currency) \
- or plc_conversion_rate
+ if (not plc_conversion_rate) or (price_list_currency and args.price_list_currency \
+ and price_list_currency != args.price_list_currency):
+ plc_conversion_rate = get_exchange_rate(price_list_currency, args.currency) or plc_conversion_rate
return {
"price_list_currency": price_list_currency,