diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php index db662b6d9e4..e421c17a470 100644 --- a/htdocs/barcode/codeinit.php +++ b/htdocs/barcode/codeinit.php @@ -298,7 +298,7 @@ if ($conf->product->enabled || $conf->product->service) { $disabled=1; $titleno=$langs->trans("NoBarcodeNumberingTemplateDefined"); - print ''.$langs->trans("NoBarcodeNumberingTemplateDefined").'
'; + print ''.$langs->trans("NoBarcodeNumberingTemplateDefined").' ('.$langs->trans("ToGenerateCodeDefineAutomaticRuleFirst").')
'; } if (empty($nbno)) { diff --git a/htdocs/core/lib/barcode.lib.php b/htdocs/core/lib/barcode.lib.php index 778723c5f3b..eaaa6f349c4 100644 --- a/htdocs/core/lib/barcode.lib.php +++ b/htdocs/core/lib/barcode.lib.php @@ -63,8 +63,6 @@ else $genbarcode_loc = $conf->global->GENBARCODE_LOCATION; * @param string $encoding Encoding * @param integer $scale Scale * @param string $mode 'png' or 'jpg' ... - * - * * @return array $bars array('encoding': the encoding which has been used, 'bars': the bars, 'text': text-positioning info) */ function barcode_print($code, $encoding="ANY", $scale = 2 ,$mode = "png") @@ -116,8 +114,7 @@ function barcode_encode($code,$encoding) global $genbarcode_loc; if ( - ((preg_match("/^ean$/i", $encoding) - && ( strlen($code)==12 || strlen($code)==13))) + (preg_match("/^ean$/i", $encoding)) || (($encoding) && (preg_match("/^isbn$/i", $encoding)) && (( strlen($code)==9 || strlen($code)==10) || @@ -140,7 +137,7 @@ function barcode_encode($code,$encoding) } else { - print "barcode_encode needs an external programm for encodings other then EAN/ISBN
\n"; + print "barcode_encode needs an external programm for encodings other then EAN/ISBN (code=".$code.", encoding=".$encoding.")
\n"; print "