diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 51d21aff2bb..386c7866991 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -172,10 +172,10 @@ if ($socid > 0) if ($objsoc->client) { - print ''; + print ''; print $langs->trans('CustomerCode').''; print $objsoc->code_client; - if ($objsoc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode"); + if ($objsoc->check_codeclient() <> 0) print ' ('.$langs->trans("WrongCustomerCode").')'; print ''; } diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index 60d6a004223..3d52ade133b 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -127,7 +127,7 @@ if ($socid > 0) print ''; - print ''; + print ''; // Prefix print ''; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/includes/modules/societe/mod_codeclient_leopard.php b/htdocs/includes/modules/societe/mod_codeclient_leopard.php index ecf171238d2..b4b3dcbd269 100644 --- a/htdocs/includes/modules/societe/mod_codeclient_leopard.php +++ b/htdocs/includes/modules/societe/mod_codeclient_leopard.php @@ -18,7 +18,6 @@ * or see http://www.gnu.org/ * * $Id$ - * $Source$ */ /** diff --git a/htdocs/includes/modules/societe/mod_codeclient_lion.php b/htdocs/includes/modules/societe/mod_codeclient_lion.php index 9b1a4044399..44415bf7dda 100644 --- a/htdocs/includes/modules/societe/mod_codeclient_lion.php +++ b/htdocs/includes/modules/societe/mod_codeclient_lion.php @@ -18,7 +18,6 @@ * or see http://www.gnu.org/ * * $Id$ - * $Source$ */ /** diff --git a/htdocs/includes/modules/societe/mod_codeclient_tigre.php b/htdocs/includes/modules/societe/mod_codeclient_tigre.php index 727f816539c..b46b782b514 100644 --- a/htdocs/includes/modules/societe/mod_codeclient_tigre.php +++ b/htdocs/includes/modules/societe/mod_codeclient_tigre.php @@ -19,7 +19,6 @@ * or see http://www.gnu.org/ * * $Id$ - * $Source$ */ /** diff --git a/htdocs/includes/modules/societe/mod_codeclient_zebre.php b/htdocs/includes/modules/societe/mod_codeclient_zebre.php index 6c52f926c55..189b9c136cd 100644 --- a/htdocs/includes/modules/societe/mod_codeclient_zebre.php +++ b/htdocs/includes/modules/societe/mod_codeclient_zebre.php @@ -18,7 +18,6 @@ * or see http://www.gnu.org/ * * $Id$ - * $Source$ */ /** @@ -38,12 +37,12 @@ require_once(DOL_DOCUMENT_ROOT."/includes/modules/societe/modules_societe.class. class mod_codeclient_zebre extends ModeleThirdPartyCode { var $nom; // 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 $code_modifiable; // Can be changed if valid + var $code_modifiable_invalide; // Can be changed if not valid + var $code_modifiable_null; // Can be changed if not defined + var $code_null; // Can be undefined var $version; // 'development', 'experimental', 'dolibarr' - var $code_auto; // Numérotation automatique + var $code_auto; // Numérotation automatique /** \brief Constructeur classe @@ -52,10 +51,10 @@ class mod_codeclient_zebre extends ModeleThirdPartyCode { $this->nom = "Zèbre"; $this->version = "dolibarr"; - $this->code_modifiable = 0; - $this->code_modifiable_invalide = 0; - $this->code_modifiable_null = 1; - $this->code_null = 0; + $this->code_modifiable = 0; // Can be changed if valid + $this->code_modifiable_invalide = 1; // Can be changed if not valid + $this->code_modifiable_null = 1; // Can be changed if not defined + $this->code_null = 0; // Can be undefined $this->code_auto = 0; } diff --git a/htdocs/soc.php b/htdocs/soc.php index 15145874cb7..0380f7e5885 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -20,7 +20,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -673,7 +672,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') print '
'.$langs->trans("Name").''.$societe->nom.'
'.$langs->trans("Name").''.$societe->nom.'
'.$langs->trans("Prefix").''; @@ -137,7 +137,7 @@ if ($socid > 0) if ($societe->client) { print '
'.$langs->trans("CustomerCode"). ''. $societe->code_client . ''.$langs->trans("CustomerCode"). ''. $societe->code_client . '
'.$langs->trans("CustomerAccountancyCode").''.$societe->code_compta.''.$langs->trans('CustomerCode').''; print '
'; - if ($soc->codeclient_modifiable() || !$soc->code_client) + if ($soc->codeclient_modifiable()) { print ''; } @@ -700,7 +699,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') print ''.$langs->trans('SupplierCode').''; print '
'; - if ($soc->codefournisseur_modifiable() || !$soc->code_fournisseur) + if ($soc->codefournisseur_modifiable()) { print ''; } diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php index af88917111a..a8ca03c0689 100644 --- a/htdocs/societe.class.php +++ b/htdocs/societe.class.php @@ -1418,7 +1418,8 @@ class Societe /** - * \brief Verifie si un code client est modifiable dans configuration du module de controle des codes + * \brief Verifie si un code client est modifiable en fonction des parametres + * du module de controle des codes. * \return int 0=Non, 1=Oui */ function codeclient_modifiable() @@ -1433,7 +1434,7 @@ class Societe $mod = new $var; dolibarr_syslog("Societe::codeclient_modifiable code_client=".$this->code_client." module=".$var); - if ($mod->code_modifiable_null && ! $this->code_fournisseur) return 1; + if ($mod->code_modifiable_null && ! $this->code_client) return 1; if ($mod->code_modifiable_invalide && $this->check_codeclient() < 0) return 1; if ($mod->code_modifiable) return 1; // A mettre en dernier return 0;