mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 23:19:20 +00:00
refactor: for advances uses the party account in references table
(cherry picked from commit 7dce6e03c7)
This commit is contained in:
@@ -1430,10 +1430,13 @@ class AccountsController(TransactionBase):
|
|||||||
if d.exchange_gain_loss and (
|
if d.exchange_gain_loss and (
|
||||||
(d.reference_doctype, d.reference_name, str(d.idx)) not in booked
|
(d.reference_doctype, d.reference_name, str(d.idx)) not in booked
|
||||||
):
|
):
|
||||||
if self.payment_type == "Receive":
|
if self.book_advance_payments_in_separate_party_account:
|
||||||
party_account = self.paid_from
|
party_account = d.account
|
||||||
elif self.payment_type == "Pay":
|
else:
|
||||||
party_account = self.paid_to
|
if self.payment_type == "Receive":
|
||||||
|
party_account = self.paid_from
|
||||||
|
elif self.payment_type == "Pay":
|
||||||
|
party_account = self.paid_to
|
||||||
|
|
||||||
dr_or_cr = "debit" if d.exchange_gain_loss > 0 else "credit"
|
dr_or_cr = "debit" if d.exchange_gain_loss > 0 else "credit"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user