mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Merge pull request #14362 from Godmartinz/labels-not-generating-properly
Fixes inconsistencies with generating labels
This commit is contained in:
commit
9a5c1b8126
|
@ -38,7 +38,7 @@ class Label implements View
|
||||||
$settings = $this->data->get('settings');
|
$settings = $this->data->get('settings');
|
||||||
$assets = $this->data->get('assets');
|
$assets = $this->data->get('assets');
|
||||||
$offset = $this->data->get('offset');
|
$offset = $this->data->get('offset');
|
||||||
$template = $this->data->get('template');
|
$template = LabelModel::find($settings->label2_template);
|
||||||
|
|
||||||
// If disabled, pass to legacy view
|
// If disabled, pass to legacy view
|
||||||
if ((!$settings->label2_enable) && (!$template)) {
|
if ((!$settings->label2_enable) && (!$template)) {
|
||||||
|
@ -49,13 +49,6 @@ class Label implements View
|
||||||
->with('count', $this->data->get('count'));
|
->with('count', $this->data->get('count'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// If a specific template was set, use it, otherwise fall back to default
|
|
||||||
if (empty($template)) {
|
|
||||||
$template = LabelModel::find($settings->label2_template);
|
|
||||||
} elseif (is_string($template)) {
|
|
||||||
$template = LabelModel::find($template);
|
|
||||||
}
|
|
||||||
|
|
||||||
$template->validate();
|
$template->validate();
|
||||||
|
|
||||||
$pdf = new TCPDF(
|
$pdf = new TCPDF(
|
||||||
|
|
Loading…
Reference in a new issue