2
0
forked from Wavyzz/dolibarr
This commit is contained in:
Frédéric FRANCE
2019-02-25 22:27:04 +01:00
parent 1c07006015
commit c89e4d79b8
19 changed files with 376 additions and 373 deletions

View File

@@ -49,7 +49,7 @@ class modPhpbarcode extends ModeleBarCode
*
* @return boolean true if module can be used
*/
function isEnabled()
public function isEnabled()
{
return true;
}
@@ -60,7 +60,7 @@ class modPhpbarcode extends ModeleBarCode
*
* @return string Texte descripif
*/
function info()
public function info()
{
global $langs;
@@ -76,7 +76,7 @@ class modPhpbarcode extends ModeleBarCode
*
* @return boolean false si conflit, true si ok
*/
function canBeActivated()
public function canBeActivated()
{
global $langs;
@@ -90,7 +90,7 @@ class modPhpbarcode extends ModeleBarCode
* @param string $encoding Encoding norm
* @return int >0 if supported, 0 if not
*/
function encodingIsSupported($encoding)
public function encodingIsSupported($encoding)
{
global $genbarcode_loc;
//print 'genbarcode_loc='.$genbarcode_loc.' encoding='.$encoding;exit;
@@ -100,8 +100,7 @@ class modPhpbarcode extends ModeleBarCode
if ($encoding == 'ISBN') $supported=1;
// Formats that hangs on Windows (when genbarcode.exe for Windows is called, so they are not
// activated on Windows)
if (file_exists($genbarcode_loc) && empty($_SERVER["WINDIR"]))
{
if (file_exists($genbarcode_loc) && empty($_SERVER["WINDIR"])) {
if ($encoding == 'EAN8') $supported=1;
if ($encoding == 'UPC') $supported=1;
if ($encoding == 'C39') $supported=1;
@@ -120,7 +119,7 @@ class modPhpbarcode extends ModeleBarCode
* @param integer $nooutputiferror No output if error
* @return int <0 if KO, >0 if OK
*/
function buildBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0)
public function buildBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0)
{
global $_GET,$_SERVER;
global $conf;
@@ -161,7 +160,7 @@ class modPhpbarcode extends ModeleBarCode
* @param integer $nooutputiferror No output if error
* @return int <0 if KO, >0 if OK
*/
function writeBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0)
public function writeBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0)
{
global $conf,$filebarcode;

View File

@@ -49,7 +49,7 @@ class modTcpdfbarcode extends ModeleBarCode
*
* @return string Text with description
*/
function info()
public function info()
{
global $langs;
@@ -61,7 +61,7 @@ class modTcpdfbarcode extends ModeleBarCode
*
* @return boolean true if module can be used
*/
function isEnabled()
public function isEnabled()
{
return true;
}
@@ -72,7 +72,7 @@ class modTcpdfbarcode extends ModeleBarCode
*
* @return boolean false si conflit, true si ok
*/
function canBeActivated()
public function canBeActivated()
{
global $langs;
@@ -85,7 +85,7 @@ class modTcpdfbarcode extends ModeleBarCode
* @param string $encoding Encoding norm
* @return int >0 if supported, 0 if not
*/
function encodingIsSupported($encoding)
public function encodingIsSupported($encoding)
{
$tcpdfEncoding = $this->getTcpdfEncodingType($encoding);
if (empty($tcpdfEncoding)) {
@@ -105,7 +105,7 @@ class modTcpdfbarcode extends ModeleBarCode
* @param integer $nooutputiferror No output if error (not used with this engine)
* @return int <0 if KO, >0 if OK
*/
function buildBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0)
public function buildBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0)
{
global $_GET;
@@ -152,7 +152,7 @@ class modTcpdfbarcode extends ModeleBarCode
* @param integer $nooutputiferror No output if error (not used with this engine)
* @return int <0 if KO, >0 if OK
*/
function writeBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0)
public function writeBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0)
{
global $conf,$_GET;

View File

@@ -29,21 +29,21 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
*/
abstract class ModeleBarCode
{
/**
* @var string Error code (or message)
*/
public $error='';
/**
* @var string Error code (or message)
*/
public $error='';
/**
* Return if a model can be used or not
*
* @return boolean true if model can be used
*/
function isEnabled()
{
return true;
}
/**
* Return if a model can be used or not
*
* @return boolean true if model can be used
*/
public function isEnabled()
{
return true;
}
}
@@ -52,17 +52,17 @@ abstract class ModeleBarCode
*/
abstract class ModeleNumRefBarCode
{
/**
* @var string Error code (or message)
*/
public $error='';
/**
* @var string Error code (or message)
*/
public $error='';
/** Return default description of numbering model
*
* @param Translate $langs Object langs
* @return string Descriptive text
*/
function info($langs)
public function info($langs)
{
$langs->load("bills");
return $langs->trans("NoDescription");
@@ -73,7 +73,7 @@ abstract class ModeleNumRefBarCode
* @param Translate $langs Object langs
* @return string Model name
*/
function getNom($langs)
public function getNom($langs)
{
return empty($this->name)?$this->nom:$this->name;
}
@@ -83,7 +83,7 @@ abstract class ModeleNumRefBarCode
* @param Translate $langs Object langs
* @return string Example
*/
function getExample($langs)
public function getExample($langs)
{
$langs->load("bills");
return $langs->trans("NoExample");
@@ -96,17 +96,17 @@ abstract class ModeleNumRefBarCode
* @param string $type Type of barcode (EAN, ISBN, ...)
* @return string Value
*/
function getNextValue($objproduct, $type = '')
public function getNextValue($objproduct, $type = '')
{
global $langs;
return $langs->trans("Function_getNextValue_InModuleNotWorking");
}
/** Return version of module
/** Return version of module
*
* @return string Version
*/
function getVersion()
public function getVersion()
{
global $langs;
$langs->load("admin");
@@ -126,7 +126,7 @@ abstract class ModeleNumRefBarCode
* @param int $type -1=Nothing, 0=Product, 1=Service
* @return string HTML translated description
*/
function getToolTip($langs, $soc, $type)
public function getToolTip($langs, $soc, $type)
{
global $conf;