Fix: Some fix for barcode generation
This commit is contained in:
parent
408ec1bc29
commit
daf19d0d07
@ -77,9 +77,9 @@ else if ($action == 'GENBARCODE_BARCODETYPE_THIRDPARTY')
|
|||||||
if($action && $action!='setcoder')
|
if($action && $action!='setcoder')
|
||||||
{
|
{
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -207,8 +207,7 @@ if ($resql)
|
|||||||
if ($module->encodingIsSupported($obj->encoding))
|
if ($module->encodingIsSupported($obj->encoding))
|
||||||
{
|
{
|
||||||
// Build barcode on disk (not used, this is done to make debug easier)
|
// Build barcode on disk (not used, this is done to make debug easier)
|
||||||
$result=$module->writeBarCode($obj->example,$obj->encoding,'Y');
|
$result=$module->writeBarCode($obj->example,$obj->encoding,'Y');
|
||||||
|
|
||||||
// Generate on the fly and output barcode with generator
|
// Generate on the fly and output barcode with generator
|
||||||
$url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($obj->coder).'&code='.urlencode($obj->example).'&encoding='.urlencode($obj->encoding);
|
$url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($obj->coder).'&code='.urlencode($obj->example).'&encoding='.urlencode($obj->encoding);
|
||||||
//print $url;
|
//print $url;
|
||||||
|
|||||||
@ -89,10 +89,11 @@ class modPhpbarcode extends ModeleBarCode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return an image file on the fly (no need to write on disk)
|
* Return an image file on the fly (no need to write on disk)
|
||||||
* \param $code Value to encode
|
*
|
||||||
* \param $encoding Mode of encoding
|
* @param string $code Value to encode
|
||||||
* \param $readable Code can be read
|
* @param string $encoding Mode of encoding
|
||||||
|
* @param string $readable Code can be read
|
||||||
*/
|
*/
|
||||||
function buildBarCode($code,$encoding,$readable='Y')
|
function buildBarCode($code,$encoding,$readable='Y')
|
||||||
{
|
{
|
||||||
@ -119,7 +120,7 @@ class modPhpbarcode extends ModeleBarCode
|
|||||||
if (! is_array($result))
|
if (! is_array($result))
|
||||||
{
|
{
|
||||||
$this->error=$result;
|
$this->error=$result;
|
||||||
print $this->error;exit;
|
print $this->error;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,10 +128,11 @@ class modPhpbarcode extends ModeleBarCode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Save an image file on disk (with no output)
|
* Save an image file on disk (with no output)
|
||||||
* \param $code Value to encode
|
*
|
||||||
* \param $encoding Mode of encoding
|
* @param string $code Value to encode
|
||||||
* \param $readable Code can be read
|
* @param string $encoding Mode of encoding
|
||||||
|
* @param string $readable Code can be read
|
||||||
*/
|
*/
|
||||||
function writeBarCode($code,$encoding,$readable='Y')
|
function writeBarCode($code,$encoding,$readable='Y')
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user