Skip to content

A free open source IT asset/license management system

add support for 1d barcode to zebra 18939

Godfrey M589a80e909f2
diff --git a/app/Models/Labels/Tapes/Zebra/Z_Ultimate_18939.php b/app/Models/Labels/Tapes/Zebra/Z_Ultimate_18939.php
index c23a6e96d7..b5082db991 100644
--- a/app/Models/Labels/Tapes/Zebra/Z_Ultimate_18939.php
+++ b/app/Models/Labels/Tapes/Zebra/Z_Ultimate_18939.php
@@ -43,7 +43,7 @@ class Z_Ultimate_18939 extends Z_Ultimate
public function getSupport1DBarcode()
{
- return false;
+ return true;
}
public function getSupport2DBarcode()
@@ -128,22 +128,8 @@ class Z_Ultimate_18939 extends Z_Ultimate
$currentX += $barcodeWidth;
$usableWidth -= $barcodeWidth;
- } else {
- static::writeText(
- $pdf,
- $record->get('tag'),
- $pa->x1,
- $pa->y2 - static::TAG_SIZE,
- 'freemono',
- 'B',
- static::TAG_SIZE,
- 'R',
- $usableWidth,
- static::TAG_SIZE,
- true,
- 0
- );
}
+
$textWidth = $usableWidth;
if ($record->has('logo')) {
@@ -227,5 +213,16 @@ class Z_Ultimate_18939 extends Z_Ultimate
0
);
}
+ if ($record->has('barcode1d')) {
+ static::write1DBarcode(
+ $pdf,
+ $record->get('barcode1d')->content,
+ $record->get('barcode1d')->type,
+ $currentX,
+ $barcodeSize + static::BARCODE_MARGIN,
+ $usableWidth - static::TAG_SIZE,
+ static::TAG_SIZE
+ );
+ }
}
}
\ No newline at end of file