- case 'S': // actual_cost stores start cost of item
- $value = $item['actual_cost']*$item['depreciation_rate']/100/12;
+ case 'S': // purchase_cost stores start cost of item
+ $done_months = months_between_dates($item['depreciation_start'], $item['depreciation_date']);
+ $remaining_months = 12.0 * 100.0/$item['depreciation_rate'] - $done_months;
+ $value = $item['purchase_cost']*$item['depreciation_rate']/100/12;