[fix] Currency and exchange rate while Quotation made from Opportunity for lead

This commit is contained in:
Nabin Hait
2016-07-07 11:11:32 +05:30
parent 821367fee8
commit 3950507d4b
2 changed files with 12 additions and 10 deletions

View File

@@ -432,7 +432,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
var company_currency = this.get_company_currency();
// Added `ignore_pricing_rule` to determine if document is loading after mapping from another doc
if(this.frm.doc.currency !== company_currency && !this.frm.doc.ignore_pricing_rule) {
if(this.frm.doc.currency && this.frm.doc.currency !== company_currency
&& !this.frm.doc.ignore_pricing_rule) {
this.get_exchange_rate(this.frm.doc.currency, company_currency,
function(exchange_rate) {
me.frm.set_value("conversion_rate", exchange_rate);