From c9ede1ffbe25d6250b52910372c1d7cfa82096c5 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 9 May 2024 11:06:06 +0530 Subject: [PATCH] refactor: convert amount to base currency for advances --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index f1779d52439..115c98de15d 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1341,7 +1341,7 @@ class PaymentEntry(AccountsController): dr_or_cr, account = self.get_dr_and_account_for_advances(invoice) args_dict["account"] = account - args_dict[dr_or_cr] = invoice.allocated_amount + args_dict[dr_or_cr] = self.calculate_base_allocated_amount_for_reference(invoice) args_dict[dr_or_cr + "_in_account_currency"] = invoice.allocated_amount args_dict.update( { @@ -1360,7 +1360,7 @@ class PaymentEntry(AccountsController): args_dict[dr_or_cr + "_in_account_currency"] = 0 dr_or_cr = "debit" if dr_or_cr == "credit" else "credit" args_dict["account"] = self.party_account - args_dict[dr_or_cr] = invoice.allocated_amount + args_dict[dr_or_cr] = self.calculate_base_allocated_amount_for_reference(invoice) args_dict[dr_or_cr + "_in_account_currency"] = invoice.allocated_amount args_dict.update( {