Skip to content

Commit 548de1a

Browse files
committed
Fixes #468 - updated ordering on license checkout
1 parent 82560b1 commit 548de1a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/controllers/admin/LicensesController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,8 @@ public function getCheckout($seatId)
371371
}
372372

373373
// Get the dropdown of users and then pass it to the checkout view
374-
$users_list = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat (first_name," ",last_name) as full_name, id'))->whereNull('deleted_at')->lists('full_name', 'id');
374+
$users_list = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat(last_name,", ",first_name) as full_name, id'))->whereNull('deleted_at')->orderBy('last_name', 'asc')->orderBy('first_name', 'asc')->lists('full_name', 'id');
375+
375376

376377
// Left join to get a list of assets and some other helpful info
377378
$asset = DB::table('assets')
@@ -457,7 +458,7 @@ public function postCheckout($seatId)
457458
// Redirect to the asset management page with error
458459
return Redirect::to('admin/licenses')->with('error', Lang::get('admin/licenses/message.not_found'));
459460
}
460-
461+
461462
if ( e(Input::get('asset_id')) == '') {
462463
$licenseseat->asset_id = NULL;
463464
} else {

0 commit comments

Comments
 (0)