Merge pull request #14307 from marcusmoore/bug/sc-24867

Fixed title not appearing in new label engine
This commit is contained in:
snipe 2024-02-20 22:25:45 +00:00 committed by GitHub
commit a37d3b00d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -90,13 +90,9 @@ class Label implements View
$assetData->put('id', $asset->id);
$assetData->put('tag', $asset->asset_tag);
if ($template->getSupportTitle()) {
if ($asset->company && !empty($settings->label2_title)) {
$title = str_replace('{COMPANY}', $asset->company->name, $settings->label2_title);
$settings->qr_text;
$assetData->put('title', $title);
}
if ($template->getSupportTitle() && !empty($settings->label2_title)) {
$title = str_replace('{COMPANY}', data_get($asset, 'company.name'), $settings->label2_title);
$assetData->put('title', $title);
}
if ($template->getSupportLogo()) {
@ -216,4 +212,4 @@ class Label implements View
return self::NAME;
}
}
}