refactor: for advances uses the party account in references table
This commit is contained in:
@@ -1435,6 +1435,9 @@ 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.book_advance_payments_in_separate_party_account:
|
||||||
|
party_account = d.account
|
||||||
|
else:
|
||||||
if self.payment_type == "Receive":
|
if self.payment_type == "Receive":
|
||||||
party_account = self.paid_from
|
party_account = self.paid_from
|
||||||
elif self.payment_type == "Pay":
|
elif self.payment_type == "Pay":
|
||||||
|
|||||||
Reference in New Issue
Block a user