dolibarr 20.0.0
ModeleProductCode Class Reference

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

Inheritance diagram for ModeleProductCode:
Collaboration diagram for ModeleProductCode:

Public Member Functions

 getNextValue ($objproduct='', $type=-1)
 Return next value available.
 
 getToolTip ($langs, $product, $type)
 Return description of module parameters.
 
 verif_prefixIsUsed ()
 Check if mask/numbering use prefix.
 
- Public Member Functions inherited from CommonNumRefGenerator
 getNom ($langs)
 Return model name.
 
 getName ($langs)
 Return model name.
 
 isEnabled ()
 Return if a module can be used or not.
 
 info ($langs)
 Returns the default description of the numbering template.
 
 canBeActivated ($object)
 Checks if the numbers already in the database do not cause conflicts that would prevent this numbering working.
 
 getVersion ()
 Returns version of numbering module.
 

Static Public Member Functions

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

Detailed Description

Class template for classes of numbering product.

Parent class for product code generators.

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

Member Function Documentation

◆ getNextValue()

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

Return next value available.

Parameters
Product | string$objproductObject product
int$typeType
Returns
string Value

Reimplemented in mod_codeproduct_elephant, and mod_codeproduct_leopard.

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

Referenced by getToolTip().

◆ 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 115 of file modules_product.class.php.

References getDolGlobalString(), CommonNumRefGenerator\getName(), getNextValue(), CommonNumRefGenerator\getVersion(), and yn().

◆ 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 86 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 183 of file modules_product.class.php.


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