fix: Only validate against JV if it's not a reverse depreciation entry
This commit is contained in:
parent
a7ec007dcf
commit
8ea1ad9232
@ -58,7 +58,10 @@ class JournalEntry(AccountsController):
|
||||
if not frappe.flags.in_import:
|
||||
self.validate_total_debit_and_credit()
|
||||
|
||||
self.validate_against_jv()
|
||||
if not self.flags.is_reverse_depr_entry:
|
||||
self.validate_against_jv()
|
||||
self.validate_stock_accounts()
|
||||
|
||||
self.validate_reference_doc()
|
||||
if self.docstatus == 0:
|
||||
self.set_against_account()
|
||||
@ -69,7 +72,6 @@ class JournalEntry(AccountsController):
|
||||
self.validate_empty_accounts_table()
|
||||
self.set_account_and_party_balance()
|
||||
self.validate_inter_company_accounts()
|
||||
self.validate_stock_accounts()
|
||||
|
||||
if self.docstatus == 0:
|
||||
self.apply_tax_withholding()
|
||||
|
@ -1063,6 +1063,7 @@ class SalesInvoice(SellingController):
|
||||
|
||||
reverse_journal_entry = make_reverse_journal_entry(schedule.journal_entry)
|
||||
reverse_journal_entry.posting_date = nowdate()
|
||||
reverse_journal_entry.flags.is_reverse_depr_entry = True
|
||||
reverse_journal_entry.submit()
|
||||
|
||||
asset.flags.ignore_validate_update_after_submit = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user