mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Fixed #4494 - use audit settings for asset audit pre-populaton
This commit is contained in:
parent
7ce63e653b
commit
43c1e893c0
|
@ -1238,8 +1238,9 @@ class AssetsController extends Controller
|
||||||
|
|
||||||
public function audit($id)
|
public function audit($id)
|
||||||
{
|
{
|
||||||
|
$settings = Setting::getSettings();
|
||||||
$this->authorize('audit', Asset::class);
|
$this->authorize('audit', Asset::class);
|
||||||
$dt = Carbon::now()->addMonths(12)->toDateString();
|
$dt = Carbon::now()->addMonths($settings->audit_interval)->toDateString();
|
||||||
$asset = Asset::findOrFail($id);
|
$asset = Asset::findOrFail($id);
|
||||||
return view('hardware/audit')->with('asset', $asset)->with('next_audit_date', $dt)->with('locations_list');
|
return view('hardware/audit')->with('asset', $asset)->with('next_audit_date', $dt)->with('locations_list');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue