dolibarr  19.0.0-dev
Public Member Functions | Static Public Member Functions | List of all members
ModeleProductCode Class Reference

Class template for classes of numbering product. More...

Inheritance diagram for ModeleProductCode:
Inheritance graph
[legend]

Public Member Functions

 info ($langs)
 Returns the default description of the numbering pattern. More...
 
 getNom ($langs)
 Renvoi nom module. More...
 
 getExample ($langs)
 Return an example of numbering. More...
 
 canBeActivated ()
 Checks if the numbers already in the database do not cause conflicts that would prevent this numbering working. More...
 
 getNextValue ($objproduct=0, $type=-1)
 Return next value available. More...
 
 getVersion ()
 Return version of module. More...
 
 getToolTip ($langs, $product, $type)
 Return description of module parameters. More...
 
 verif_prefixIsUsed ()
 Check if mask/numbering use prefix. More...
 

Static Public Member Functions

static liste_modeles ($dbs, $maxfilenamelength=0)
 Renvoi la liste des modeles de num√©rotation. More...
 

Detailed Description

Class template for classes of numbering product.

Parent class for product code generators.

Definition at line 100 of file modules_product.class.php.

Member Function Documentation

◆ canBeActivated()

ModeleProductCode::canBeActivated ( )

Checks if the numbers already in the database do not cause conflicts that would prevent this numbering working.

@return     boolean     false if conflict, true if ok

Definition at line 145 of file modules_product.class.php.

◆ getExample()

ModeleProductCode::getExample (   $langs)

Return an example of numbering.

Parameters
Translate$langsObject langs
Returns
string Example

Definition at line 134 of file modules_product.class.php.

◆ getNextValue()

ModeleProductCode::getNextValue (   $objproduct = 0,
  $type = -1 
)

Return next value available.

Parameters
Product$objproductObject product
int$typeType
Returns
string Value

Reimplemented in mod_codeproduct_elephant, and mod_codeproduct_leopard.

Definition at line 157 of file modules_product.class.php.

◆ getNom()

ModeleProductCode::getNom (   $langs)

Renvoi nom module.

Parameters
Translate$langsObject langs
Returns
string Nom du module

Definition at line 123 of file modules_product.class.php.

◆ getToolTip()

ModeleProductCode::getToolTip (   $langs,
  $product,
  $type 
)

Return description of module parameters.

Parameters
Translate$langsOutput language
Product$productProduct object
int$type-1=Nothing, 0=Customer, 1=Supplier
Returns
string HTML translated description

Definition at line 225 of file modules_product.class.php.

◆ getVersion()

ModeleProductCode::getVersion ( )

Return version of module.

Returns
string Version

Definition at line 168 of file modules_product.class.php.

◆ info()

ModeleProductCode::info (   $langs)

Returns the default description of the numbering pattern.

Parameters
Translate$langsObject langs
Returns
string Descriptive text

Reimplemented in mod_codeproduct_elephant, and mod_codeproduct_leopard.

Definition at line 112 of file modules_product.class.php.

◆ liste_modeles()

static ModeleProductCode::liste_modeles (   $dbs,
  $maxfilenamelength = 0 
)
static

Renvoi la liste des modeles de numérotation.

Parameters
DoliDB$dbsDatabase handler
integer$maxfilenamelengthMax length of value to show
Returns
array|int List of numbers

Definition at line 196 of file modules_product.class.php.

◆ verif_prefixIsUsed()

ModeleProductCode::verif_prefixIsUsed ( )

Check if mask/numbering use prefix.

Returns
int 0=no, 1=yes

Reimplemented in mod_codeproduct_elephant.

Definition at line 293 of file modules_product.class.php.


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