Try ERPNext Buy Support Partners Foundation

Automatic Depreciation of fixed Assets

Hi,

I have been trying to get the automatic depreciation function for fixed assets working for a few days. Unfortunately, I have not been successful, Im not sure what I’m doing wrong.

When I looked at the error log created from the background jobs, I get the following error, can someone please help decode this error.

Thanks in advance.

13-11-2019 00:00:57

failed
erpnext.assets.doctype.asset.depreciation.post_depreciation_entries

Traceback (most recent call last):
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/rq/worker.py”, line 793, in perform_job
rv = job.perform()
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/rq/job.py”, line 599, in perform
self._result = self._execute()
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/rq/job.py”, line 605, in _execute
return self.func(*self.args, **self.kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 103, in execute_job
method(**kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/assets/doctype/asset/depreciation.py”, line 18, in post_depreciation_entries
make_depreciation_entry(asset, date)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/assets/doctype/asset/depreciation.py”, line 75, in make_depreciation_entry
finance_books = asset.get(‘finance_books’)[idx - 1]
IndexError: list index out of range

Hi,

Anyone who can help me with this error please?

Thanks.

Please post some screen shot to understand the issue better. Are you trying to do back dated entry? It will not work. Give a future date for system to pass entry. Next day would be fine.

Hi Muzzy,
Please find a screen shot of one asset that was purchased previously but depreciation started last week. i set this date before 11-11-2019. However the system didn’t auto depreciate as you can see from the table below.

This is another asset i created with a more recent purchase date. That also didn’t depreciate.

Both above assets were created before 11-11-2019

Hi,
I really appreciate it if anyone is able to help me on this issue.

Thanks.