dolibarr  7.0.0-beta
Public Member Functions | List of all members
mod_codeclient_monkey Class Reference

Classe permettant la gestion monkey des codes tiers. More...

+ Inheritance diagram for mod_codeclient_monkey:
+ Collaboration diagram for mod_codeclient_monkey:

Public Member Functions

 __construct ()
 Constructor.
 
 info ($langs)
 Return description of module. More...
 
 getExample ($langs, $objsoc=0, $type=-1)
 Return an example of result returned by getNextValue. More...
 
 getNextValue ($objsoc=0, $type=-1)
 Return next value. More...
 
 verif ($db, &$code, $soc, $type)
 Check validity of code according to its rules. More...
 
 verif_dispo ($db, $code, $soc, $type=0)
 Renvoi si un code est pris ou non (par autre tiers) More...
 
 verif_syntax ($code)
 Renvoi si un code respecte la syntaxe. More...
 
- Public Member Functions inherited from ModeleThirdPartyCode
 info ($langs)
 Renvoi la description par defaut du modele de numerotation. More...
 
 getNom ($langs)
 Renvoi nom module. More...
 
 getExample ($langs)
 Renvoi un exemple de numerotation. More...
 
 canBeActivated ()
 Test si les numeros deja en vigueur dans la base ne provoquent pas de de conflits qui empechera cette numerotation de fonctionner. More...
 
 getNextValue ($objsoc=0, $type=-1)
 Return next value available. More...
 
 getVersion ()
 Return version of module. More...
 
 getToolTip ($langs, $soc, $type)
 Return description of module parameters. More...
 
 verif_prefixIsUsed ()
 Check if mask/numbering use prefix. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ModeleThirdPartyCode
static liste_modeles ($db, $maxfilenamelength=0)
 Renvoi la liste des modeles de numéroation. More...
 

Detailed Description

Classe permettant la gestion monkey des codes tiers.

Definition at line 33 of file mod_codeclient_monkey.php.

Member Function Documentation

mod_codeclient_monkey::getExample (   $langs,
  $objsoc = 0,
  $type = -1 
)

Return an example of result returned by getNextValue.

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

Definition at line 85 of file mod_codeclient_monkey.php.

mod_codeclient_monkey::getNextValue (   $objsoc = 0,
  $type = -1 
)

Return next value.

Parameters
Societe$objsocObject third party
int$typeClient ou fournisseur (1:client, 2:fournisseur)
Returns
string Value if OK, '' if module not configured, <0 if KO

Definition at line 98 of file mod_codeclient_monkey.php.

References $resql, dol_now(), and dol_syslog().

mod_codeclient_monkey::info (   $langs)

Return description of module.

Parameters
Translate$langsObject langs
Returns
string Description of module

Definition at line 71 of file mod_codeclient_monkey.php.

mod_codeclient_monkey::verif (   $db,
$code,
  $soc,
  $type 
)

Check validity of code according to its rules.

Parameters
DoliDB$dbDatabase handler
string$codeCode to check/correct
Societe$socObject third party
int$type0 = customer/prospect , 1 = supplier
Returns
int 0 if OK -1 ErrorBadCustomerCodeSyntax -2 ErrorCustomerCodeRequired -3 ErrorCustomerCodeAlreadyUsed -4 ErrorPrefixRequired

Definition at line 166 of file mod_codeclient_monkey.php.

References dol_strlen(), dol_syslog(), verif_dispo(), and verif_syntax().

mod_codeclient_monkey::verif_dispo (   $db,
  $code,
  $soc,
  $type = 0 
)

Renvoi si un code est pris ou non (par autre tiers)

Parameters
DoliDB$dbHandler acces base
string$codeCode a verifier
Societe$socObjet societe
int$type0 = customer/prospect , 1 = supplier
Returns
int 0 if available, <0 if KO

Definition at line 222 of file mod_codeclient_monkey.php.

References $resql, and dol_syslog().

Referenced by verif().

mod_codeclient_monkey::verif_syntax (   $code)

Renvoi si un code respecte la syntaxe.

Parameters
string$codeCode a verifier
Returns
int 0 si OK, <0 si KO

Definition at line 258 of file mod_codeclient_monkey.php.

References dol_strlen().

Referenced by verif().


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