Skip to content

A free open source IT asset/license management system

gets rid of depreciate

spencerrlongg6e5f296a13d5
diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php
index 6f725cafbf..53608d682a 100644
--- a/app/Http/Controllers/Api/AssetsController.php
+++ b/app/Http/Controllers/Api/AssetsController.php
@@ -545,7 +545,6 @@ class AssetsController extends Controller
// @todo: verify eol is working as expected - move to request? or do I want this at all?
// might just remove this and then use the method from here https://github.com/snipe/snipe-it/pull/13846
$asset->asset_eol_date = $request->validated()['asset_eol_date'] ?? $asset->present()->eol_date(); // so this isn't really necessary, because it's happening on the observer - but that might change?
- $asset->depreciate = '0';
/**
* this is here just legacy reasons. Api\AssetController
diff --git a/app/Http/Controllers/Assets/AssetsController.php b/app/Http/Controllers/Assets/AssetsController.php
index 61b0959aea..e4a6e792af 100755
--- a/app/Http/Controllers/Assets/AssetsController.php
+++ b/app/Http/Controllers/Assets/AssetsController.php
@@ -131,7 +131,6 @@ class AssetsController extends Controller
$asset->order_number = $request->input('order_number');
$asset->notes = $request->input('notes');
$asset->user_id = Auth::id();
- $asset->depreciate = '0';
$asset->status_id = request('status_id');
$asset->warranty_months = request('warranty_months', null);
$asset->purchase_cost = request('purchase_cost');
diff --git a/tests/Feature/Api/Assets/AssetStoreTest.php b/tests/Feature/Api/Assets/AssetStoreTest.php
index 1584659d77..e177e59ea4 100644
--- a/tests/Feature/Api/Assets/AssetStoreTest.php
+++ b/tests/Feature/Api/Assets/AssetStoreTest.php
@@ -73,8 +73,6 @@ class AssetStoreTest extends TestCase
$this->assertEquals($userAssigned->id, $asset->assigned_to);
// @todo: This is not in the docs but it's in the controller (company_id)
$this->assertTrue($asset->company->is($company));
- // @todo: this is explicitly set 0 in the controller but they docs say they are customizable
- // $this->assertTrue($asset->depreciate);
// @todo: this is in the docs but not the controller
// $this->assertEquals('2023-09-03', $asset->last_audit_date);
// @todo: this is set to rtd_location_id in the controller but customizable in the docs