Prevents showing double values

- If the asset name and tag are the same, the tag does not get shown in an email.
- If the model name is the same as the model number (when importing from LanSweeper for example), do not show the model number.
This commit is contained in:
Jens Maes 2022-02-25 08:19:46 +01:00
parent 292bf21e7d
commit 9b88f650d2
2 changed files with 6 additions and 2 deletions

View file

@ -13,14 +13,16 @@
@if ((isset($item->name)) && ($item->name!='')) @if ((isset($item->name)) && ($item->name!=''))
| **{{ trans('mail.asset_name') }}** | {{ $item->name }} | | **{{ trans('mail.asset_name') }}** | {{ $item->name }} |
@endif @endif
@if (($item->name!=$item->asset_tag))
| **{{ trans('mail.asset_tag') }}** | {{ $item->asset_tag }} | | **{{ trans('mail.asset_tag') }}** | {{ $item->asset_tag }} |
@endif
@if (isset($item->manufacturer)) @if (isset($item->manufacturer))
| **{{ trans('general.manufacturer') }}** | {{ $item->manufacturer->name }} | | **{{ trans('general.manufacturer') }}** | {{ $item->manufacturer->name }} |
@endif @endif
@if (isset($item->model)) @if (isset($item->model))
| **{{ trans('general.asset_model') }}** | {{ $item->model->name }} | | **{{ trans('general.asset_model') }}** | {{ $item->model->name }} |
@endif @endif
@if (isset($item->model->model_number)) @if ((isset($item->model->model_number)) && ($item->model->name!=$item->model->model_number))
| **{{ trans('general.model_no') }}** | {{ $item->model->model_number }} | | **{{ trans('general.model_no') }}** | {{ $item->model->model_number }} |
@endif @endif
@if (isset($item->serial)) @if (isset($item->serial))

View file

@ -13,14 +13,16 @@
@if ((isset($item->name)) && ($item->name!='')) @if ((isset($item->name)) && ($item->name!=''))
| **{{ trans('mail.asset_name') }}** | {{ $item->name }} | | **{{ trans('mail.asset_name') }}** | {{ $item->name }} |
@endif @endif
@if (($item->name!=$item->asset_tag))
| **{{ trans('mail.asset_tag') }}** | {{ $item->asset_tag }} | | **{{ trans('mail.asset_tag') }}** | {{ $item->asset_tag }} |
@endif
@if (isset($item->manufacturer)) @if (isset($item->manufacturer))
| **{{ trans('general.manufacturer') }}** | {{ $item->manufacturer->name }} | | **{{ trans('general.manufacturer') }}** | {{ $item->manufacturer->name }} |
@endif @endif
@if (isset($item->model)) @if (isset($item->model))
| **{{ trans('general.asset_model') }}** | {{ $item->model->name }} | | **{{ trans('general.asset_model') }}** | {{ $item->model->name }} |
@endif @endif
@if (isset($item->model->model_number)) @if ((isset($item->model->model_number)) && ($item->model->name!=$item->model->model_number))
| **{{ trans('general.model_no') }}** | {{ $item->model->model_number }} | | **{{ trans('general.model_no') }}** | {{ $item->model->model_number }} |
@endif @endif
@if (isset($item->serial)) @if (isset($item->serial))