Merge pull request #14380 from Godmartinz/1dbarcode_unselected_bug

Fixed 1dbarcodes to populate based on settings
This commit is contained in:
snipe 2024-03-07 10:16:37 +00:00 committed by GitHub
commit 58bf036f52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -105,16 +105,15 @@ class Label implements View
}
}
if ($template->getSupport1DBarcode()) {
$barcode1DType = $settings->label2_1d_type;
$barcode1DType = ($barcode1DType == 'default') ?
(($settings->alt_barcode_enabled) ? $settings->alt_barcode : null) :
$barcode1DType;
if ($barcode1DType != 'none') {
$assetData->put('barcode1d', (object)[
'type' => $barcode1DType,
'content' => $asset->asset_tag,
]);
if ($settings->alt_barcode_enabled) {
if ($template->getSupport1DBarcode()) {
$barcode1DType = $settings->alt_barcode;
if ($barcode1DType != 'none') {
$assetData->put('barcode1d', (object)[
'type' => $barcode1DType,
'content' => $asset->asset_tag,
]);
}
}
}