Fixed #4494 - use audit settings for asset audit pre-populaton

This commit is contained in:
snipe 2017-11-21 20:13:51 -08:00
parent 7ce63e653b
commit 43c1e893c0

View file

@ -1238,8 +1238,9 @@ class AssetsController extends Controller
public function audit($id)
{
$settings = Setting::getSettings();
$this->authorize('audit', Asset::class);
$dt = Carbon::now()->addMonths(12)->toDateString();
$dt = Carbon::now()->addMonths($settings->audit_interval)->toDateString();
$asset = Asset::findOrFail($id);
return view('hardware/audit')->with('asset', $asset)->with('next_audit_date', $dt)->with('locations_list');
}