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