mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 23:49:19 +00:00
refactor: gain/loss should use same posting date as payment
(cherry picked from commit f7865da4d2)
This commit is contained in:
@@ -1858,6 +1858,7 @@ class QueryPaymentLedger(object):
|
||||
|
||||
def create_gain_loss_journal(
|
||||
company,
|
||||
posting_date,
|
||||
party_type,
|
||||
party,
|
||||
party_account,
|
||||
@@ -1876,7 +1877,7 @@ def create_gain_loss_journal(
|
||||
journal_entry = frappe.new_doc("Journal Entry")
|
||||
journal_entry.voucher_type = "Exchange Gain Or Loss"
|
||||
journal_entry.company = company
|
||||
journal_entry.posting_date = nowdate()
|
||||
journal_entry.posting_date = posting_date or nowdate()
|
||||
journal_entry.multi_currency = 1
|
||||
journal_entry.is_system_generated = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user