@@ -377,8 +377,9 @@ public function getCheckout($seatId)
377377 // Left join to get a list of assets and some other helpful info
378378 $ asset = DB ::table ('assets ' )
379379 ->leftJoin ('users ' , 'users.id ' , '= ' , 'assets.assigned_to ' )
380- ->select ('assets.id ' , 'name ' , 'first_name ' , 'last_name ' ,'asset_tag ' ,
381- DB ::raw ('concat (first_name," ",last_name) as full_name, assets.id as id ' ))
380+ ->leftJoin ('models ' , 'assets.model_id ' , '= ' , 'models.id ' )
381+ ->select ('assets.id ' , 'assets.name ' , 'first_name ' , 'last_name ' ,'asset_tag ' ,
382+ DB ::raw ('concat (first_name," ",last_name) as full_name, assets.id as id, models.name as modelname ' ))
382383 ->whereNull ('assets.deleted_at ' )
383384 ->get ();
384385
@@ -389,9 +390,9 @@ public function getCheckout($seatId)
389390 for ($ x =0 ; $ x <count ($ asset_array ); $ x ++) {
390391
391392 if ($ asset_array [$ x ]['full_name ' ]!='' ) {
392- $ full_name = ' ( ' .$ asset_array [$ x ]['full_name ' ].') ' ;
393+ $ full_name = ' ( ' .$ asset_array [$ x ]['full_name ' ].') ' . $ asset_array [ $ x ][ ' modelname ' ] ;
393394 } else {
394- $ full_name = ' (Unassigned) ' ;
395+ $ full_name = ' (Unassigned) ' . $ asset_array [ $ x ][ ' modelname ' ] ;
395396 }
396397 $ asset_element [$ asset_array [$ x ]['id ' ]] = $ asset_array [$ x ]['asset_tag ' ].' - ' .$ asset_array [$ x ]['name ' ].$ full_name ;
397398
0 commit comments