Merge pull request #43077 from aerele/common_party_jv
fix: cancel common party advance jv while canceling the invoice
This commit is contained in:
@@ -1589,6 +1589,7 @@ class AccountsController(TransactionBase):
|
||||
remove_from_bank_transaction,
|
||||
)
|
||||
from erpnext.accounts.utils import (
|
||||
cancel_common_party_journal,
|
||||
cancel_exchange_gain_loss_journal,
|
||||
unlink_ref_doc_from_payment_entries,
|
||||
)
|
||||
@@ -1600,6 +1601,7 @@ class AccountsController(TransactionBase):
|
||||
|
||||
# Cancel Exchange Gain/Loss Journal before unlinking
|
||||
cancel_exchange_gain_loss_journal(self)
|
||||
cancel_common_party_journal(self)
|
||||
|
||||
if frappe.db.get_single_value("Accounts Settings", "unlink_payment_on_cancellation_of_invoice"):
|
||||
unlink_ref_doc_from_payment_entries(self)
|
||||
@@ -2459,6 +2461,7 @@ class AccountsController(TransactionBase):
|
||||
jv.posting_date = self.posting_date
|
||||
jv.company = self.company
|
||||
jv.remark = f"Adjustment for {self.doctype} {self.name}"
|
||||
jv.is_system_generated = True
|
||||
|
||||
reconcilation_entry = frappe._dict()
|
||||
advance_entry = frappe._dict()
|
||||
|
||||
Reference in New Issue
Block a user