A free open source IT asset/license management system
use full width if no field label present on TZe_24mm_E
Godfrey Mc4b20a16ce03
diff --git a/app/Helpers/Helper.php b/app/Helpers/Helper.phpindex a05d24d320..c893f15df8 100644--- a/app/Helpers/Helper.php+++ b/app/Helpers/Helper.php@@ -1816,6 +1816,8 @@ class Helper$labelWidth = ($maxLabelWidthPerUnit * $labelSize) + $labelPadding;$valueX = $currentX + $labelWidth + $gap;$valueWidth = $usableWidth - $labelWidth - $gap;+ $fullValueX = $currentX;+ $fullValueWidth = $usableWidth;return compact('scale',@@ -1829,7 +1831,9 @@ class Helper'rowAdvance','labelWidth','valueX',- 'valueWidth'+ 'valueWidth',+ 'fullValueX',+ 'fullValueWidth',);}}diff --git a/app/Models/Labels/Tapes/Brother/TZe_24mm_E.php b/app/Models/Labels/Tapes/Brother/TZe_24mm_E.phpindex 1dac53a326..5dafbb094a 100644--- a/app/Models/Labels/Tapes/Brother/TZe_24mm_E.php+++ b/app/Models/Labels/Tapes/Brother/TZe_24mm_E.php@@ -133,18 +133,21 @@ class TZe_24mm_E extends TZe_24mm);foreach ($fields as $field) {- static::writeText(- $pdf, $field['label'],- $currentX, $currentY,- 'freesans', '', $field_layout['labelSize'], 'L',- $field_layout['labelWidth'], $field_layout['rowAdvance'], true, 0- );+ $hasLabel = is_string($field['label'] ?? null) && trim($field['label']) !== '';+ if ($hasLabel) {+ static::writeText(+ $pdf, $field['label'],+ $currentX, $currentY,+ 'freesans', '', $field_layout['labelSize'], 'L',+ $field_layout['labelWidth'], $field_layout['rowAdvance'], true, 0+ );+ }static::writeText($pdf, $field['value'],- $field_layout['valueX'], $currentY,+ $hasLabel ? $field_layout['valueX'] : $field_layout['fullValueX'], $currentY,'freemono', 'B', $field_layout['fieldSize'], 'L',- $field_layout['valueWidth'], $field_layout['rowAdvance'], true, 0, 0.01+ $hasLabel ? $field_layout['valueWidth'] : $field_layout['fullValueWidth'], $field_layout['rowAdvance'], true, 0, 0.01);$currentY += $field_layout['rowAdvance'];}