Completed
Branch develop (24c267)
by
unknown
24:04
created

functionsnumtoword.lib.php ➔ dol_convertToWord()   F

Complexity

Conditions 16
Paths 1961

Size

Total Lines 99
Code Lines 81

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 16
eloc 81
nc 1961
nop 4
dl 0
loc 99
rs 2
c 0
b 0
f 0

How to fix   Long Method    Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
/* Copyright (C) 2015 Laurent Destailleur  <[email protected]>
3
 * Copyright (C) 2015 Víctor Ortiz Pérez   <[email protected]>
4
 *
5
 * This program is free software; you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License as published by
7
 * the Free Software Foundation; either version 3 of the License, or
8
 * (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
 * or see http://www.gnu.org/
18
 */
19
/**
20
 *	\file			htdocs/core/lib/functionsnumbertoword.lib.php
21
 *	\brief			A set of functions for Dolibarr
22
 *					This file contains all frequently used functions.
23
 */
24
 
25
 
26
/**
27
 * Function to return number in text.
28
 * 
29
 * 
30
 * @param	float 	$num			Number to convert
31
 * @param	Lang	$langs			Language
32
 * @param	boolean	$currency		0=number to translate | 1=currency to translate
33
 * @param	boolean	$centimes		0=no centimes | 1=centimes to translate
34
 * @return 	string  				Text of the number
35
 */
36
function dol_convertToWord($num, $langs, $currency=false, $centimes=false)
37
{
38
	global $conf;
39
	
40
    $num = str_replace(array(',', ' '), '', trim($num));
41
    if(! $num) {
42
        return false;
43
    }
44
	if($centimes && strlen($num) == 1) {
45
		$num = $num*10;
46
	}
47
	$TNum = explode('.',$num);
48
    $num = (int) $TNum[0];
49
    $words = array();
50
    $list1 = array(
51
    	'', 
52
    	$langs->transnoentitiesnoconv('one'), 
53
    	$langs->transnoentitiesnoconv('two'), 
54
    	$langs->transnoentitiesnoconv('three'), 
55
    	$langs->transnoentitiesnoconv('four'), 
56
    	$langs->transnoentitiesnoconv('five'), 
57
    	$langs->transnoentitiesnoconv('six'), 
58
    	$langs->transnoentitiesnoconv('seven'), 
59
    	$langs->transnoentitiesnoconv('eight'), 
60
    	$langs->transnoentitiesnoconv('nine'), 
61
    	$langs->transnoentitiesnoconv('ten'), 
62
    	$langs->transnoentitiesnoconv('eleven'),
63
        $langs->transnoentitiesnoconv('twelve'), 
64
        $langs->transnoentitiesnoconv('thirteen'), 
65
        $langs->transnoentitiesnoconv('fourteen'), 
66
        $langs->transnoentitiesnoconv('fifteen'), 
67
        $langs->transnoentitiesnoconv('sixteen'), 
68
        $langs->transnoentitiesnoconv('seventeen'), 
69
        $langs->transnoentitiesnoconv('eighteen'), 
70
        $langs->transnoentitiesnoconv('nineteen')
71
    );
72
    $list2 = array(
73
    	'', 
74
	    $langs->transnoentitiesnoconv('ten'), 
75
	    $langs->transnoentitiesnoconv('twenty'), 
76
	    $langs->transnoentitiesnoconv('thirty'), 
77
	    $langs->transnoentitiesnoconv('forty'), 
78
	    $langs->transnoentitiesnoconv('fifty'), 
79
	    $langs->transnoentitiesnoconv('sixty'), 
80
	    $langs->transnoentitiesnoconv('seventy'), 
81
	    $langs->transnoentitiesnoconv('eighty'), 
82
	    $langs->transnoentitiesnoconv('ninety'), 
83
	    $langs->transnoentitiesnoconv('hundred')
84
	);
85
    $list3 = array(
86
    	'', 
87
    	$langs->transnoentitiesnoconv('thousand'), 
88
    	$langs->transnoentitiesnoconv('million'), 
89
    	$langs->transnoentitiesnoconv('billion'), 
90
    	$langs->transnoentitiesnoconv('trillion'), 
91
    	$langs->transnoentitiesnoconv('quadrillion')
92
    );
93
	
94
    $num_length = strlen($num);
95
    $levels = (int) (($num_length + 2) / 3);
96
    $max_length = $levels * 3;
97
    $num = substr('00' . $num, -$max_length);
98
    $num_levels = str_split($num, 3);
99
    for ($i = 0; $i < count($num_levels); $i++) {
0 ignored issues
show
Performance Best Practice introduced by
It seems like you are calling the size function count() as part of the test condition. You might want to compute the size beforehand, and not on each iteration.

If the size of the collection does not change during the iteration, it is generally a good practice to compute it beforehand, and not on each iteration:

for ($i=0; $i<count($array); $i++) { // calls count() on each iteration
}

// Better
for ($i=0, $c=count($array); $i<$c; $i++) { // calls count() just once
}
Loading history...
100
        $levels--;
101
        $hundreds = (int) ($num_levels[$i] / 100);
102
        $hundreds = ($hundreds ? ' ' . $list1[$hundreds] . ' '.$langs->transnoentities('hundred') . ( $hundreds == 1 ? '' : 's' ) . ' ': '');
103
        $tens = (int) ($num_levels[$i] % 100);
104
        $singles = '';
105
        if ( $tens < 20 ) {
106
            $tens = ($tens ? ' ' . $list1[$tens] . ' ' : '' );
107
        } else {
108
            $tens = (int) ($tens / 10);
109
            $tens = ' ' . $list2[$tens] . ' ';
110
            $singles = (int) ($num_levels[$i] % 10);
111
            $singles = ' ' . $list1[$singles] . ' ';
112
        }
113
        $words[] = $hundreds . $tens . $singles . ( ( $levels && ( int ) ( $num_levels[$i] ) ) ? ' ' . $list3[$levels] . ' ' : '' );
114
    } //end for loop
115
    $commas = count($words);
116
    if ($commas > 1) {
117
        $commas = $commas - 1;
118
    }
119
	$concatWords = implode(' ', $words);
120
	// Delete multi whitespaces
121
	$concatWords = trim(preg_replace('/[ ]+/', ' ', $concatWords));
122
	
123
	if(!empty($currency)) {
124
		$concatWords .= ' '.$currency;
125
	}
126
	
127
	// If we need to write cents call again this function for cents
128
	if(!empty($TNum[1])) {
129
		if(!empty($currency)) $concatWords .= ' '.$langs->transnoentities('and');
130
		$concatWords .= ' '.dol_convertToWord($TNum[1], $langs, $currency, true);
131
		if(!empty($currency)) $concatWords .= ' '.$langs->transnoentities('centimes');
132
	}
133
    return $concatWords;
134
}
135
 
