fix: Reverse GL Entry on cancel fix
This commit is contained in:
parent
1c8cbd07b8
commit
cea4eeaa53
@ -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")
|
||||
|
@ -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')
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user