mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-24 12:17:05 -08:00
Fixed uninitialized offset in labels
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
07880dfe50
commit
37dfecf098
|
@ -163,17 +163,21 @@ class DefaultLabel extends RectangleSheet
|
|||
// Fields
|
||||
$fieldsDone = 0;
|
||||
if ($fieldsDone < $this->getSupportFields()) {
|
||||
// dd($record->get('fields'));
|
||||
|
||||
foreach ($record->get('fields') as $field) {
|
||||
static::writeText(
|
||||
$pdf, $field['label'][0]. ': ' . $field['value'],
|
||||
$textX1, $textY,
|
||||
'freesans', '', $this->textSize, 'L',
|
||||
$textW, $this->textSize,
|
||||
true, 0
|
||||
);
|
||||
$textY += $this->textSize + self::TEXT_MARGIN;
|
||||
$fieldsDone++;
|
||||
|
||||
if ((array_key_exists('label', $field)) && (is_array($field['label']))) {
|
||||
static::writeText(
|
||||
$pdf, $field['label'][0]. ': ' . $field['value'],
|
||||
$textX1, $textY,
|
||||
'freesans', '', $this->textSize, 'L',
|
||||
$textW, $this->textSize,
|
||||
true, 0
|
||||
);
|
||||
$textY += $this->textSize + self::TEXT_MARGIN;
|
||||
$fieldsDone++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue