mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-12 17:23:38 +00:00
fix: move validation to before_cancel
This commit is contained in:
@@ -185,7 +185,7 @@ class JournalEntry(AccountsController):
|
||||
return self._submit()
|
||||
|
||||
def before_cancel(self):
|
||||
pass
|
||||
self.has_asset_adjustment_entry()
|
||||
|
||||
def cancel(self):
|
||||
if len(self.accounts) > 100:
|
||||
@@ -308,7 +308,6 @@ class JournalEntry(AccountsController):
|
||||
)
|
||||
self.make_gl_entries(1)
|
||||
JournalTaxWithholding(self).on_cancel()
|
||||
self.has_asset_adjustment_entry()
|
||||
self.unlink_advance_entry_reference()
|
||||
self.unlink_asset_reference()
|
||||
self.unlink_inter_company_jv()
|
||||
|
||||
Reference in New Issue
Block a user