diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 472aee478d9..b3888cc9d7b 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -2258,6 +2258,9 @@ class Form { global $langs,$conf,$mysoc; + $txtva=array(); + $libtva=array(); + //print $societe_vendeuse."-".$societe_acheteuse; if (is_object($societe_vendeuse) && ! $societe_vendeuse->pays_code) { @@ -2292,16 +2295,23 @@ class Form if ($resql) { $num = $this->db->num_rows($resql); - for ($i = 0; $i < $num; $i++) + if ($num) { - $obj = $this->db->fetch_object($resql); - $txtva[ $i ] = $obj->taux; - $libtva[ $i ] = $obj->taux.'%'.($obj->recuperableonly ? ' *':''); + for ($i = 0; $i < $num; $i++) + { + $obj = $this->db->fetch_object($resql); + $txtva[$i] = $obj->taux; + $libtva[$i] = $obj->taux.'%'.($obj->recuperableonly ? ' *':''); + } + } + else + { + print ''.$langs->trans("ErrorNoVATRateDefinedForSellerCountry",$code_pays).''; } } else { - print ''.$langs->trans("ErrorNoVATRateDefinedForSellerCountry").''; + print ''.$this->db->error().''; } // Définition du taux à présélectionner @@ -2312,23 +2322,26 @@ class Form $nbdetaux = sizeof($txtva); - print ''; } - print ''; } diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 67cb9ef8507..586c8a484b4 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -32,6 +32,7 @@ ErrorDuplicateField=Duplicate value in a unique field ErrorSomeErrorWereFoundRollbackIsDone=Some errors were found. We rollback changes. ErrorConfigParameterNotDefined=Parameter %s is not defined inside Dolibarr config file conf.php. ErrorCantLoadUserFromDolibarrDatabase=Failed to find user %s in Dolibarr database. +ErrorNoVATRateDefinedForSellerCountry=Error, no vat rates defined for country '%s'. DolibarrInHttpAuthenticationSoPasswordUseless=Dolibarr authentication mode is setup to %s in configuration file conf.php.
This means that password database is extern to Dolibarr, so changing this field may have no effects. Undefined=Undefined PasswordForgotten=Password forgotten ? diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index ba2536c7f24..93e9473879e 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -32,6 +32,7 @@ ErrorDuplicateField=Doublon dans un champ unique ErrorSomeErrorWereFoundRollbackIsDone=Des erreurs ont été trouvés. On rollback les modifications. ErrorConfigParameterNotDefined=Le parametre %s n'est pas défini dans le fichier de configuration Dolibarr conf.php. ErrorCantLoadUserFromDolibarrDatabase=Impossible de trouver l'utilisateur %s dans la base Dolibarr. +ErrorNoVATRateDefinedForSellerCountry=Erreur, aucun taux tva défini pour le pays '%s'. DolibarrInHttpAuthenticationSoPasswordUseless=Dolibarr est configuré en mode authentification %s dans son fichier de configuration conf.php.
Cela signifie que la base des mots de passe est externe à Dolibarr, aussi toute modification de ce champ peut s'avérer sans effet. Undefined=Non défini PasswordForgotten=Mot de passe oublié ?