Set label title properly

This commit is contained in:
Marcus Moore 2024-02-20 13:59:50 -08:00
parent 71610fb20f
commit ccec190985
No known key found for this signature in database

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;
}
}
}