diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 7dd29854245..a1a18f0becd 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1368,17 +1368,14 @@ class PurchaseInvoice(BuyingController): frappe.db.set(self, "status", "Cancelled") unlink_inter_company_doc(self.doctype, self.name, self.inter_company_invoice_reference) -<<<<<<< HEAD - self.ignore_linked_doctypes = ("GL Entry", "Stock Ledger Entry", "Repost Item Valuation") -======= + self.ignore_linked_doctypes = ( "GL Entry", "Stock Ledger Entry", "Repost Item Valuation", - "Payment Ledger Entry", "Purchase Invoice", ) ->>>>>>> faadf78332 (fix: Ignore linked purchase invoice on cancel) + self.update_advance_tax_references(cancel=1) def update_project(self):