Skip to content

Commit

Permalink
feat: use difference_posting_date for journal entry posting_date
Browse files Browse the repository at this point in the history
(cherry picked from commit ff1d040)
  • Loading branch information
rs-rethik authored and mergify[bot] committed Dec 23, 2024
1 parent bec1f97 commit 7498cdf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion erpnext/controllers/accounts_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,7 @@ def set_advances(self):
"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,
}
if d.get("paid_from"):
advance_row["account"] = d.paid_from
Expand Down Expand Up @@ -1509,7 +1510,6 @@ def make_exchange_gain_loss_journal(
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,
Expand Down Expand Up @@ -1595,6 +1595,7 @@ def update_against_document_in_jv(self):
"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)
Expand Down

0 comments on commit 7498cdf

Please sign in to comment.