dolibarr  20.0.0-alpha
Public Member Functions | List of all members
mod_codeproduct_leopard Class Reference

Class permettant la gestion leopard des codes produits. More...

Inheritance diagram for mod_codeproduct_leopard:
Inheritance graph
[legend]
Collaboration diagram for mod_codeproduct_leopard:
Collaboration graph
[legend]

Public Member Functions

 __construct ()
 Constructor.
 
 info ($langs)
 Return description of module. More...
 
 getExample ($langs, $objproduct=null, $type=-1)
 Return an example of result returned by getNextValue. More...
 
 getNextValue ($objproduct='', $type=-1)
 Return an example of result returned by getNextValue. More...
 
 verif ($db, &$code, $product, $type)
 Check validity of code according to its rules. More...
 
- Public Member Functions inherited from ModeleProductCode
 getToolTip ($langs, $product, $type)
 Return description of module parameters. More...
 
 verif_prefixIsUsed ()
 Check if mask/numbering use prefix. More...
 
- Public Member Functions inherited from CommonNumRefGenerator
 getNom ($langs)
 Return model name. More...
 
 getName ($langs)
 Return model name. More...
 
 isEnabled ()
 Return if a module can be used or not. More...
 
 canBeActivated ($object)
 Checks if the numbers already in the database do not cause conflicts that would prevent this numbering working. More...
 
 getVersion ()
 Returns version of numbering module. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ModeleProductCode
static liste_modeles ($dbs, $maxfilenamelength=0)
 Renvoi la liste des modeles de num√©rotation. More...
 

Detailed Description

Class permettant la gestion leopard des codes produits.

Definition at line 35 of file mod_codeproduct_leopard.php.

Member Function Documentation

◆ getExample()

mod_codeproduct_leopard::getExample (   $langs,
  $objproduct = null,
  $type = -1 
)

Return an example of result returned by getNextValue.

Parameters
Translate$langsObject langs
Product$objproductObject product
int$typeType of third party (1:customer, 2:supplier, -1:autodetect)
Returns
string Return string example

Definition at line 80 of file mod_codeproduct_leopard.php.

◆ getNextValue()

mod_codeproduct_leopard::getNextValue (   $objproduct = '',
  $type = -1 
)

Return an example of result returned by getNextValue.

Parameters
Product | string$objproductObject product
int$typeType of third party (1:customer, 2:supplier, -1:autodetect)
Returns
string Return next value

Reimplemented from ModeleProductCode.

Definition at line 92 of file mod_codeproduct_leopard.php.

◆ info()

mod_codeproduct_leopard::info (   $langs)

Return description of module.

Parameters
Translate$langsObject langs
Returns
string Description of module

Reimplemented from CommonNumRefGenerator.

Definition at line 66 of file mod_codeproduct_leopard.php.

◆ verif()

mod_codeproduct_leopard::verif (   $db,
$code,
  $product,
  $type 
)

Check validity of code according to its rules.

Parameters
DoliDB$dbDatabase handler
string$codeCode to check/correct
Product$productObject product
int$type0 = product , 1 = service
Returns
int 0 if OK -1 ErrorBadProductCodeSyntax -2 ErrorProductCodeRequired -3 ErrorProductCodeAlreadyUsed -4 ErrorPrefixRequired

Definition at line 111 of file mod_codeproduct_leopard.php.


The documentation for this class was generated from the following file: