From cea4eeaa53b54b14e0800b840ec7c35aeb75ba2d Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sat, 2 May 2020 18:05:33 +0530 Subject: [PATCH] fix: Reverse GL Entry on cancel fix --- .../doctype/period_closing_voucher/period_closing_voucher.py | 2 +- erpnext/education/doctype/fees/fees.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index 0bd9a90b3e..bd8d8bd86d 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -19,7 +19,7 @@ class PeriodClosingVoucher(AccountsController): def on_cancel(self): self.ignore_linked_doctypes = ('GL Entry', 'Stock Ledger Entry') from erpnext.accounts.general_ledger import make_reverse_gl_entries - make_reverse_gl_entries(voucher_type="Period Closing Voucher", voucher_no=self.name, cancel=True) + make_reverse_gl_entries(voucher_type="Period Closing Voucher", voucher_no=self.name) def validate_account_head(self): closing_account_type = frappe.db.get_value("Account", self.closing_account_head, "root_type") diff --git a/erpnext/education/doctype/fees/fees.py b/erpnext/education/doctype/fees/fees.py index 01f7b87249..f0d60faed6 100644 --- a/erpnext/education/doctype/fees/fees.py +++ b/erpnext/education/doctype/fees/fees.py @@ -82,7 +82,7 @@ class Fees(AccountsController): def on_cancel(self): self.ignore_linked_doctypes = ('GL Entry', 'Stock Ledger Entry') - make_reverse_gl_entries(voucher_type=self.doctype, voucher_no=self.name, cancel=True) + make_reverse_gl_entries(voucher_type=self.doctype, voucher_no=self.name) # frappe.db.set(self, 'status', 'Cancelled')