diff --git a/modules/labelgenerate/models/generatebarcode.php b/modules/labelgenerate/models/generatebarcode.php index 39c66116..daa6f696 100644 --- a/modules/labelgenerate/models/generatebarcode.php +++ b/modules/labelgenerate/models/generatebarcode.php @@ -371,7 +371,7 @@ class GenerateBarcode } // Mark in ref else { - preg_match('/.*-(.*)-.*/', $product['ref'], $matches); + preg_match('/^.*-(.*)-.*/', $product['ref'], $matches); $ref = $matches[1]; $this->_printIdMark($pdf, $ref, 1, $width, $height_label, 30); }