diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php
index c9d2b4984ad..d4b2f1ed265 100644
--- a/htdocs/core/modules/dons/html_cerfafr.modules.php
+++ b/htdocs/core/modules/dons/html_cerfafr.modules.php
@@ -38,7 +38,7 @@ class html_cerfafr extends ModeleDon
/**
* Constructor
*
- * @param DoliDb $db Database handler
+ * @param DoliDb $db Database handler
*/
function __construct($db)
{
@@ -167,7 +167,7 @@ class html_cerfafr extends ModeleDon
$form = str_replace('__DATE__',dol_print_date($don->date,'day',false,$outputlangs),$form);
//$form = str_replace('__IP__',$user->ip,$form); // TODO $user->ip not exist
$form = str_replace('__AMOUNT__', price($don->amount), $form);
- $form = str_replace('__AMOUNTLETTERS__',chiffre_en_lettre($don->amount),$form);
+ $form = str_replace('__AMOUNTLETTERS__',amountToLetters($don->amount),$form);
$form = str_replace('__CURRENCY__',$outputlangs->transnoentitiesnoconv("Currency".$currency),$form);
$form = str_replace('__CURRENCYCODE__',$conf->currency,$form);
$form = str_replace('__MAIN_INFO_SOCIETE_NOM__',$mysoc->name,$form);
@@ -278,7 +278,15 @@ class html_cerfafr extends ModeleDon
}
}
-function chiffre_en_lettre($montant, $devise1='', $devise2='')
+/**
+ * numbers to letters
+ *
+ * @param mixed $montant amount
+ * @param mixed $devise1 devise 1 ex: euro
+ * @param mixed $devise2 devise 2 ex: centimes
+ * @return string amount in letters
+ */
+function amountToLetters($montant, $devise1='', $devise2='')
{
if(empty($devise1)) $dev1='euros';
else $dev1=$devise1;
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index 40c6a6b9f19..58c056765dd 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -44,12 +44,12 @@ class User extends CommonObject
* @var string ID to identify managed object
*/
public $element='user';
-
+
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='user';
-
+
public $fk_element='fk_user';
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
@@ -146,14 +146,14 @@ class User extends CommonObject
public $default_c_exp_tax_cat;
public $default_range;
- public $fields=array(
- 'rowid'=>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'),
- 'lastname'=>array('type'=>'varchar(50)', 'label'=>'Name', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>20, 'searchall'=>1, 'comment'=>'Reference of object'),
- 'firstname'=>array('type'=>'varchar(50)', 'label'=>'Name','enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Reference of object'),
- );
+ public $fields = array(
+ 'rowid'=>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'),
+ 'lastname'=>array('type'=>'varchar(50)', 'label'=>'Name', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>20, 'searchall'=>1, 'comment'=>'Reference of object'),
+ 'firstname'=>array('type'=>'varchar(50)', 'label'=>'Name','enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Reference of object'),
+ );
/**
- * Constructor de la classe
+ * Constructor of the class
*
* @param DoliDb $db Database handler
*/
@@ -1541,7 +1541,7 @@ class User extends CommonObject
$adh->zip=$this->zip;
$adh->state_id=$this->state_id;
$adh->country_id=$this->country_id;
-
+
$adh->email=$this->email;
$adh->skype=$this->skype;
$adh->phone=$this->office_phone;