dolibarr 20.0.2
mod_contract_olive Class Reference

Class to manage contract numbering rules Olive. More...

Inheritance diagram for mod_contract_olive:
Collaboration diagram for mod_contract_olive:

Public Member Functions

 __construct ()
 Constructor.
 
 info ($langs)
 Return description of module.
 
 getExample ()
 Return numbering example.
 
 getNextValue ($objsoc, $contract)
 Return an example of result returned by getNextValue.
 
 verif ($db, &$code, $product, $type)
 Check validity of code according to its rules.
 
- 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.
 

Detailed Description

Class to manage contract numbering rules Olive.

Definition at line 35 of file mod_contract_olive.php.

Member Function Documentation

◆ getExample()

mod_contract_olive::getExample ( )

Return numbering example.

Returns
string Example

Definition at line 72 of file mod_contract_olive.php.

◆ getNextValue()

mod_contract_olive::getNextValue ( $objsoc,
$contract )

Return an example of result returned by getNextValue.

Parameters
Societe$objsocObject thirdparty
Contrat$contractObject contract
Returns
string Return next value

Definition at line 84 of file mod_contract_olive.php.

◆ info()

mod_contract_olive::info ( $langs)

Return description of module.

Parameters
Translate$langsLang object to use for output
Returns
string Descriptive text

Reimplemented from CommonNumRefGenerator.

Definition at line 59 of file mod_contract_olive.php.

◆ verif()

mod_contract_olive::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 103 of file mod_contract_olive.php.

References dol_syslog(), and getDolGlobalString().


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