136
 
137
/**
138
 * Function to return number or amount in text.
139
 * 
140
 * @deprecated
141
 * @param	float 	$numero			Number to convert
142
 * @param	Lang	$langs			Language
143
 * @param	string	$numorcurrency	'number' or 'amount'
144
 * @return 	string  				Text of the number or -1 in case TOO LONG (more than 1000000000000.99)
145
 */
146
function dolNumberToWord($numero, $langs, $numorcurrency='number')
147
{
148
	// If the number is negative convert to positive and return -1 if is too long
149
	if ($numero < 0) $numero *= -1;
150
	if ($numero >= 1000000000001)
151
		return -1;
152
	// Get 2 decimals to cents, another functions round or truncate
153
	$strnumber = number_format ($numero,10);
154
	$len=strlen($strnumber);
155
	for ($i=0; $i<$len; $i++)
156
	{
157
		if ($strnumber[$i]=='.') {
158
			$parte_decimal = $strnumber[$i+1].$strnumber[$i+2];
159
			break;
160
		}
161
	}
162
	var_dump($langs);
0 ignored issues
show
Security Debugging Code introduced by
var_dump($langs); looks like debug code. Are you sure you do not want to remove it? This might expose sensitive data.
Loading history...
163
	/*In dolibarr 3.6.2 (my current version) doesn't have $langs->default and
164
	in case exist why ask $lang like a parameter?*/
165
	if (((is_object($langs) && $langs->default == 'es_MX') || (! is_object($langs) && $langs == 'es_MX')) && $numorcurrency == 'currency')
166
	{	
167
		if ($numero>=1 && $numero<2) {
168
			return ("UN PESO ".$parte_decimal." / 100 M.N.");
0 ignored issues
show
Bug introduced by
The variable $parte_decimal does not seem to be defined for all execution paths leading up to this point.

If you define a variable conditionally, it can happen that it is not defined for all execution paths.

Let’s take a look at an example:

function myFunction($a) {
    switch ($a) {
        case 'foo':
            $x = 1;
            break;

        case 'bar':
            $x = 2;
            break;
    }

    // $x is potentially undefined here.
    echo $x;
}

In the above example, the variable $x is defined if you pass “foo” or “bar” as argument for $a. However, since the switch statement has no default case statement, if you pass any other value, the variable $x would be undefined.

Available Fixes

  1. Check for existence of the variable explicitly:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        if (isset($x)) { // Make sure it's always set.
            echo $x;
        }
    }
    
  2. Define a default value for the variable:

    function myFunction($a) {
        $x = ''; // Set a default which gets overridden for certain paths.
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        echo $x;
    }
    
  3. Add a value for the missing path:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
    
            // We add support for the missing case.
            default:
                $x = '';
                break;
        }
    
        echo $x;
    }
    
