mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 23:52:24 +01:00
Qual: Uniformize code, Declare parent class as abstract, Doxygen
This commit is contained in:
@@ -21,30 +21,31 @@
|
||||
* \file htdocs/includes/modules/societe/mod_codeclient_monkey.php
|
||||
* \ingroup societe
|
||||
* \brief Fichier de la classe des gestion lion des codes clients
|
||||
* \version $Id: mod_codeclient_monkey.php,v 1.11 2011/07/31 23:28:14 eldy Exp $
|
||||
* \version $Id: mod_codeclient_monkey.php,v 1.12 2011/08/27 13:15:38 eldy Exp $
|
||||
*/
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/societe/modules_societe.class.php");
|
||||
|
||||
|
||||
/**
|
||||
\class mod_codeclient_monkey
|
||||
\brief Classe permettant la gestion monkey des codes tiers
|
||||
* \class mod_codeclient_monkey
|
||||
* \brief Classe permettant la gestion monkey des codes tiers
|
||||
*/
|
||||
class mod_codeclient_monkey extends ModeleThirdPartyCode
|
||||
{
|
||||
var $nom; // Nom du modele
|
||||
var $nom='Monkey'; // Nom du modele
|
||||
var $code_modifiable; // Code modifiable
|
||||
var $code_modifiable_invalide; // Code modifiable si il est invalide
|
||||
var $code_modifiable_null; // Code modifiables si il est null
|
||||
var $code_null; // Code facultatif
|
||||
var $version; // 'development', 'experimental', 'dolibarr'
|
||||
var $code_auto; // Numerotation automatique
|
||||
var $version='dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
var $code_auto; // Numerotation automatique
|
||||
|
||||
var $prefixcustomer='CU';
|
||||
var $prefixsupplier='SU';
|
||||
|
||||
/** \brief Constructeur classe
|
||||
|
||||
/** Constructor classe
|
||||
*/
|
||||
function mod_codeclient_monkey()
|
||||
{
|
||||
@@ -58,8 +59,10 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
|
||||
}
|
||||
|
||||
|
||||
/** \brief Renvoi la description du module
|
||||
* \return string Texte descripif
|
||||
/** Return description of module
|
||||
*
|
||||
* @param $langs Object langs
|
||||
* @return string Description of module
|
||||
*/
|
||||
function info($langs)
|
||||
{
|
||||
@@ -67,8 +70,11 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
|
||||
}
|
||||
|
||||
|
||||
/** \brief Renvoi la description du module
|
||||
* \return string Texte descripif
|
||||
/** Return an example of result returned by getNextValue
|
||||
*
|
||||
* @param $langs Object langs
|
||||
* @param $objsoc Object thirdparty
|
||||
* @param $type Type of third party (1:customer, 2:supplier, -1:autodetect)
|
||||
*/
|
||||
function getExample($langs,$objsoc=0,$type=-1)
|
||||
{
|
||||
@@ -76,10 +82,11 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
|
||||
}
|
||||
|
||||
|
||||
/** \brief Return next value
|
||||
* \param objsoc Object third party
|
||||
* \param $type Client ou fournisseur (1:client, 2:fournisseur)
|
||||
* \return string Value if OK, '' if module not configured, <0 if KO
|
||||
/** Return next value
|
||||
*
|
||||
* @param objsoc Object third party
|
||||
* @param type Client ou fournisseur (1:client, 2:fournisseur)
|
||||
* @return string Value if OK, '' if module not configured, <0 if KO
|
||||
*/
|
||||
function getNextValue($objsoc=0,$type=-1)
|
||||
{
|
||||
@@ -134,12 +141,13 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
|
||||
|
||||
|
||||
/**
|
||||
* \brief Check validity of code according to its rules
|
||||
* \param $db Database handler
|
||||
* \param $code Code to check/correct
|
||||
* \param $soc Object third party
|
||||
* \param $type 0 = customer/prospect , 1 = supplier
|
||||
* \return int 0 if OK
|
||||
* Check validity of code according to its rules
|
||||
*
|
||||
* @param $db Database handler
|
||||
* @param $code Code to check/correct
|
||||
* @param $soc Object third party
|
||||
* @param $type 0 = customer/prospect , 1 = supplier
|
||||
* @return int 0 if OK
|
||||
* -1 ErrorBadCustomerCodeSyntax
|
||||
* -2 ErrorCustomerCodeRequired
|
||||
* -3 ErrorCustomerCodeAlreadyUsed
|
||||
@@ -193,11 +201,12 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
|
||||
|
||||
|
||||
/**
|
||||
* \brief Renvoi si un code est pris ou non (par autre tiers)
|
||||
* \param $db Handler acces base
|
||||
* \param $code Code a verifier
|
||||
* \param $soc Objet societe
|
||||
* \return int 0 si dispo, <0 si erreur
|
||||
* Renvoi si un code est pris ou non (par autre tiers)
|
||||
*
|
||||
* @param $db Handler acces base
|
||||
* @param $code Code a verifier
|
||||
* @param $soc Objet societe
|
||||
* @return int 0 si dispo, <0 si erreur
|
||||
*/
|
||||
function verif_dispo($db, $code, $soc)
|
||||
{
|
||||
@@ -226,9 +235,10 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
|
||||
|
||||
|
||||
/**
|
||||
* \brief Renvoi si un code respecte la syntaxe
|
||||
* \param $code Code a verifier
|
||||
* \return int 0 si OK, <0 si KO
|
||||
* Renvoi si un code respecte la syntaxe
|
||||
*
|
||||
* @param $code Code a verifier
|
||||
* * @return int 0 si OK, <0 si KO
|
||||
*/
|
||||
function verif_syntax($code)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user