diff --git a/app/config/version.php b/app/config/version.php
index ee83e7abd1..d38aed47dc 100644
--- a/app/config/version.php
+++ b/app/config/version.php
@@ -1,5 +1,5 @@
'v2.0.5-pre',
- 'hash_version' => 'v2.0.5-pre-181-g904dddd',
+ 'hash_version' => 'v2.0.5-pre-182-gc6c6bd0',
);
\ No newline at end of file
diff --git a/app/controllers/admin/ModelsController.php b/app/controllers/admin/ModelsController.php
index abef2cd9ef..ea94a3ea80 100755
--- a/app/controllers/admin/ModelsController.php
+++ b/app/controllers/admin/ModelsController.php
@@ -384,7 +384,7 @@ class ModelsController extends AdminController
public function getDatatable($status = null)
{
$models = Model::with('category','assets','depreciation');
- ($status != 'Deleted') ?: $models->withTrashed()->Deleted();;
+ ($status != 'Deleted') ?: $models->withTrashed()->Deleted();
if (Input::has('search')) {
$models = $models->TextSearch(Input::get('search'));
@@ -477,12 +477,18 @@ class ModelsController extends AdminController
$assets = $assets->skip($offset)->take($limit)->get();
$rows = array();
+ $actions = '';
foreach ($assets as $asset) {
- if (($asset->assigned_to !='') && ($asset->assigned_to > 0)) {
- $actions = ''.Lang::get('general.checkin').'';
- } else {
- $actions = ''.Lang::get('general.checkout').'';
+
+ if ($asset->assetstatus) {
+ if ($asset->assetstatus->deployable != 0) {
+ if (($asset->assigned_to !='') && ($asset->assigned_to > 0)) {
+ $actions = ''.Lang::get('general.checkin').'';
+ } else {
+ $actions = ''.Lang::get('general.checkout').'';
+ }
+ }
}
$rows[] = array(