Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected value after useful life must be greater than or equal to #31600

Closed
aakvatech opened this issue Jul 14, 2022 · 2 comments
Closed

Expected value after useful life must be greater than or equal to #31600

aakvatech opened this issue Jul 14, 2022 · 2 comments

Comments

@aakvatech
Copy link
Contributor

Information about bug

Try this combination to see if this precision is appropriate:
Existing asset
Gross Purchase Amount: 38233774
Date of purchase and available for use: 06-May-2022

Check both of these:

  1. Calculate Depreciation
  2. Allow Monthly Depreciation

Finance Book child:
Depreciation Method: Written Down Value
Total Number of Depreciations: 7
Frequency of Depreciation (Months): 12
Depreciation Posting Date: 31-03-2023
Rate of Depreciation: 25

Error shown:
Depreciation Row 1: Expected value after useful life must be greater than or equal to 4630916.62

Module

assets

Version

Frappe Framework: v13.35.2 (version-13)
ERPNext: v13.35.2 (version-13)

Installation method

FrappeCloud

Relevant log output / Stack trace / Full Error Message.

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 69, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 55, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 38, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 76, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1457, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/save.py", line 22, in savedocs
    doc.submit()
  File "apps/frappe/frappe/model/document.py", line 1018, in submit
    return self._submit()
  File "apps/frappe/frappe/model/document.py", line 1007, in _submit
    return self.save()
  File "apps/frappe/frappe/model/document.py", line 310, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 347, in _save
    self.run_before_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1055, in run_before_save_methods
    self.run_method("validate")
  File "apps/frappe/frappe/model/document.py", line 941, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1259, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1241, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 938, in fn
    return method_object(*args, **kwargs)
  File "apps/erpnext/erpnext/assets/doctype/asset/asset.py", line 45, in validate
    self.validate_expected_value_after_useful_life()
  File "apps/erpnext/erpnext/assets/doctype/asset/asset.py", line 645, in validate_expected_value_after_useful_life
    frappe.throw(
  File "apps/frappe/frappe/__init__.py", line 504, in throw
    msgprint(
  File "apps/frappe/frappe/__init__.py", line 479, in msgprint
    _raise_exception()
  File "apps/frappe/frappe/__init__.py", line 434, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.ValidationError: Depreciation Row 1: Expected value after us
@anandbaburajan
Copy link
Contributor

@aakvatech I'm not able to reproduce this issue -- not getting any errors. Are you still getting this error?

@deepeshgarg007
Copy link
Member

@aakvatech Please reopen the issue again after checking if this is still happening

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants