mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
fix: sider issues
This commit is contained in:
@@ -4,21 +4,21 @@
|
|||||||
frappe.ui.form.on('Currency Exchange Settings', {
|
frappe.ui.form.on('Currency Exchange Settings', {
|
||||||
service_provider: function(frm) {
|
service_provider: function(frm) {
|
||||||
if (frm.doc.service_provider == "Exchangerate.host") {
|
if (frm.doc.service_provider == "Exchangerate.host") {
|
||||||
let result = ['result']
|
let result = ['result'];
|
||||||
let params = {
|
let params = {
|
||||||
date: '{transaction_date}',
|
date: '{transaction_date}',
|
||||||
from: '{from_currency}',
|
from: '{from_currency}',
|
||||||
to: '{to_currency}'
|
to: '{to_currency}'
|
||||||
}
|
};
|
||||||
add_param(frm, "https://api.exchangerate.host/convert", params, result)
|
add_param(frm, "https://api.exchangerate.host/convert", params, result);
|
||||||
}
|
}
|
||||||
else if (frm.doc.service_provider == "Frankfurter.app") {
|
else if (frm.doc.service_provider == "Frankfurter.app") {
|
||||||
let result = ['rates', '{to_currency}']
|
let result = ['rates', '{to_currency}'];
|
||||||
let params = {
|
let params = {
|
||||||
base: '{from_currency}',
|
base: '{from_currency}',
|
||||||
symbols: '{to_currency}'
|
symbols: '{to_currency}'
|
||||||
}
|
};
|
||||||
add_param(frm, "https://frankfurter.app/{transaction_date}", params, result)
|
add_param(frm, "https://frankfurter.app/{transaction_date}", params, result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -26,8 +26,8 @@ frappe.ui.form.on('Currency Exchange Settings', {
|
|||||||
|
|
||||||
function add_param(frm, api, params, result) {
|
function add_param(frm, api, params, result) {
|
||||||
var row;
|
var row;
|
||||||
frm.clear_table("req_params")
|
frm.clear_table("req_params");
|
||||||
frm.clear_table("result_key")
|
frm.clear_table("result_key");
|
||||||
|
|
||||||
frm.doc.api_endpoint = api;
|
frm.doc.api_endpoint = api;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user