From 2ee642fb2c8a0317720c4aeb62ea09ce7ed1e39b Mon Sep 17 00:00:00 2001 From: Nijith anil <83776819+nijithanil@users.noreply.github.com> Date: Sun, 11 Feb 2024 18:12:01 +0530 Subject: [PATCH] fix(ux): sales invoice link in error message (#39841) fix: sales invoice link in error message Co-authored-by: Nijith anil --- erpnext/accounts/doctype/dunning/dunning.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/dunning/dunning.py b/erpnext/accounts/doctype/dunning/dunning.py index c61c3329c69f..e3897bf4aa17 100644 --- a/erpnext/accounts/doctype/dunning/dunning.py +++ b/erpnext/accounts/doctype/dunning/dunning.py @@ -85,7 +85,14 @@ def validate_same_currency(self): frappe.throw( _( "The currency of invoice {} ({}) is different from the currency of this dunning ({})." - ).format(row.sales_invoice, invoice_currency, self.currency) + ).format( + frappe.get_desk_link( + "Sales Invoice", + row.sales_invoice, + ), + invoice_currency, + self.currency, + ) ) def validate_overdue_payments(self):