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

Class to manage accountancy code of thirdparties with Aquarium rules. More...

+ Inheritance diagram for mod_codecompta_aquarium:
+ Collaboration diagram for mod_codecompta_aquarium:

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...
 
 get_code ($db, $societe, $type='')
 Set accountancy account code for a third party into this->code. More...
 
 verif ($db, $code, $societe, $type)
 Return if a code is available. More...
 
- Public Member Functions inherited from ModeleAccountancyCode
 info ($langs)
 Return description of module. More...
 
 getExample ($langs, $objsoc=0, $type=-1)
 Return an example of result returned by getNextValue. 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...
 
 getVersion ()
 Return version of module. More...
 
 getToolTip ($langs, $soc, $type)
 Return description of module parameters. More...
 
 get_code ($db, $societe, $type='')
 Set accountancy account code for a third party into this->code. More...
 

Detailed Description

Class to manage accountancy code of thirdparties with Aquarium rules.

Definition at line 32 of file mod_codecompta_aquarium.php.

Member Function Documentation

mod_codecompta_aquarium::get_code (   $db,
  $societe,
  $type = '' 
)

Set accountancy account code for a third party into this->code.

Parameters
DoliDB$dbDatabase handler
Societe$societeThird party object
string$type'customer' or 'supplier'
Returns
int >=0 if OK, <0 if KO

Definition at line 108 of file mod_codecompta_aquarium.php.

References dol_syslog(), and verif().

mod_codecompta_aquarium::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 94 of file mod_codecompta_aquarium.php.

mod_codecompta_aquarium::info (   $langs)

Return description of module.

Parameters
Translate$langsObject langs
Returns
string Description of module

Definition at line 61 of file mod_codecompta_aquarium.php.

References $form, and name.

mod_codecompta_aquarium::verif (   $db,
  $code,
  $societe,
  $type 
)

Return if a code is available.

Parameters
DoliDB$dbDatabase handler
string$codeCode of third party
Societe$societeObject third party
string$type'supplier' or 'customer'
Returns
int 0 if OK but not available, >0 if OK and available, <0 if KO

Definition at line 153 of file mod_codecompta_aquarium.php.

References $resql, and dol_syslog().

Referenced by get_code().


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