mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Fixes #2317
This commit is contained in:
parent
f53c5706f6
commit
fbd0059bbb
|
@ -503,7 +503,7 @@ class ComponentsController extends Controller
|
||||||
|
|
||||||
foreach ($component->assets as $component_assignment) {
|
foreach ($component->assets as $component_assignment) {
|
||||||
$rows[] = array(
|
$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),
|
'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'),
|
'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'),
|
||||||
);
|
);
|
||||||
|
|
|
@ -376,7 +376,7 @@ class Asset extends Depreciable
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->name == '') {
|
if ($this->name == '') {
|
||||||
return $this->model->name;
|
return $this->model->name.' ('.$this->asset_tag.')';
|
||||||
} else {
|
} else {
|
||||||
return $this->name;
|
return $this->name;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue