From ef22337a9bf6eaef7d6f06c5b0e9c7bc5a3f12da Mon Sep 17 00:00:00 2001 From: Devin Slauenwhite Date: Thu, 2 Jun 2022 14:15:50 -0400 Subject: [PATCH 1/2] fix: display currencies in validation message. (cherry picked from commit 3a1c923e76c1f19e101e32d98f54f9ac7d9266bc) --- erpnext/controllers/accounts_controller.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index c1073cb24d0f..de6dce02a71d 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1463,8 +1463,10 @@ def validate_party_account_currency(self): if not party_gle_currency and (party_account_currency != self.currency): frappe.throw( - _("Party Account {0} currency and document currency should be same").format( - frappe.bold(party_account) + _("Party Account {0} currency ({1}) and document currency ({2}) should be same").format( + frappe.bold(party_account), + party_account_currency, + self.currency ) ) From f4a4dacb22008049d00cb91a5a8bdb9a44b3b786 Mon Sep 17 00:00:00 2001 From: Devin Slauenwhite Date: Thu, 2 Jun 2022 14:23:54 -0400 Subject: [PATCH 2/2] chore: linter (cherry picked from commit b061ea4cd2e66a9a0e2a96ef9174f7c0366c52e9) --- erpnext/controllers/accounts_controller.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index de6dce02a71d..127d1094a3d5 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1464,9 +1464,7 @@ def validate_party_account_currency(self): if not party_gle_currency and (party_account_currency != self.currency): frappe.throw( _("Party Account {0} currency ({1}) and document currency ({2}) should be same").format( - frappe.bold(party_account), - party_account_currency, - self.currency + frappe.bold(party_account), party_account_currency, self.currency ) )