refactor: cancel gain/loss JE on Journal as payment cancellation

(cherry picked from commit 6e18bb6456)
This commit is contained in:
ruthra kumar
2023-07-11 12:21:10 +05:30
committed by Mergify
parent 01953bc0e3
commit 7c3fc7eb3b
4 changed files with 39 additions and 13 deletions

View File

@@ -671,7 +671,7 @@ def cancel_exchange_gain_loss_journal(parent_doc: dict | object) -> None:
"""
Cancel Exchange Gain/Loss for Sales/Purchase Invoice, if they have any.
"""
if parent_doc.doctype in ["Sales Invoice", "Purchase Invoice", "Payment Entry"]:
if parent_doc.doctype in ["Sales Invoice", "Purchase Invoice", "Payment Entry", "Journal Entry"]:
journals = frappe.db.get_all(
"Journal Entry Account",
filters={