diff --git a/app/Http/Controllers/ComponentsController.php b/app/Http/Controllers/ComponentsController.php index 9be7282706..977bf7d190 100644 --- a/app/Http/Controllers/ComponentsController.php +++ b/app/Http/Controllers/ComponentsController.php @@ -503,7 +503,7 @@ class ComponentsController extends Controller foreach ($component->assets as $component_assignment) { $rows[] = array( - 'name' => (string)link_to('/hardware/'.$component_assignment->id.'/view', e($component_assignment->name)), + 'name' => (string)link_to('/hardware/'.$component_assignment->id.'/view', e($component_assignment->showAssetName())), 'qty' => e($component_assignment->pivot->assigned_qty), 'created_at' => ($component_assignment->created_at->format('Y-m-d H:i:s')=='-0001-11-30 00:00:00') ? '' : $component_assignment->created_at->format('Y-m-d H:i:s'), ); diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 12f82cfce6..c88c27956f 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -376,7 +376,7 @@ class Asset extends Depreciable { if ($this->name == '') { - return $this->model->name; + return $this->model->name.' ('.$this->asset_tag.')'; } else { return $this->name; }