From b988046082b97e41c8b07eeaae35cfc2829e2bf3 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Wed, 2 Mar 2022 14:15:22 +0530 Subject: [PATCH] fix(Timesheet): fetch exchange rate only if currency is set (#30057) --- erpnext/projects/doctype/timesheet/timesheet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/projects/doctype/timesheet/timesheet.js b/erpnext/projects/doctype/timesheet/timesheet.js index f615f051f0..453d46c7c4 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.js +++ b/erpnext/projects/doctype/timesheet/timesheet.js @@ -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: {