From 0fdd6817a6e1c966244bfcac0cc348421ca2a156 Mon Sep 17 00:00:00 2001 From: rs-rethik Date: Fri, 20 Dec 2024 12:10:08 +0530 Subject: [PATCH] feat: use difference_posting_date for journal entry posting_date (cherry picked from commit ff1d040a6e1aa80c3b93835395db31a222dd5568) --- 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 fa26fea3bf0..f2dab6beffc 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1082,6 +1082,7 @@ class AccountsController(TransactionBase): "advance_amount": flt(d.amount), "allocated_amount": allocated_amount, "ref_exchange_rate": flt(d.exchange_rate), # exchange_rate of advance entry + "difference_posting_date": self.posting_date, } self.append("advances", advance_row) @@ -1332,7 +1333,6 @@ class AccountsController(TransactionBase): gain_loss_account = frappe.get_cached_value( "Company", self.company, "exchange_gain_loss_account" ) - je = create_gain_loss_journal( self.company, args.get("difference_posting_date") if args else self.posting_date, @@ -1445,6 +1445,7 @@ class AccountsController(TransactionBase): "Company", self.company, "exchange_gain_loss_account" ), "exchange_gain_loss": flt(d.get("exchange_gain_loss")), + "difference_posting_date": d.get("difference_posting_date"), } ) lst.append(args)