function Comment Missing

This commit is contained in:
Frédéric FRANCE 2018-08-31 22:34:02 +02:00
parent b015d05f07
commit c2e49c82f8
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
2 changed files with 20 additions and 12 deletions

View File

@ -38,7 +38,7 @@ class html_cerfafr extends ModeleDon
/** /**
* Constructor * Constructor
* *
* @param DoliDb $db Database handler * @param DoliDb $db Database handler
*/ */
function __construct($db) 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('__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('__IP__',$user->ip,$form); // TODO $user->ip not exist
$form = str_replace('__AMOUNT__', price($don->amount), $form); $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('__CURRENCY__',$outputlangs->transnoentitiesnoconv("Currency".$currency),$form);
$form = str_replace('__CURRENCYCODE__',$conf->currency,$form); $form = str_replace('__CURRENCYCODE__',$conf->currency,$form);
$form = str_replace('__MAIN_INFO_SOCIETE_NOM__',$mysoc->name,$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'; if(empty($devise1)) $dev1='euros';
else $dev1=$devise1; else $dev1=$devise1;

View File

@ -44,12 +44,12 @@ class User extends CommonObject
* @var string ID to identify managed object * @var string ID to identify managed object
*/ */
public $element='user'; public $element='user';
/** /**
* @var string Name of table without prefix where object is stored * @var string Name of table without prefix where object is stored
*/ */
public $table_element='user'; public $table_element='user';
public $fk_element='fk_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 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_c_exp_tax_cat;
public $default_range; public $default_range;
public $fields=array( public $fields = array(
'rowid'=>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'), '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'), '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'), '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 * @param DoliDb $db Database handler
*/ */
@ -1541,7 +1541,7 @@ class User extends CommonObject
$adh->zip=$this->zip; $adh->zip=$this->zip;
$adh->state_id=$this->state_id; $adh->state_id=$this->state_id;
$adh->country_id=$this->country_id; $adh->country_id=$this->country_id;
$adh->email=$this->email; $adh->email=$this->email;
$adh->skype=$this->skype; $adh->skype=$this->skype;
$adh->phone=$this->office_phone; $adh->phone=$this->office_phone;