fix(Timesheet): fetch exchange rate only if currency is set (backport #30057) (#30058)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
This commit is contained in:
mergify[bot]
2022-03-02 14:19:11 +05:30
committed by GitHub
parent 95f30ada7b
commit d1cc291c80

View File

@@ -116,7 +116,7 @@ frappe.ui.form.on("Timesheet", {
currency: function(frm) {
let base_currency = frappe.defaults.get_global_default('currency');
if (base_currency != frm.doc.currency) {
if (frm.doc.currency && (base_currency != frm.doc.currency)) {
frappe.call({
method: "erpnext.setup.utils.get_exchange_rate",
args: {