From d0e26f650c1816cd2c9dd8a2a1dc181d44ff4e09 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 12 Aug 2011 06:55:47 +0000 Subject: [PATCH] task #10500: Option to choose if professionnal id are unique. --- htdocs/societe/class/societe.class.php | 4 ++-- htdocs/societe/soc.php | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 696ba4e921b..b297065a3ac 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -26,7 +26,7 @@ * \file htdocs/societe/class/societe.class.php * \ingroup societe * \brief File for third party class - * \version $Id: societe.class.php,v 1.97 2011/08/11 16:53:43 simnandez Exp $ + * \version $Id: societe.class.php,v 1.98 2011/08/12 06:55:55 simnandez Exp $ */ require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"); @@ -2039,7 +2039,7 @@ class Societe extends CommonObject * Verifie la validite d'un identifiant professionnel en fonction du pays de la societe (siren, siret, ...) * @param idprof 1,2,3,4 (Exemple: 1=siren,2=siret,3=naf,4=rcs/rm) * @param soc Objet societe - * @return int <=0 if KO, >0 if OK, -10=idprofx already exist into database + * @return int <=0 if KO, >0 if OK * TODO not in business class */ function id_prof_check($idprof,$soc) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 567c079d66f..98db837350a 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -25,7 +25,7 @@ * \file htdocs/societe/soc.php * \ingroup societe * \brief Third party card page - * \version $Id: soc.php,v 1.133 2011/08/11 16:53:43 simnandez Exp $ + * \version $Id: soc.php,v 1.134 2011/08/12 06:55:47 simnandez Exp $ */ require("../main.inc.php"); @@ -230,9 +230,6 @@ if (empty($reshook)) $error++; $errors[] = $langs->trans("ErrorSupplierModuleNotEnabled"); $action = ($action=='add'?'create':'edit'); } - - if($action == 'add') $mode=0; - else $mode=1; for ($i = 1; $i < 3; $i++) { @@ -1975,5 +1972,5 @@ else $db->close(); -llxFooter('$Date: 2011/08/11 16:53:43 $ - $Revision: 1.133 $'); +llxFooter('$Date: 2011/08/12 06:55:47 $ - $Revision: 1.134 $'); ?> \ No newline at end of file