mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-16 21:42:11 +00:00
feat: use difference_posting_date for journal entry posting_date
(cherry picked from commit ff1d040a6e)
This commit is contained in:
@@ -1204,6 +1204,7 @@ class AccountsController(TransactionBase):
|
|||||||
"advance_amount": flt(d.amount),
|
"advance_amount": flt(d.amount),
|
||||||
"allocated_amount": allocated_amount,
|
"allocated_amount": allocated_amount,
|
||||||
"ref_exchange_rate": flt(d.exchange_rate), # exchange_rate of advance entry
|
"ref_exchange_rate": flt(d.exchange_rate), # exchange_rate of advance entry
|
||||||
|
"difference_posting_date": self.posting_date,
|
||||||
}
|
}
|
||||||
if d.get("paid_from"):
|
if d.get("paid_from"):
|
||||||
advance_row["account"] = d.paid_from
|
advance_row["account"] = d.paid_from
|
||||||
@@ -1509,7 +1510,6 @@ class AccountsController(TransactionBase):
|
|||||||
gain_loss_account = frappe.get_cached_value(
|
gain_loss_account = frappe.get_cached_value(
|
||||||
"Company", self.company, "exchange_gain_loss_account"
|
"Company", self.company, "exchange_gain_loss_account"
|
||||||
)
|
)
|
||||||
|
|
||||||
je = create_gain_loss_journal(
|
je = create_gain_loss_journal(
|
||||||
self.company,
|
self.company,
|
||||||
args.get("difference_posting_date") if args else self.posting_date,
|
args.get("difference_posting_date") if args else self.posting_date,
|
||||||
@@ -1595,6 +1595,7 @@ class AccountsController(TransactionBase):
|
|||||||
"Company", self.company, "exchange_gain_loss_account"
|
"Company", self.company, "exchange_gain_loss_account"
|
||||||
),
|
),
|
||||||
"exchange_gain_loss": flt(d.get("exchange_gain_loss")),
|
"exchange_gain_loss": flt(d.get("exchange_gain_loss")),
|
||||||
|
"difference_posting_date": d.get("difference_posting_date"),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
lst.append(args)
|
lst.append(args)
|
||||||
|
|||||||
Reference in New Issue
Block a user