Loading history...
169
		}
170
		elseif ($numero>=0 && $numero<1){
171
			return ("CERO PESOS ".$parte_decimal." / 100 M.N.");
172
		}
173
		elseif ($numero>=1000000 && $numero<1000001){
174
			return ("UN MILL&OacuteN DE PESOS ".$parte_decimal." / 100 M.N.");
175
		}
176
		elseif ($numero>=1000000000000 && $numero<1000000000001){
177
			return ("UN BILL&OacuteN DE PESOS ".$parte_decimal." / 100 M.N.");
178
		}
179
		else {
180
			$entexto ="";
181
			$number = $numero;
182
			if ($number >= 1000000000){
183
				$CdMMillon = (int) ($numero / 100000000000);
184
				$numero = $numero - $CdMMillon * 100000000000;
185
				$DdMMillon = (int) ($numero / 10000000000);
186
				$numero = $numero - $DdMMillon * 10000000000;
187
				$UdMMillon = (int) ($numero / 1000000000);
188
				$numero = $numero - $UdMMillon * 1000000000;
189
				$entexto .= hundreds2text ($CdMMillon, $DdMMillon, $UdMMillon);
190
				$entexto .= " MIL ";
191
			}
192
			if ($number >= 1000000){
193
				$CdMILLON = (int) ($numero / 100000000);
194
				$numero = $numero - $CdMILLON * 100000000;
195
				$DdMILLON = (int) ($numero / 10000000);
196
				$numero = $numero - $DdMILLON * 10000000;
197
				$udMILLON = (int) ($numero / 1000000);
198
				$numero = $numero - $udMILLON * 1000000;
199
				$entexto .= hundreds2text ($CdMILLON, $DdMILLON, $udMILLON);
200
				if (!$CdMMillon && !$DdMMillon && !$UdMMillon && !$CdMILLON && !$DdMILLON && $udMILLON==1)
0 ignored issues
show
Bug introduced by
The variable $CdMMillon does not seem to be defined for all execution paths leading up to this point.

If you define a variable conditionally, it can happen that it is not defined for all execution paths.

Let’s take a look at an example:

function myFunction($a) {
    switch ($a) {
        case 'foo':
            $x = 1;
            break;

        case 'bar':
            $x = 2;
            break;
    }

    // $x is potentially undefined here.
    echo $x;
}

In the above example, the variable $x is defined if you pass “foo” or “bar” as argument for $a. However, since the switch statement has no default case statement, if you pass any other value, the variable $x would be undefined.

Available Fixes

  1. Check for existence of the variable explicitly:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        if (isset($x)) { // Make sure it's always set.
            echo $x;
        }
    }
    
  2. Define a default value for the variable:

    function myFunction($a) {
        $x = ''; // Set a default which gets overridden for certain paths.
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        echo $x;
    }
    
  3. Add a value for the missing path:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
    
            // We add support for the missing case.
            default:
                $x = '';
                break;
        }
    
        echo $x;
    }
    
Loading history...
Bug introduced by
The variable $DdMMillon does not seem to be defined for all execution paths leading up to this point.

If you define a variable conditionally, it can happen that it is not defined for all execution paths.

Let’s take a look at an example:

function myFunction($a) {
    switch ($a) {
        case 'foo':
            $x = 1;
            break;

        case 'bar':
            $x = 2;
            break;
    }

    // $x is potentially undefined here.
    echo $x;
}

