Skip to content

A free open source IT asset/license management system

conditions 1dbarcode to populate based on settings

Godfrey M6559581bad95
diff --git a/app/View/Label.php b/app/View/Label.php
index 21c839fa11..21a8b15cae 100644
--- a/app/View/Label.php
+++ b/app/View/Label.php
@@ -106,15 +106,17 @@ 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) {
+ $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,
+ ]);
+ }
}
}