mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Add #7393 - next_audit_date set on asset creation if an audit interval is configured in settings (#7394)
This commit is contained in:
parent
60bb385cf7
commit
7b0b28aed0
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue