Add #7393 - next_audit_date set on asset creation if an audit interval is configured in settings (#7394)

This commit is contained in:
Rick Heil 2019-09-03 13:58:51 -04:00 committed by snipe
parent 60bb385cf7
commit 7b0b28aed0

View file

@ -146,6 +146,10 @@ class AssetsController extends Controller
$asset->requestable = request('requestable', 0);
$asset->rtd_location_id = request('rtd_location_id', null);
if (!empty($settings->audit_interval)) {
$asset->next_audit_date = Carbon::now()->addMonths($settings->audit_interval)->toDateString();
}
if ($asset->assigned_to=='') {
$asset->location_id = $request->input('rtd_location_id', null);
}