mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Updated method for available seat count
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
4d09021e9c
commit
3a808aa806
|
@ -236,9 +236,14 @@ class LicensesController extends Controller
|
|||
$license = License::with('assignedusers')->find($licenseId);
|
||||
$users_count = User::where('autoassign_licenses', '1')->count();
|
||||
$total_seats_count = $license->totalSeatsByLicenseID();
|
||||
$available_seats_count = $license->availableSeats()->count();
|
||||
$available_seats_count = $license->availCount()->count();
|
||||
$checkedout_seats_count = ($total_seats_count - $available_seats_count);
|
||||
|
||||
\Log::debug('Total: '.$total_seats_count);
|
||||
\Log::debug('Users: '.$users_count);
|
||||
\Log::debug('Available: '.$available_seats_count);
|
||||
\Log::debug('Checkedout: '.$checkedout_seats_count);
|
||||
|
||||
|
||||
if ($license) {
|
||||
$this->authorize('view', $license);
|
||||
|
|
Loading…
Reference in a new issue