Skip to content

Commit bbc9ed5

Browse files
committed
Fixed audit date default on bulk audit
Signed-off-by: snipe <[email protected]>
1 parent 1d0c156 commit bbc9ed5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/Http/Controllers/Assets/AssetsController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -865,8 +865,8 @@ public function getRestore($assetId = null)
865865
public function quickScan()
866866
{
867867
$this->authorize('audit', Asset::class);
868-
$dt = Carbon::now()->addMonths(12)->toDateString();
869-
868+
$settings = Setting::getSettings();
869+
$dt = Carbon::now()->addMonths($settings->audit_interval)->toDateString();
870870
return view('hardware/quickscan')->with('next_audit_date', $dt);
871871
}
872872

@@ -883,7 +883,6 @@ public function audit($id)
883883
$this->authorize('audit', Asset::class);
884884
$dt = Carbon::now()->addMonths($settings->audit_interval)->toDateString();
885885
$asset = Asset::findOrFail($id);
886-
887886
return view('hardware/audit')->with('asset', $asset)->with('next_audit_date', $dt)->with('locations_list');
888887
}
889888

0 commit comments

Comments
 (0)