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")