Skip to content

Commit 7498cdf

Browse files
rs-rethikmergify[bot]
authored andcommitted
feat: use difference_posting_date for journal entry posting_date
(cherry picked from commit ff1d040)
1 parent bec1f97 commit 7498cdf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

erpnext/controllers/accounts_controller.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1204,6 +1204,7 @@ def set_advances(self):
12041204
"advance_amount": flt(d.amount),
12051205
"allocated_amount": allocated_amount,
12061206
"ref_exchange_rate": flt(d.exchange_rate), # exchange_rate of advance entry
1207+
"difference_posting_date": self.posting_date,
12071208
}
12081209
if d.get("paid_from"):
12091210
advance_row["account"] = d.paid_from
@@ -1509,7 +1510,6 @@ def make_exchange_gain_loss_journal(
15091510
gain_loss_account = frappe.get_cached_value(
15101511
"Company", self.company, "exchange_gain_loss_account"
15111512
)
1512-
15131513
je = create_gain_loss_journal(
15141514
self.company,
15151515
args.get("difference_posting_date") if args else self.posting_date,
@@ -1595,6 +1595,7 @@ def update_against_document_in_jv(self):
15951595
"Company", self.company, "exchange_gain_loss_account"
15961596
),
15971597
"exchange_gain_loss": flt(d.get("exchange_gain_loss")),
1598+
"difference_posting_date": d.get("difference_posting_date"),
15981599
}
15991600
)
16001601
lst.append(args)

0 commit comments

Comments
 (0)