Configuration module barcode plus claire
This commit is contained in:
parent
3f523c61c8
commit
b3bbd6a267
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@cap-networks.com>
|
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@cap-networks.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -72,8 +72,8 @@ print '<table class="noborder" width="100%">';
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Name").'</td>';
|
print '<td>'.$langs->trans("Name").'</td>';
|
||||||
print '<td>'.$langs->trans("Description").'</td>';
|
print '<td>'.$langs->trans("Description").'</td>';
|
||||||
print '<td width="200">'.$langs->trans("Example").'</td>';
|
print '<td width="200" align="center">'.$langs->trans("Example").'</td>';
|
||||||
print '<td align="center" width="60">'.$langs->trans("Default").'</td>';
|
print '<td align="center" width="60">'.$langs->trans("CodeBarGenerator").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$sql = "SELECT rowid, code, libelle, coder, example";
|
$sql = "SELECT rowid, code, libelle, coder, example";
|
||||||
@ -99,7 +99,19 @@ if ($resql)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Affiche exemple
|
// Affiche exemple
|
||||||
print '<td align="center"><img src="'.dol_genbarcode($obj->example,$obj->code,$obj->coder).'"></td>';
|
print '<td align="center">';
|
||||||
|
if ($obj->coder)
|
||||||
|
{
|
||||||
|
$url=dol_genbarcode($obj->example,$obj->code,$obj->coder);
|
||||||
|
//print "x".$url."z";
|
||||||
|
if ($url) print '<img src="'.dol_genbarcode($obj->example,$obj->code,$obj->coder).'">';
|
||||||
|
else print $langs->trans("FormatNotSupportedByGenerator");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $langs->trans("ChooseABarCode");
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print $html->setBarcodeEncoder($obj->coder,$obj->rowid,'form'.$i);
|
print $html->setBarcodeEncoder($obj->coder,$obj->rowid,'form'.$i);
|
||||||
|
|||||||
@ -3567,11 +3567,16 @@ function viewExcelFileContent($file_to_include='',$max_rows=0,$max_cols=0)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Générateur de codes barres
|
\brief Générateur de codes barres
|
||||||
\param
|
\param $code Valeur numérique à coder
|
||||||
|
\param $encoding Mode de codage
|
||||||
|
\param $generator Generateur utilsé (1=php-barcode, 1=pi_barcode)
|
||||||
|
\param $readable Code lisible
|
||||||
\return url
|
\return url
|
||||||
*/
|
*/
|
||||||
function dol_genbarcode($code,$encoding,$generator=1,$readable='Y')
|
function dol_genbarcode($code,$encoding,$generator=1,$readable='Y')
|
||||||
{
|
{
|
||||||
|
$url='';
|
||||||
|
|
||||||
if ($encoding == 'EAN8' || $encoding == 'EAN13') $encoding = 'EAN';
|
if ($encoding == 'EAN8' || $encoding == 'EAN13') $encoding = 'EAN';
|
||||||
|
|
||||||
if ($generator == 1)
|
if ($generator == 1)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user