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,9 +72,9 @@ abstract class ActionsCardCommon
/**
* Get object from id or ref and save it into this->object
*
* @param int Object id
* @param ref Object ref
* @return object Object loaded
* @param int $id Object id
* @param ref $ref Object ref
* @return object Object loaded
*/
protected function getObject($id,$ref='')
{

View File

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

View File

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

View File

@ -605,15 +605,15 @@ class Societe extends CommonObject
/**
* Load a third party from database into memory
*
* @param rowid Id of third party to load
* @param 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 ref_int Internal reference of third party
* @param 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 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)
* @return int >0 if OK, <0 if KO or if two records found for same ref or idprof.
* @param int $rowid Id of third party to load
* @param string $ref Reference of third party, name (Warning, this can return several records)
* @param string $ref_ext External reference of third party (Warning, this information is a free field not provided by Dolibarr)
* @param string $ref_int Internal reference of third party
* @param string $idprof1 Prof id 1 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 string $idprof3 Prof id 3 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.
*/
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
*
* @return void
*/
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."'";
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
* \param nom nom de la societe
* \param taille taille du prefix a retourner
* \param mot l'indice du mot a utiliser
* Genere le prefix de la societe
*
* @param nom nom de la societe
* @param taille taille du prefix a retourner
* @param mot l'indice du mot a utiliser
*/
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))
{
$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');
}
}