dolibarr 21.0.0-alpha
|
Class to manage product code with elephant rule. More...
Public Member Functions | |
__construct () | |
Constructor. | |
info ($langs) | |
Return description of module. | |
getExample ($langs=null, $objproduct='', $type=-1) | |
Return an example of result returned by getNextValue. | |
getNextValue ($objproduct=null, $type=-1) | |
Return next value. | |
verif_prefixIsUsed () | |
Check if mask/numbering use prefix. | |
verif ($db, &$code, $product, $type) | |
Check validity of code according to its rules. | |
verif_dispo ($db, $code, $product) | |
Indicate if the code is available or not (by another third party) | |
Public Member Functions inherited from ModeleProductCode | |
getToolTip ($langs, $product, $type) | |
Return description of module parameters. | |
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. | |
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. | |
Additional Inherited Members | |
Static Public Member Functions inherited from ModeleProductCode | |
static | liste_modeles ($dbs, $maxfilenamelength=0) |
Renvoi la liste des modeles de numérotation. | |
Class to manage product code with elephant rule.
Definition at line 36 of file mod_codeproduct_elephant.php.
mod_codeproduct_elephant::getExample | ( | $langs = null, | |
$objproduct = '', | |||
$type = -1 ) |
Return an example of result returned by getNextValue.
?Translate | $langs | Object langs |
Product | string | $objproduct | Object product |
int<-1,2> | $type Type of third party (1:customer, 2:supplier, -1:autodetect) |
Reimplemented from ModeleProductCode.
Definition at line 127 of file mod_codeproduct_elephant.php.
References getNextValue().
mod_codeproduct_elephant::getNextValue | ( | $objproduct = null, | |
$type = -1 ) |
Return next value.
Product | $objproduct | Object product |
int | $type | Produit ou service (0:product, 1:service) |
Reimplemented from ModeleProductCode.
Definition at line 172 of file mod_codeproduct_elephant.php.
References dol_now(), dol_string_unaccent(), get_next_value(), and getDolGlobalString().
Referenced by getExample().
mod_codeproduct_elephant::info | ( | $langs | ) |
Return description of module.
Translate | $langs | Object langs |
Reimplemented from CommonNumRefGenerator.
Definition at line 75 of file mod_codeproduct_elephant.php.
References getDolGlobalString().
mod_codeproduct_elephant::verif | ( | $db, | |
& | $code, | ||
$product, | |||
$type ) |
Check validity of code according to its rules.
DoliDB | $db | Database handler |
string | $code | Code to check/correct |
Product | $product | Object product |
int | $type | 0 = product , 1 = service |
Definition at line 254 of file mod_codeproduct_elephant.php.
References check_value(), dol_syslog(), and getDolGlobalString().
mod_codeproduct_elephant::verif_dispo | ( | $db, | |
$code, | |||
$product ) |
Indicate if the code is available or not (by another third party)
Definition at line 302 of file mod_codeproduct_elephant.php.
mod_codeproduct_elephant::verif_prefixIsUsed | ( | ) |
Check if mask/numbering use prefix.
Reimplemented from ModeleProductCode.
Definition at line 221 of file mod_codeproduct_elephant.php.
References getDolGlobalString().