Fixed #4663 - duplicate manufacturer name in selectlist

This commit is contained in:
snipe 2017-12-20 12:32:55 -08:00
parent d2e2c1c05f
commit c3a44f25fd
2 changed files with 2 additions and 2 deletions

View file

@ -200,7 +200,7 @@ class AssetModelsController extends Controller
$assetmodels = $assetmodels->OrderCategory('ASC')->OrderManufacturer('ASC')->orderby('models.name', 'asc')->orderby('models.model_number', 'asc')->paginate(50);
foreach ($assetmodels as $assetmodel) {
$assetmodel->use_text = (($assetmodel->category) ? e($assetmodel->category->name) : '').': '.(($assetmodel->manufacturer) ? e($assetmodel->manufacturer->name) : '').' '.$assetmodel->present()->modelName;
$assetmodel->use_text = (($assetmodel->category) ? e($assetmodel->category->name) : '').': '.$assetmodel->present()->modelName;
$assetmodel->use_image = ($assetmodel->image) ? url('/').'/uploads/models/'.$assetmodel->image : null;
}

View file

@ -47,7 +47,7 @@ class AssetModelPresenter extends Presenter
{
$name = '';
if ($this->model->manufacturer) {
$name .= $this->model->manufacturer->name;
$name .= $this->model->manufacturer->name.' ';
}
$name .= $this->name;