dolibarr 19.0.4
functionsnumtoword.lib.php File Reference

A set of functions for Dolibarr This file contains all frequently used functions. More...

Go to the source code of this file.

Functions

 dol_convertToWord ($num, $langs, $currency='', $centimes=false)
 Function to return a number into a text.
 
 dolNumberToWord ($numero, $langs, $numorcurrency='number')
 Function to return number or amount in text.
 
 hundreds2text ($hundreds, $tens, $units)
 hundreds2text
 

Detailed Description

A set of functions for Dolibarr This file contains all frequently used functions.

Definition in file functionsnumtoword.lib.php.

Function Documentation

◆ dol_convertToWord()

dol_convertToWord ( $num,
$langs,
$currency = '',
$centimes = false )

Function to return a number into a text.

May use module NUMBERWORDS if found.

Parameters
float$numNumber to convert (must be a numeric value, like reported by price2num())
Translate$langsLanguage
string$currency''=number to translate | 'XX'=currency code to use into text
boolean$centimesfalse=no cents/centimes | true=there is cents/centimes
Returns
string|false Text of the number

Definition at line 36 of file functionsnumtoword.lib.php.

Referenced by pdf_standard\_tableau_cheque(), and getCommonSubstitutionArray().

◆ dolNumberToWord()

dolNumberToWord ( $numero,
$langs,
$numorcurrency = 'number' )

Function to return number or amount in text.

Deprecated
Parameters
float$numeroNumber to convert
Translate$langsLanguage
string$numorcurrency'number' or 'amount'
Returns
string|int Text of the number or -1 in case TOO LONG (more than 1000000000000.99)

Definition at line 168 of file functionsnumtoword.lib.php.

References hundreds2text().

◆ hundreds2text()

hundreds2text ( $hundreds,
$tens,
$units )

hundreds2text

Parameters
integer$hundredsHundreds
integer$tensTens
integer$unitsUnits
Returns
string

Definition at line 261 of file functionsnumtoword.lib.php.

Referenced by dolNumberToWord().