calls erpnext.setup.utils.get_exchange_rate instead of get_average_exchange_rate
This commit is contained in:
parent
89f7dd3c98
commit
3eb5cb14d1
@ -317,10 +317,12 @@ frappe.ui.form.on('Payment Entry', {
|
||||
frm.set_value("source_exchange_rate", 1);
|
||||
} else if (frm.doc.paid_from){
|
||||
if (in_list(["Internal Transfer", "Pay"], frm.doc.payment_type)) {
|
||||
var company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
|
||||
frappe.call({
|
||||
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_average_exchange_rate",
|
||||
method: "erpnext.setup.utils.get_exchange_rate",
|
||||
args: {
|
||||
account: frm.doc.paid_from
|
||||
from_currency: frm.doc.paid_from_account_currency,
|
||||
to_currency: company_currency
|
||||
},
|
||||
callback: function(r, rt) {
|
||||
frm.set_value("source_exchange_rate", r.message);
|
||||
|
Loading…
x
Reference in New Issue
Block a user