From 38988bf7979d8f301a7d3262c7813d52e5dd854e Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 23 Oct 2025 13:00:15 +0530 Subject: [PATCH 1/2] feat: Add posting date param for reverse GL entries --- erpnext/accounts/general_ledger.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index b35eb9700f1..c4069a448df 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -660,6 +660,7 @@ def make_reverse_gl_entries( adv_adj=False, update_outstanding="Yes", partial_cancel=False, + posting_date=None ): """ Get original gl entries of the voucher @@ -757,6 +758,8 @@ def make_reverse_gl_entries( if immutable_ledger_enabled: new_gle["is_cancelled"] = 0 new_gle["posting_date"] = frappe.form_dict.get("posting_date") or getdate() + elif posting_date: + new_gle["posting_date"] = posting_date if new_gle["debit"] or new_gle["credit"]: make_entry(new_gle, adv_adj, "Yes") From 05e1a737f14cf4d3fca85ad81627f1e65cec20f5 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 23 Oct 2025 13:06:48 +0530 Subject: [PATCH 2/2] chore: Linting issues --- erpnext/accounts/general_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index c4069a448df..0bfecd989f2 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -660,7 +660,7 @@ def make_reverse_gl_entries( adv_adj=False, update_outstanding="Yes", partial_cancel=False, - posting_date=None + posting_date=None, ): """ Get original gl entries of the voucher