Skip to content

Commit

Permalink
Fixed audit date default on bulk audit
Browse files Browse the repository at this point in the history
Signed-off-by: snipe <[email protected]>
  • Loading branch information
snipe committed Jan 15, 2025
1 parent 1d0c156 commit bbc9ed5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/Http/Controllers/Assets/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -865,8 +865,8 @@ public function getRestore($assetId = null)
public function quickScan()
{
$this->authorize('audit', Asset::class);
$dt = Carbon::now()->addMonths(12)->toDateString();

$settings = Setting::getSettings();
$dt = Carbon::now()->addMonths($settings->audit_interval)->toDateString();
return view('hardware/quickscan')->with('next_audit_date', $dt);
}

Expand All @@ -883,7 +883,6 @@ public function audit($id)
$this->authorize('audit', Asset::class);
$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');
}

Expand Down

0 comments on commit bbc9ed5

Please sign in to comment.