how depreciation date will update in HW assets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 01:26 AM
How depreciation value will calculate and how the depreciation date will get update , i want to know the logic or calculate on how the depreciation will calculate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 02:32 AM - edited 12-13-2023 02:34 AM
Hi @Royal1
Let's have a look into the business rule below.
Name: Set Depreciation values
URL: https://<instance_name>/sys_script.do?sys_id=d48da842dbc302002aaf71d8f0b8f54e
It set value for the depreciation_date field based on the received date or the install_date date
if(!current.depreciation_date.changes() && current.depreciation) {
if (GlidePluginManager.isActive('com.snc.procurement') && current.receiving_line) {
current.depreciation_date = current.receiving_line.received;
} else if (current.install_date) {
current.depreciation_date = current.install_date;
}
}
And below script include for calculation of Residual date and Depreciated amount.
Script Include: DepreciationUtils
Function: calcDepreciation
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 04:13 AM
This script will work in the alm_asset but if its a Hardware asset alm_hardware
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 08:19 PM
Hi @Royal1
Yes the Hardware [alm_hardware] is the child table, which extends the Asset [alm_asset] table. So, the Business Rule will apply to the Hardware table as well.
You can have a look into the Dictionary of the Depreciation and Depreciation effective date fields. These fields actually come from the Asset table.
Cheers,
Tai Vu