diff --git a/app/Http/Controllers/Assets/AssetsController.php b/app/Http/Controllers/Assets/AssetsController.php index 2a15747d33..075a499345 100755 --- a/app/Http/Controllers/Assets/AssetsController.php +++ b/app/Http/Controllers/Assets/AssetsController.php @@ -543,7 +543,7 @@ class AssetsController extends Controller { $settings = Setting::getSettings(); if ($asset = Asset::withTrashed()->find($assetId)) { - $barcode_file = public_path().'/uploads/barcodes/'.str_slug($settings->alt_barcode).'-'.str_slug($asset->asset_tag).'.png'; + $barcode_file = public_path().'/uploads/barcodes/'.str_slug($settings->label2_1d_type).'-'.str_slug($asset->asset_tag).'.png'; if (isset($asset->id, $asset->asset_tag)) { if (file_exists($barcode_file)) { @@ -556,7 +556,7 @@ class AssetsController extends Controller $barcode = new \Com\Tecnick\Barcode\Barcode(); try { - $barcode_obj = $barcode->getBarcodeObj($settings->alt_barcode, $asset->asset_tag, ($barcode_width < 300 ? $barcode_width : 300), 50); + $barcode_obj = $barcode->getBarcodeObj($settings->label2_1d_type, $asset->asset_tag, ($barcode_width < 300 ? $barcode_width : 300), 50); file_put_contents($barcode_file, $barcode_obj->getPngData()); return response($barcode_obj->getPngData())->header('Content-type', 'image/png'); diff --git a/resources/views/settings/labels.blade.php b/resources/views/settings/labels.blade.php index e7f352c01b..6746f3626f 100644 --- a/resources/views/settings/labels.blade.php +++ b/resources/views/settings/labels.blade.php @@ -139,64 +139,90 @@ @endif - -
- {{ trans('admin/settings/general.label2_1d_type_help') }}. - {!! - trans('admin/settings/general.help_default_will_use', [ - 'default' => trans('admin/settings/general.default'), - 'setting_name' => trans('admin/settings/general.barcodes').' > '.trans('admin/settings/general.alt_barcode_type'), - ]) - !!} -
-- {{ trans('admin/settings/general.label2_2d_type_help', ['current' => $setting->barcode_type]) }}. - {!! - trans('admin/settings/general.help_default_will_use', [ - 'default' => trans('admin/settings/general.default'), - 'setting_name' => trans('admin/settings/general.barcodes').' > '.trans('admin/settings/general.barcode_type'), - ]) - !!} -
++ {{ trans('admin/settings/general.label2_1d_type_help') }}. + {!! + trans('admin/settings/general.help_default_will_use', [ + 'default' => trans('admin/settings/general.default'), + 'setting_name' => trans('admin/settings/general.barcodes').' > '.trans('admin/settings/general.alt_barcode_type'), + ]) + !!} +
++ {{ trans('admin/settings/general.label2_2d_type_help', ['current' => $setting->barcode_type]) }}. + {!! + trans('admin/settings/general.help_default_will_use', [ + 'default' => trans('admin/settings/general.default'), + 'setting_name' => trans('admin/settings/general.barcodes').' > '.trans('admin/settings/general.barcode_type'), + ]) + !!} +
+