In the above example, the variable $x is defined if you pass “foo” or “bar” as argument for $a. However, since the switch statement has no default case statement, if you pass any other value, the variable $x would be undefined.

Available Fixes

  1. Check for existence of the variable explicitly:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        if (isset($x)) { // Make sure it's always set.
            echo $x;
        }
    }
    
  2. Define a default value for the variable:

    function myFunction($a) {
        $x = ''; // Set a default which gets overridden for certain paths.
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        echo $x;
    }
    
  3. Add a value for the missing path:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
    
            // We add support for the missing case.
            default:
                $x = '';
                break;
        }
    
        echo $x;
    }
    
Loading history...
Bug introduced by
The variable $UdMMillon does not seem to be defined for all execution paths leading up to this point.

If you define a variable conditionally, it can happen that it is not defined for all execution paths.

Let’s take a look at an example:

function myFunction($a) {
    switch ($a) {
        case 'foo':
            $x = 1;
            break;

        case 'bar':
            $x = 2;
            break;
    }

    // $x is potentially undefined here.
    echo $x;
}

In the above example, the variable $x is defined if you pass “foo” or “bar” as argument for $a. However, since the switch statement has no default case statement, if you pass any other value, the variable $x would be undefined.

Available Fixes

  1. Check for existence of the variable explicitly:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        if (isset($x)) { // Make sure it's always set.
            echo $x;
        }
    }
    
  2. Define a default value for the variable:

    function myFunction($a) {
        $x = ''; // Set a default which gets overridden for certain paths.
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        echo $x;
    }
    
  3. Add a value for the missing path:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
    
            // We add support for the missing case.
            default:
                $x = '';
                break;
        }
    
        echo $x;
    }
    
Loading history...
201
					$entexto .= " MILL&OacuteN ";
202
				else
203
					$entexto .= " MILLONES ";
204
			}
205
			if ($number >= 1000) {
206
				$cdm = (int) ($numero / 100000);
207
				$numero = $numero - $cdm * 100000;
208
				$ddm = (int) ($numero / 10000);
209
				$numero = $numero - $ddm * 10000;
210
				$udm = (int) ($numero / 1000);
211
				$numero = $numero - $udm * 1000;
212
				$entexto .= hundreds2text ($cdm, $ddm, $udm);
213
				if ($cdm || $ddm || $udm)
214
					$entexto .= " MIL ";
215
			}
216
			$c = (int) ($numero / 100);
217
			$numero = $numero - $c * 100;
218
			$d = (int) ($numero / 10);
219
			$u = (int) $numero - $d * 10;
220
			$entexto .= hundreds2text ($c, $d, $u);
221
			if (!$cdm && !$ddm && !$udm && !$c && !$d && !$u && $number>1000000)
0 ignored issues
show
Bug introduced by
The variable $cdm does not seem to be defined for all execution paths leading up to this point.

If you define a variable conditionally, it can happen that it is not defined for all execution paths.

Let’s take a look at an example:

function myFunction($a) {
    switch ($a) {
        case 'foo':
            $x = 1;
            break;

        case 'bar':
            $x = 2;
            break;
    }

    // $x is potentially undefined here.
    echo $x;
}

In the above example, the variable $x is defined if you pass “foo” or “bar” as argument for $a. However, since the switch statement has no default case statement, if you pass any other value, the variable $x would be undefined.

Available Fixes

  1. Check for existence of the variable explicitly:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        if (isset($x)) { // Make sure it's always set.
            echo $x;
        }
    }
    
  2. Define a default value for the variable:

    function myFunction($a) {
        $x = ''; // Set a default which gets overridden for certain paths.
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        echo $x;
    }
    
  3. Add a value for the missing path:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
    
            // We add support for the missing case.
            default:
                $x = '';
                break;
        }
    
        echo $x;
    }
    
Loading history...
Bug introduced by
The variable $ddm does not seem to be defined for all execution paths leading up to this point.

If you define a variable conditionally, it can happen that it is not defined for all execution paths.

Let’s take a look at an example:

function myFunction($a) {
    switch ($a) {
        case 'foo':
            $x = 1;
            break;

        case 'bar':
            $x = 2;
            break;
    }

    // $x is potentially undefined here.
    echo $x;
}

