wip stuff

This commit is contained in:
slong753
2023-07-13 00:43:48 -05:00
committed by spencerrlongg
parent a49d3fe131
commit 8456b3ec0c
2 changed files with 64 additions and 0 deletions
+11
View File
@@ -119,4 +119,15 @@ class AssetObserver
$logAction->user_id = Auth::id();
$logAction->logaction('delete');
}
public function saving(Asset $asset)
{
//turning this off for right now so i can check out the note in the migration
//calculate and set the EOL date if it is not already set
// if(is_null($asset->asset_eol_date) && !is_null($asset->asset_purchase_date) && !is_null($asset->model()->get()->eol)){
// $asset->asset_eol_date = date('Y-m-d', strtotime($asset->asset_purchase_date . ' + ' . $asset->asset_warranty_months . ' months'));
// }
}
}