dolibarr  9.0.0
Public Member Functions | Public Attributes | List of all members
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

 info ()
 Return description of module. More...
 
 getNextValue ($objsoc, $contract)
 Return an example of result returned by getNextValue. More...
 
 verif ($db, &$code, $product, $type)
 Check validity of code according to its rules. More...
 
- Public Member Functions inherited from ModelNumRefContracts
 isEnabled ()
 Return if a module can be used or not. More...
 
 info ()
 Return default description of numbering model. More...
 
 getExample ()
 Return numbering example. More...
 
 canBeActivated ()
 Test if existing numbers make problems with numbering. More...
 
 getNextValue ($objsoc, $contract)
 Return next value. More...
 
 getVersion ()
 Return numbering version module. More...
 

Public Attributes

 $version = 'dolibarr'
 Dolibarr version of the loaded document string.
 

Detailed Description

Class to manage contract numbering rules Olive.

Definition at line 33 of file mod_contract_olive.php.

Member Function Documentation

◆ 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 ( )

Return description of module.

Returns
string Description of module

Definition at line 69 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 104 of file mod_contract_olive.php.


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