In the above example, the variable $x is defined if you pass “foo” or “bar” as argument for $a. However, since the switch statement has no default case statement, if you pass any other value, the variable $x would be undefined.

Available Fixes

  1. Check for existence of the variable explicitly:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        if (isset($x)) { // Make sure it's always set.
            echo $x;
        }
    }
    
  2. Define a default value for the variable:

    function myFunction($a) {
        $x = ''; // Set a default which gets overridden for certain paths.
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        echo $x;
    }
    
  3. Add a value for the missing path:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
    
            // We add support for the missing case.
            default:
                $x = '';
                break;
        }
    
        echo $x;
    }
    
Loading history...
Bug introduced by
The variable $udm does not seem to be defined for all execution paths leading up to this point.

If you define a variable conditionally, it can happen that it is not defined for all execution paths.

Let’s take a look at an example:

function myFunction($a) {
    switch ($a) {
        case 'foo':
            $x = 1;
            break;

        case 'bar':
            $x = 2;
            break;
    }

    // $x is potentially undefined here.
    echo $x;
}

In the above example, the variable $x is defined if you pass “foo” or “bar” as argument for $a. However, since the switch statement has no default case statement, if you pass any other value, the variable $x would be undefined.

Available Fixes

  1. Check for existence of the variable explicitly:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        if (isset($x)) { // Make sure it's always set.
            echo $x;
        }
    }
    
  2. Define a default value for the variable:

    function myFunction($a) {
        $x = ''; // Set a default which gets overridden for certain paths.
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        echo $x;
    }
    
  3. Add a value for the missing path:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
    
            // We add support for the missing case.
            default:
                $x = '';
                break;
        }
    
        echo $x;
    }
    
Loading history...
222
				$entexto .= " DE";
223
			$entexto .= " PESOS ".$parte_decimal." / 100 M.N.";
224
		}
225
		return $entexto;
226
	}
227
}
228
229
/**
230
 * hundreds2text
231
 * 
232
 * @param integer $hundreds     Hundreds
233
 * @param integer $tens         Tens
234
 * @param integer $units        Units
235
 */
236
function hundreds2text($hundreds, $tens, $units)
237
{
238
	if ($hundreds==1 && $tens==0 && $units==0){
239
		return "CIEN";
240
	}
241
	$centenas = array("CIENTO","DOSCIENTOS","TRESCIENTOS","CUATROCIENTOS","QUINIENTOS","SEISCIENTOS","SETECIENTOS","OCHOCIENTOS","NOVECIENTOS");
242
	$decenas = array("","","TREINTA ","CUARENTA ","CINCUENTA ","SESENTA ","SETENTA ","OCHENTA ","NOVENTA ");
243
	$veintis = array("VEINTE","VEINTIUN","VEINTID&OacuteS","VEINTITR&EacuteS","VEINTICUATRO","VEINTICINCO","VEINTIS&EacuteIS","VEINTISIETE","VEINTIOCHO","VEINTINUEVE");
244
	$diecis = array("DIEZ","ONCE","DOCE","TRECE","CATORCE","QUINCE","DIECIS&EacuteIS","DIECISIETE","DIECIOCHO","DIECINUEVE");
245
    $unidades = array("UN","DOS","TRES","CUATRO","CINCO","SEIS","SIETE","OCHO","NUEVE");
246
	$entexto = "";
247
	if ($hundreds!=0){
248
		$entexto .= $centenas[$hundreds-1];
249
	}
250
	if ($tens>2){
251
		if ($hundreds!=0) $entexto .= " ";
252
		$entexto .= $decenas[$tens-1];
253
		if ($units!=0){
254
			$entexto .= " Y ";
255
			$entexto .= $unidades[$units-1];
256
		}
257
		return $entexto;
258
	}
259
	elseif ($tens==2){
260
		if ($hundreds!=0) $entexto .= " ";
261
		$entexto .= " ".$veintis[$units];
262
		return $entexto;
263
	}
264
	elseif ($tens==1){
265
		if ($hundreds!=0) $entexto .= " ";
266
		$entexto .= $diecis[$units];
267
		return $entexto;
268
	}
269
	if ($units!=0) {
270
		if ($hundreds!=0 || $tens!=0) $entexto .= " ";
271
		$entexto .= $unidades[$units-1];
272
	}
273
	return $entexto;
274
}
275