fix: Ignore linked purchase invoice on cancel

This commit is contained in:
Deepesh Garg 2022-10-17 18:50:54 +05:30
parent e543dca6a0
commit faadf78332
2 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,7 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
super.onload(); super.onload();
// Ignore linked advances // Ignore linked advances
this.frm.ignore_doctypes_on_cancel_all = ['Journal Entry', 'Payment Entry']; this.frm.ignore_doctypes_on_cancel_all = ['Journal Entry', 'Payment Entry', 'Purchase Invoice'];
if(!this.frm.doc.__islocal) { if(!this.frm.doc.__islocal) {
// show credit_to in print format // show credit_to in print format

View File

@ -1415,6 +1415,7 @@ class PurchaseInvoice(BuyingController):
"Stock Ledger Entry", "Stock Ledger Entry",
"Repost Item Valuation", "Repost Item Valuation",
"Payment Ledger Entry", "Payment Ledger Entry",
"Purchase Invoice",
) )
self.update_advance_tax_references(cancel=1) self.update_advance_tax_references(cancel=1)