diff --git a/app/controllers/admin/ReportsController.php b/app/controllers/admin/ReportsController.php index d25e4ba2b5..aef7e3f3a6 100644 --- a/app/controllers/admin/ReportsController.php +++ b/app/controllers/admin/ReportsController.php @@ -592,12 +592,12 @@ class ReportsController extends AdminController ->get() ->toArray(), 'id' ); - $assetsCheckedOutThatRequireAcceptance = Asset::deployed() ->inModelList( $modelsInCategoriesThatRequireAcceptance ) ->list( 'id', 'assigned_to' ) ->get() ->toArray(); + $assetMaintenances = AssetMaintenance::with( 'asset', 'supplier' ) ->orderBy( 'created_at', 'DESC' ) ->get(); diff --git a/app/models/Actionlog.php b/app/models/Actionlog.php index 10b792ae9a..69a78793c6 100755 --- a/app/models/Actionlog.php +++ b/app/models/Actionlog.php @@ -1,5 +1,6 @@ select( '*' ) + ->orderBy( 'asset_id', 'asc' ) + ->orderBy( 'created_at', 'asc' ) + ->get(); + } + public function getLatestCheckoutActionForAssets() { @@ -108,4 +117,5 @@ return $query->where( 'action_type', '=', 'checkout' ) ->where( 'accepted_id', '=', null ); } + }