Merge pull request #21562 from deepeshgarg007/make_reverse_entry
fix: Reverse GL Entry on cancel fix
This commit is contained in:
commit
6d32f3d50a
@ -19,7 +19,7 @@ class PeriodClosingVoucher(AccountsController):
|
|||||||
def on_cancel(self):
|
def on_cancel(self):
|
||||||
self.ignore_linked_doctypes = ('GL Entry', 'Stock Ledger Entry')
|
self.ignore_linked_doctypes = ('GL Entry', 'Stock Ledger Entry')
|
||||||
from erpnext.accounts.general_ledger import make_reverse_gl_entries
|
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):
|
def validate_account_head(self):
|
||||||
closing_account_type = frappe.db.get_value("Account", self.closing_account_head, "root_type")
|
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):
|
def on_cancel(self):
|
||||||
self.ignore_linked_doctypes = ('GL Entry', 'Stock Ledger Entry')
|
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')
|
# frappe.db.set(self, 'status', 'Cancelled')
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user