A free open source IT asset/license management system
Fix an issue when trying to checkin a license seat. [ch46] (#6599)
Ivan Nieto310ed0f1d32f
diff --git a/app/Http/Controllers/Licenses/LicenseCheckinController.php b/app/Http/Controllers/Licenses/LicenseCheckinController.phpindex 4bddbd5753..14df85a080 100644--- a/app/Http/Controllers/Licenses/LicenseCheckinController.php+++ b/app/Http/Controllers/Licenses/LicenseCheckinController.php@@ -91,7 +91,7 @@ class LicenseCheckinController extends Controller// Was the asset updated?if ($licenseSeat->save()) {- event(new CheckoutableCheckedIn($license, $return_to, Auth::user(), $request->input('note')));+ event(new CheckoutableCheckedIn($licenseSeat, $return_to, Auth::user(), $request->input('note')));if ($backTo=='user') {return redirect()->route("users.show", $return_to->id)->with('success', trans('admin/licenses/message.checkin.success'));diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.phpindex e06c6e1e40..43eedf54d8 100644--- a/app/Listeners/CheckoutableListener.php+++ b/app/Listeners/CheckoutableListener.php@@ -131,7 +131,7 @@ class CheckoutableListener$notificationClass = CheckinLicenseSeatNotification::class;break;}-+return new $notificationClass($event->checkoutable, $event->checkedOutTo, $event->checkedInBy, $event->note);}diff --git a/resources/views/licenses/checkin.blade.php b/resources/views/licenses/checkin.blade.phpindex d34b6e9447..514f678a75 100755--- a/resources/views/licenses/checkin.blade.php+++ b/resources/views/licenses/checkin.blade.php@@ -17,7 +17,7 @@<div class="row"><!-- left column --><div class="col-md-7">- <form class="form-horizontal" method="post" action="{{ route('licenses.checkin.save', $licenseSeat->id) }}" autocomplete="off">+ <form class="form-horizontal" method="post" action="{{ route('licenses.checkin.save', ['licenseId'=>$licenseSeat->id, 'backTo'=>$backto] ) }}" autocomplete="off">{{csrf_field()}}<div class="box box-default">