mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
fixes inconsistencies with generating labels
This commit is contained in:
parent
9419c7fdeb
commit
e926db76a0
|
@ -38,7 +38,7 @@ class Label implements View
|
|||
$settings = $this->data->get('settings');
|
||||
$assets = $this->data->get('assets');
|
||||
$offset = $this->data->get('offset');
|
||||
$template = $this->data->get('template');
|
||||
$template = LabelModel::find($settings->label2_template);
|
||||
|
||||
// If disabled, pass to legacy view
|
||||
if ((!$settings->label2_enable) && (!$template)) {
|
||||
|
@ -49,13 +49,6 @@ class Label implements View
|
|||
->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();
|
||||
|
||||
$pdf = new TCPDF(
|
||||
|
|
Loading…
Reference in a new issue