A free open source IT asset/license management system
removed commented out code, and unrelated crap
Godfrey Mc699baf519c5
diff --git a/app/Console/Commands/SendExpirationAlerts.php b/app/Console/Commands/SendExpirationAlerts.phpindex 2cb36bb827..025ba2ce23 100644--- a/app/Console/Commands/SendExpirationAlerts.php+++ b/app/Console/Commands/SendExpirationAlerts.php@@ -9,7 +9,6 @@ use App\Models\Setting;use App\Notifications\ExpiringAssetsNotification;use App\Notifications\ExpiringLicenseNotification;use Illuminate\Console\Command;-use Illuminate\Support\Facades\Notification;class SendExpirationAlerts extends Command{@@ -46,7 +45,7 @@ class SendExpirationAlerts extends Command$threshold = $settings->alert_interval;if (($settings->alert_email != '') && ($settings->alerts_enabled == 1)) {- $this->info('alerts');+// Send a rollup to the admin, if settings dictate$recipients = collect(explode(',', $settings->alert_email))->map(function ($item, $key) {return new AlertRecipient($item);@@ -55,17 +54,15 @@ class SendExpirationAlerts extends Command// Expiring Assets$assets = Asset::getExpiringWarrantee($threshold);if ($assets->count() > 0) {- $this->info('expiring warrantees');$this->info(trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count' => $assets->count(), 'threshold' => $threshold]));- Notification::send($recipients, new ExpiringAssetsNotification($assets, $threshold));+ \Notification::send($recipients, new ExpiringAssetsNotification($assets, $threshold));}// Expiring licenses$licenses = License::getExpiringLicenses($threshold);if ($licenses->count() > 0) {- $this->info('expiring licenses');$this->info(trans_choice('mail.license_expiring_alert', $licenses->count(), ['count' => $licenses->count(), 'threshold' => $threshold]));- Notification::send($recipients, new ExpiringLicenseNotification($licenses, $threshold));+ \Notification::send($recipients, new ExpiringLicenseNotification($licenses, $threshold));}} else {if ($settings->alert_email == '') {@@ -74,6 +71,5 @@ class SendExpirationAlerts extends Command$this->info('Alerts are disabled in the settings. No mail will be sent');}}- $this->info('nothing here.');}}diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.phpindex 99f7fdfccf..566e813544 100644--- a/app/Http/Controllers/ReportsController.php+++ b/app/Http/Controllers/ReportsController.php@@ -1111,16 +1111,6 @@ class ReportsController extends Controller$this->authorize('reports.view');$showDeleted = $deleted == 'deleted';-// $acceptances = CheckoutAcceptance::pending()-// ->where('checkoutable_type', 'App\Models\Asset')-// ->withTrashed()-// ->with([-// 'assignedTo',-// 'checkoutable.assignedTo',-// 'checkoutable.model'-// ])->get();- $assetsForReport = collect();-$query = CheckoutAcceptance::pending()->where('checkoutable_type', 'App\Models\Asset')->with([