diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 9c7392560d..72fcfd00a3 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -636,6 +636,7 @@ class SettingsController extends Controller $setting->alert_threshold = $request->input('alert_threshold'); $setting->audit_interval = $request->input('audit_interval'); $setting->audit_warning_days = $request->input('audit_warning_days'); + $setting->due_checkin_days = $request->input('due_checkin_days'); $setting->show_alerts_in_menu = $request->input('show_alerts_in_menu', '0'); if ($setting->save()) { diff --git a/app/Models/Asset.php b/app/Models/Asset.php index cddca9802c..c15ec38240 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -1315,7 +1315,7 @@ class Asset extends Depreciable public function scopeDueForCheckin($query, $settings) { - $interval = $settings->audit_warning_days ?? 0; + $interval = $settings->due_checkin_days ?? 0; $today = Carbon::now(); $interval_date = $today->copy()->addDays($interval)->format('Y-m-d'); diff --git a/resources/lang/en-US/admin/settings/general.php b/resources/lang/en-US/admin/settings/general.php index 9ba69ef22a..52aee1e8c8 100644 --- a/resources/lang/en-US/admin/settings/general.php +++ b/resources/lang/en-US/admin/settings/general.php @@ -379,5 +379,7 @@ return [ 'default_avatar_help' => 'This image will be displayed as a profile if a user does not have a profile photo.', 'restore_default_avatar' => 'Restore original system default avatar', 'restore_default_avatar_help' => '', + 'due_checkin_days' => 'Due For Checkin Warning', + 'due_checkin_days_help' => 'How many days before the expected checkin of an asset should it be listed in the "Due for checkin" page?', ]; diff --git a/resources/views/hardware/checkin-due.blade.php b/resources/views/hardware/checkin-due.blade.php index 6ed7cf42c5..79ea7553a8 100644 --- a/resources/views/hardware/checkin-due.blade.php +++ b/resources/views/hardware/checkin-due.blade.php @@ -2,7 +2,7 @@ {{-- Page title --}} @section('title') - {{ trans_choice('general.checkin_due_days', $settings->audit_warning_days, ['days' => $settings->audit_warning_days]) }} + {{ trans_choice('general.checkin_due_days', $settings->due_checkin_days, ['days' => $settings->due_checkin_days]) }} @stop {{-- Page content --}} diff --git a/resources/views/settings/alerts.blade.php b/resources/views/settings/alerts.blade.php index 0d434040a3..fc52ae3869 100644 --- a/resources/views/settings/alerts.blade.php +++ b/resources/views/settings/alerts.blade.php @@ -150,6 +150,25 @@ + +
{{ trans('admin/settings/general.due_checkin_days_help') }}
+