This commit is contained in:
Laurent Destailleur 2012-01-22 21:36:07 +01:00
parent bacf2003f1
commit 5d5af4cd78
5 changed files with 46 additions and 34 deletions

View File

@ -72,8 +72,8 @@ abstract class ActionsCardCommon
/** /**
* Get object from id or ref and save it into this->object * Get object from id or ref and save it into this->object
* *
* @param int Object id * @param int $id Object id
* @param ref Object ref * @param ref $ref Object ref
* @return object Object loaded * @return object Object loaded
*/ */
protected function getObject($id,$ref='') protected function getObject($id,$ref='')

View File

@ -75,6 +75,7 @@ class ActionsCardIndividual extends ActionsCardCommon
/** /**
* Execute actions * Execute actions
* *
* @param string &$action Action
* @param int $id Id of object (may be empty for creation) * @param int $id Id of object (may be empty for creation)
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */

View File

@ -48,21 +48,20 @@ class Address
/** /**
* Constructeur de la classe * Constructor
* *
* @param DoliDB $db handler acces base de donnees * @param DoliDB $db Database handler
*/ */
function Address($db) function Address($db)
{ {
$this->db = $db; $this->db = $db;
return 1;
} }
/** /**
* Create address into database * Create address into database
* *
* @param socid Company socid * @param int $socid Company socid
* @param user Object user making creation * @param User $user Object user making creation
* @return int 0 if OK, < 0 if KO * @return int 0 if OK, < 0 if KO
*/ */
function create($socid, $user='') function create($socid, $user='')
@ -152,10 +151,10 @@ class Address
/** /**
* Mise a jour des parametres de l'adresse * Mise a jour des parametres de l'adresse
* *
* @param id id address * @param int $id id address
* @param socid id third party * @param int $socid id third party
* @param user Utilisateur qui demande la mise a jour * @param User $user Utilisateur qui demande la mise a jour
* @return int <0 si ko, >=0 si ok * @return int <0 if KO, >=0 if OK
*/ */
function update($id, $socid, $user='') function update($id, $socid, $user='')
{ {
@ -415,8 +414,9 @@ class Address
/** /**
* Suppression d'une adresse * Suppression d'une adresse
* *
* @param id id de la societe a supprimer * @param int $id id de la societe a supprimer
* @param socid id third party * @param int $socid id third party
* @return void
*/ */
function delete($id,$socid) function delete($id,$socid)
{ {
@ -438,7 +438,8 @@ class Address
/** /**
* Charge les informations d'ordre info dans l'objet societe * Charge les informations d'ordre info dans l'objet societe
* *
* @param id id de la societe a charger * @param int $id id de la societe a charger
* @return void
*/ */
function info($id) function info($id)
{ {
@ -506,8 +507,15 @@ class AddressLine
var $fax; var $fax;
var $note; var $note;
function AddressLine()
/**
* Constructor
*
* @param DoliDB $db Database handler
*/
function AddressLine($db)
{ {
$this->db = $db;
} }
} }
?> ?>

View File

@ -605,14 +605,14 @@ class Societe extends CommonObject
/** /**
* Load a third party from database into memory * Load a third party from database into memory
* *
* @param rowid Id of third party to load * @param int $rowid Id of third party to load
* @param ref Reference of third party, name (Warning, this can return several records) * @param string $ref Reference of third party, name (Warning, this can return several records)
* @param ref_ext External reference of third party (Warning, this information is a free field not provided by Dolibarr) * @param string $ref_ext External reference of third party (Warning, this information is a free field not provided by Dolibarr)
* @param ref_int Internal reference of third party * @param string $ref_int Internal reference of third party
* @param idprof1 Prof id 1 of third party (Warning, this can return several records) * @param string $idprof1 Prof id 1 of third party (Warning, this can return several records)
* @param idprof2 Prof id 2 of third party (Warning, this can return several records) * @param string $idprof2 Prof id 2 of third party (Warning, this can return several records)
* @param idprof3 Prof id 3 of third party (Warning, this can return several records) * @param string $idprof3 Prof id 3 of third party (Warning, this can return several records)
* @param idprof4 Prof id 4 of third party (Warning, this can return several records) * @param string $idprof4 Prof id 4 of third party (Warning, this can return several records)
* @return int >0 if OK, <0 if KO or if two records found for same ref or idprof. * @return int >0 if OK, <0 if KO or if two records found for same ref or idprof.
*/ */
function fetch($rowid, $ref='', $ref_ext='', $ref_int='', $idprof1='',$idprof2='',$idprof3='',$idprof4='') function fetch($rowid, $ref='', $ref_ext='', $ref_int='', $idprof1='',$idprof2='',$idprof3='',$idprof4='')
@ -950,6 +950,8 @@ class Societe extends CommonObject
/** /**
* Update record to set prefix * Update record to set prefix
*
* @return void
*/ */
function attribute_prefix() function attribute_prefix()
{ {
@ -980,7 +982,7 @@ class Societe extends CommonObject
{ {
$sql = "UPDATE ".MAIN_DB_PREFIX."societe set prefix_comm='".$prefix."' WHERE rowid='".$this->id."'"; $sql = "UPDATE ".MAIN_DB_PREFIX."societe set prefix_comm='".$prefix."' WHERE rowid='".$this->id."'";
if ( $this->db->query( $sql) ) if ( $this->db->query($sql) )
{ {
} }
@ -1004,10 +1006,11 @@ class Societe extends CommonObject
} }
/** /**
* \brief Genere le prefix de la societe * Genere le prefix de la societe
* \param nom nom de la societe *
* \param taille taille du prefix a retourner * @param nom nom de la societe
* \param mot l'indice du mot a utiliser * @param taille taille du prefix a retourner
* @param mot l'indice du mot a utiliser
*/ */
function genprefix($nom, $taille=4, $mot=0) function genprefix($nom, $taille=4, $mot=0)
{ {

View File

@ -206,7 +206,7 @@ if (empty($reshook))
if($object->id_prof_exists($i,$_POST["$slabel"],$object->id)) if($object->id_prof_exists($i,$_POST["$slabel"],$object->id))
{ {
$langs->load("errors"); $langs->load("errors");
$error++; $errors[] = $langs->transcountry('ProfId'.$i ,$object->country_code)." ".$langs->trans("ErrorProdIdAlreadyExist",$_POST["$slabel"]); $error++; $errors[] = $langs->transcountry('ProfId'.$i, $object->country_code)." ".$langs->trans("ErrorProdIdAlreadyExist", $_POST[$slabel]);
$action = ($action=='add'?'create':'edit'); $action = ($action=='add'?'create':'edit');
} }
} }