fixed eol, add calculated eol/eol explicit tests

This commit is contained in:
spencerrlongg
2023-11-29 14:57:31 -06:00
parent 9d8433bd6d
commit c3492f1699
2 changed files with 61 additions and 1 deletions
@@ -545,7 +545,7 @@ class AssetsController extends Controller
$asset->user_id = Auth::id();
// @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();
$asset->asset_eol_date = $request->validated()['asset_eol_date'] ?? $asset->present()->eol_date();
$asset->archived = '0';
$asset->physical = '1';
$asset->depreciate = '0';