From a8b58800bb5f411ddcb9a595f42fec47ac9bcd12 Mon Sep 17 00:00:00 2001 From: Gursheen Anand Date: Thu, 31 Aug 2023 17:08:51 +0530 Subject: [PATCH] fix: fetch discount amount for gle in base currency (cherry picked from commit 112cfe6dfac66fd2b1c57c51ff0dff83eba9274a) --- erpnext/controllers/accounts_controller.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 53039cfd8b5c..b225e3d5f1e8 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1354,7 +1354,7 @@ def make_discount_gl_entries(self, gl_entries): { "account": self.additional_discount_account, "against": supplier_or_customer, - dr_or_cr: self.discount_amount, + dr_or_cr: self.base_discount_amount, "cost_center": self.cost_center, }, item=self, @@ -1626,6 +1626,7 @@ def validate_currency(self): and party_account_currency != self.company_currency and self.currency != party_account_currency ): + frappe.throw( _("Accounting Entry for {0}: {1} can only be made in currency: {2}").format( party_type, party, party_account_currency