mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90854dc2bf | ||
|
|
b44ddaa696 | ||
|
|
4569cb82b2 | ||
|
|
04d33f4594 | ||
|
|
af6e95aa79 | ||
|
|
5d942c9d1a | ||
|
|
1541e20870 | ||
|
|
53709cf509 | ||
|
|
10e32c056e | ||
|
|
0a72aed3d7 | ||
|
|
5e1cd459b1 | ||
|
|
0f435f9901 | ||
|
|
a9117fe864 | ||
|
|
8ce929d509 | ||
|
|
c2ad40043f | ||
|
|
529dfb8dfb | ||
|
|
74eac1d06a | ||
|
|
03557b69c2 | ||
|
|
7a183ea026 | ||
|
|
b44d6744f9 | ||
|
|
7eb003c684 | ||
|
|
6e1702c1a5 | ||
|
|
73ea5b0e2d | ||
|
|
9cb5735165 | ||
|
|
c8bff3a71e | ||
|
|
9dc904f0a5 | ||
|
|
491f72accc | ||
|
|
4a291f181f | ||
|
|
454a804b4e | ||
|
|
25994e61bc | ||
|
|
eb7dd74026 | ||
|
|
88f6c71e88 |
@@ -120,6 +120,7 @@ install:
|
|||||||
composer self-update
|
composer self-update
|
||||||
composer -n init
|
composer -n init
|
||||||
composer -n config vendor-dir htdocs/includes
|
composer -n config vendor-dir htdocs/includes
|
||||||
|
composer -n config -g vendor-dir htdocs/includes
|
||||||
echo
|
echo
|
||||||
|
|
||||||
- |
|
- |
|
||||||
|
|||||||
@@ -365,8 +365,8 @@ else
|
|||||||
$nbtotalofrecords = '';
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$result = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
$nbtotalofrecords = $db->num_rows($result);
|
$nbtotalofrecords = $db->num_rows($resql);
|
||||||
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
|
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||||
{
|
{
|
||||||
$page = 0;
|
$page = 0;
|
||||||
@@ -376,18 +376,18 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
|||||||
|
|
||||||
$sql.= $db->plimit($limit+1, $offset);
|
$sql.= $db->plimit($limit+1, $offset);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if (! $result)
|
if (! $resql)
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
$arrayofselected=is_array($toselect)?$toselect:array();
|
$arrayofselected=is_array($toselect)?$toselect:array();
|
||||||
|
|
||||||
if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && ($sall != '' || $seearch_cti != ''))
|
if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && ($sall != '' || $search_cti != ''))
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
$id = $obj->rowid;
|
$id = $obj->rowid;
|
||||||
@@ -715,7 +715,7 @@ $i = 0;
|
|||||||
$totalarray=array();
|
$totalarray=array();
|
||||||
while ($i < min($num,$limit))
|
while ($i < min($num,$limit))
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
@@ -914,7 +914,7 @@ while ($i < min($num,$limit))
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->free($result);
|
$db->free($resql);
|
||||||
|
|
||||||
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
|
||||||
|
|||||||
@@ -347,17 +347,19 @@ class Utils
|
|||||||
{
|
{
|
||||||
$handlein = popen($fullcommandclear, 'r');
|
$handlein = popen($fullcommandclear, 'r');
|
||||||
$i=0;
|
$i=0;
|
||||||
while (!feof($handlein))
|
if ($handlein) {
|
||||||
{
|
while (!feof($handlein))
|
||||||
$i++; // output line number
|
{
|
||||||
$read = fgets($handlein);
|
$i++; // output line number
|
||||||
// Exclude warning line we don't want
|
$read = fgets($handlein);
|
||||||
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
|
// Exclude warning line we don't want
|
||||||
fwrite($handle, $read);
|
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
|
||||||
if (preg_match('/'.preg_quote('-- Dump completed').'/i', $read)) $ok=1;
|
fwrite($handle, $read);
|
||||||
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i', $read)) $ok=1;
|
if (preg_match('/'.preg_quote('-- Dump completed').'/i', $read)) $ok=1;
|
||||||
|
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i', $read)) $ok=1;
|
||||||
|
}
|
||||||
|
pclose($handlein);
|
||||||
}
|
}
|
||||||
pclose($handlein);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1872,6 +1872,12 @@ function dolGetElementUrl($objectid,$objecttype,$withpicto=0,$option='')
|
|||||||
$classpath = 'fourn/class';
|
$classpath = 'fourn/class';
|
||||||
$module='fournisseur';
|
$module='fournisseur';
|
||||||
}
|
}
|
||||||
|
elseif ($objecttype == 'supplier_proposal') {
|
||||||
|
$classfile = 'supplier_proposal';
|
||||||
|
$classname = 'SupplierProposal';
|
||||||
|
$classpath = 'supplier_proposal/class';
|
||||||
|
$module = 'supplier_proposal';
|
||||||
|
}
|
||||||
elseif ($objecttype == 'stock') {
|
elseif ($objecttype == 'stock') {
|
||||||
$classpath = 'product/stock/class';
|
$classpath = 'product/stock/class';
|
||||||
$classfile='entrepot';
|
$classfile='entrepot';
|
||||||
|
|||||||
@@ -13,125 +13,142 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
* or see http://www.gnu.org/
|
* or see https://www.gnu.org/
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* \file htdocs/core/lib/functionsnumbertoword.lib.php
|
* \file htdocs/core/lib/functionsnumtoword.lib.php
|
||||||
* \brief A set of functions for Dolibarr
|
* \brief A set of functions for Dolibarr
|
||||||
* This file contains all frequently used functions.
|
* This file contains all frequently used functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to return number in text.
|
* Function to return a number into a text.
|
||||||
|
* May use module NUMBERWORDS if found.
|
||||||
*
|
*
|
||||||
*
|
* @param float $num Number to convert (must be a numeric value, like reported by price2num())
|
||||||
* @param float $num Number to convert
|
* @param Translate $langs Language
|
||||||
* @param Lang $langs Language
|
* @param boolean $currency 0=number to translate | 1=currency to translate
|
||||||
* @param boolean $currency 0=number to translate | 1=currency to translate
|
* @param boolean $centimes 0=no cents/centimes | 1=there is cents/centimes to translate
|
||||||
* @param boolean $centimes 0=no centimes | 1=centimes to translate
|
* @return string|false Text of the number
|
||||||
* @return string Text of the number
|
|
||||||
*/
|
*/
|
||||||
function dol_convertToWord($num, $langs, $currency=false, $centimes=false)
|
function dol_convertToWord($num, $langs, $currency = false, $centimes = false)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$num = str_replace(array(',', ' '), '', trim($num));
|
//$num = str_replace(array(',', ' '), '', trim($num)); This should be useless since $num MUST be a php numeric value
|
||||||
if(! $num) {
|
if (!$num) {
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
if($centimes && strlen($num) == 1) {
|
|
||||||
$num = $num*10;
|
|
||||||
}
|
|
||||||
$TNum = explode('.',$num);
|
|
||||||
$num = (int) $TNum[0];
|
|
||||||
$words = array();
|
|
||||||
$list1 = array(
|
|
||||||
'',
|
|
||||||
$langs->transnoentitiesnoconv('one'),
|
|
||||||
$langs->transnoentitiesnoconv('two'),
|
|
||||||
$langs->transnoentitiesnoconv('three'),
|
|
||||||
$langs->transnoentitiesnoconv('four'),
|
|
||||||
$langs->transnoentitiesnoconv('five'),
|
|
||||||
$langs->transnoentitiesnoconv('six'),
|
|
||||||
$langs->transnoentitiesnoconv('seven'),
|
|
||||||
$langs->transnoentitiesnoconv('eight'),
|
|
||||||
$langs->transnoentitiesnoconv('nine'),
|
|
||||||
$langs->transnoentitiesnoconv('ten'),
|
|
||||||
$langs->transnoentitiesnoconv('eleven'),
|
|
||||||
$langs->transnoentitiesnoconv('twelve'),
|
|
||||||
$langs->transnoentitiesnoconv('thirteen'),
|
|
||||||
$langs->transnoentitiesnoconv('fourteen'),
|
|
||||||
$langs->transnoentitiesnoconv('fifteen'),
|
|
||||||
$langs->transnoentitiesnoconv('sixteen'),
|
|
||||||
$langs->transnoentitiesnoconv('seventeen'),
|
|
||||||
$langs->transnoentitiesnoconv('eighteen'),
|
|
||||||
$langs->transnoentitiesnoconv('nineteen')
|
|
||||||
);
|
|
||||||
$list2 = array(
|
|
||||||
'',
|
|
||||||
$langs->transnoentitiesnoconv('ten'),
|
|
||||||
$langs->transnoentitiesnoconv('twenty'),
|
|
||||||
$langs->transnoentitiesnoconv('thirty'),
|
|
||||||
$langs->transnoentitiesnoconv('forty'),
|
|
||||||
$langs->transnoentitiesnoconv('fifty'),
|
|
||||||
$langs->transnoentitiesnoconv('sixty'),
|
|
||||||
$langs->transnoentitiesnoconv('seventy'),
|
|
||||||
$langs->transnoentitiesnoconv('eighty'),
|
|
||||||
$langs->transnoentitiesnoconv('ninety'),
|
|
||||||
$langs->transnoentitiesnoconv('hundred')
|
|
||||||
);
|
|
||||||
$list3 = array(
|
|
||||||
'',
|
|
||||||
$langs->transnoentitiesnoconv('thousand'),
|
|
||||||
$langs->transnoentitiesnoconv('million'),
|
|
||||||
$langs->transnoentitiesnoconv('billion'),
|
|
||||||
$langs->transnoentitiesnoconv('trillion'),
|
|
||||||
$langs->transnoentitiesnoconv('quadrillion')
|
|
||||||
);
|
|
||||||
|
|
||||||
$num_length = strlen($num);
|
|
||||||
$levels = (int) (($num_length + 2) / 3);
|
|
||||||
$max_length = $levels * 3;
|
|
||||||
$num = substr('00' . $num, -$max_length);
|
|
||||||
$num_levels = str_split($num, 3);
|
|
||||||
$nboflevels = count($num_levels);
|
|
||||||
for ($i = 0; $i < $nboflevels; $i++) {
|
|
||||||
$levels--;
|
|
||||||
$hundreds = (int) ($num_levels[$i] / 100);
|
|
||||||
$hundreds = ($hundreds ? ' ' . $list1[$hundreds] . ' '.$langs->transnoentities('hundred') . ( $hundreds == 1 ? '' : 's' ) . ' ': '');
|
|
||||||
$tens = (int) ($num_levels[$i] % 100);
|
|
||||||
$singles = '';
|
|
||||||
if ( $tens < 20 ) {
|
|
||||||
$tens = ($tens ? ' ' . $list1[$tens] . ' ' : '' );
|
|
||||||
} else {
|
|
||||||
$tens = (int) ($tens / 10);
|
|
||||||
$tens = ' ' . $list2[$tens] . ' ';
|
|
||||||
$singles = (int) ($num_levels[$i] % 10);
|
|
||||||
$singles = ' ' . $list1[$singles] . ' ';
|
|
||||||
}
|
|
||||||
$words[] = $hundreds . $tens . $singles . ( ( $levels && ( int ) ( $num_levels[$i] ) ) ? ' ' . $list3[$levels] . ' ' : '' );
|
|
||||||
} //end for loop
|
|
||||||
$commas = count($words);
|
|
||||||
if ($commas > 1) {
|
|
||||||
$commas = $commas - 1;
|
|
||||||
}
|
|
||||||
$concatWords = implode(' ', $words);
|
|
||||||
// Delete multi whitespaces
|
|
||||||
$concatWords = trim(preg_replace('/[ ]+/', ' ', $concatWords));
|
|
||||||
|
|
||||||
if(!empty($currency)) {
|
|
||||||
$concatWords .= ' '.$currency;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we need to write cents call again this function for cents
|
if ($centimes && strlen($num) == 1) {
|
||||||
if(!empty($TNum[1])) {
|
$num = $num * 10;
|
||||||
if(!empty($currency)) $concatWords .= ' '.$langs->transnoentities('and');
|
}
|
||||||
$concatWords .= ' '.dol_convertToWord($TNum[1], $langs, $currency, true);
|
|
||||||
if(!empty($currency)) $concatWords .= ' '.$langs->transnoentities('centimes');
|
if (!empty($conf->global->MAIN_MODULE_NUMBERWORDS)) {
|
||||||
|
if ($currency) {
|
||||||
|
$type = 1;
|
||||||
|
} else {
|
||||||
|
$type = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$concatWords = $langs->getLabelFromNumber($num, $type);
|
||||||
|
return $concatWords;
|
||||||
|
} else {
|
||||||
|
$TNum = explode('.', $num);
|
||||||
|
$num = (int) $TNum[0];
|
||||||
|
$words = array();
|
||||||
|
$list1 = array(
|
||||||
|
'',
|
||||||
|
$langs->transnoentitiesnoconv('one'),
|
||||||
|
$langs->transnoentitiesnoconv('two'),
|
||||||
|
$langs->transnoentitiesnoconv('three'),
|
||||||
|
$langs->transnoentitiesnoconv('four'),
|
||||||
|
$langs->transnoentitiesnoconv('five'),
|
||||||
|
$langs->transnoentitiesnoconv('six'),
|
||||||
|
$langs->transnoentitiesnoconv('seven'),
|
||||||
|
$langs->transnoentitiesnoconv('eight'),
|
||||||
|
$langs->transnoentitiesnoconv('nine'),
|
||||||
|
$langs->transnoentitiesnoconv('ten'),
|
||||||
|
$langs->transnoentitiesnoconv('eleven'),
|
||||||
|
$langs->transnoentitiesnoconv('twelve'),
|
||||||
|
$langs->transnoentitiesnoconv('thirteen'),
|
||||||
|
$langs->transnoentitiesnoconv('fourteen'),
|
||||||
|
$langs->transnoentitiesnoconv('fifteen'),
|
||||||
|
$langs->transnoentitiesnoconv('sixteen'),
|
||||||
|
$langs->transnoentitiesnoconv('seventeen'),
|
||||||
|
$langs->transnoentitiesnoconv('eighteen'),
|
||||||
|
$langs->transnoentitiesnoconv('nineteen')
|
||||||
|
);
|
||||||
|
$list2 = array(
|
||||||
|
'',
|
||||||
|
$langs->transnoentitiesnoconv('ten'),
|
||||||
|
$langs->transnoentitiesnoconv('twenty'),
|
||||||
|
$langs->transnoentitiesnoconv('thirty'),
|
||||||
|
$langs->transnoentitiesnoconv('forty'),
|
||||||
|
$langs->transnoentitiesnoconv('fifty'),
|
||||||
|
$langs->transnoentitiesnoconv('sixty'),
|
||||||
|
$langs->transnoentitiesnoconv('seventy'),
|
||||||
|
$langs->transnoentitiesnoconv('eighty'),
|
||||||
|
$langs->transnoentitiesnoconv('ninety'),
|
||||||
|
$langs->transnoentitiesnoconv('hundred')
|
||||||
|
);
|
||||||
|
$list3 = array(
|
||||||
|
'',
|
||||||
|
$langs->transnoentitiesnoconv('thousand'),
|
||||||
|
$langs->transnoentitiesnoconv('million'),
|
||||||
|
$langs->transnoentitiesnoconv('billion'),
|
||||||
|
$langs->transnoentitiesnoconv('trillion'),
|
||||||
|
$langs->transnoentitiesnoconv('quadrillion')
|
||||||
|
);
|
||||||
|
|
||||||
|
$num_length = strlen($num);
|
||||||
|
$levels = (int) (($num_length + 2) / 3);
|
||||||
|
$max_length = $levels * 3;
|
||||||
|
$num = substr('00'.$num, -$max_length);
|
||||||
|
$num_levels = str_split($num, 3);
|
||||||
|
$nboflevels = count($num_levels);
|
||||||
|
for ($i = 0; $i < $nboflevels; $i++) {
|
||||||
|
$levels--;
|
||||||
|
$hundreds = (int) ($num_levels[$i] / 100);
|
||||||
|
$hundreds = ($hundreds ? ' '.$list1[$hundreds].' '.$langs->transnoentities('hundred').($hundreds == 1 ? '' : 's').' ' : '');
|
||||||
|
$tens = (int) ($num_levels[$i] % 100);
|
||||||
|
$singles = '';
|
||||||
|
if ($tens < 20) {
|
||||||
|
$tens = ($tens ? ' '.$list1[$tens].' ' : '');
|
||||||
|
} else {
|
||||||
|
$tens = (int) ($tens / 10);
|
||||||
|
$tens = ' '.$list2[$tens].' ';
|
||||||
|
$singles = (int) ($num_levels[$i] % 10);
|
||||||
|
$singles = ' '.$list1[$singles].' ';
|
||||||
|
}
|
||||||
|
$words[] = $hundreds.$tens.$singles.(($levels && (int) ($num_levels[$i])) ? ' '.$list3[$levels].' ' : '');
|
||||||
|
} //end for loop
|
||||||
|
$commas = count($words);
|
||||||
|
if ($commas > 1) {
|
||||||
|
$commas = $commas - 1;
|
||||||
|
}
|
||||||
|
$concatWords = implode(' ', $words);
|
||||||
|
// Delete multi whitespaces
|
||||||
|
$concatWords = trim(preg_replace('/[ ]+/', ' ', $concatWords));
|
||||||
|
|
||||||
|
if (!empty($currency)) {
|
||||||
|
$concatWords .= ' '.$currency;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we need to write cents call again this function for cents
|
||||||
|
$decimalpart = $TNum[1];
|
||||||
|
$decimalpart = preg_replace('/0+$/', '', $decimalpart);
|
||||||
|
|
||||||
|
if ($decimalpart) {
|
||||||
|
if (!empty($currency)) $concatWords .= ' '.$langs->transnoentities('and');
|
||||||
|
|
||||||
|
$concatWords .= ' '.dol_convertToWord($decimalpart, $langs, '', true);
|
||||||
|
if (!empty($currency)) $concatWords .= ' '.$langs->transnoentities('centimes');
|
||||||
|
}
|
||||||
|
return $concatWords;
|
||||||
}
|
}
|
||||||
return $concatWords;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -139,92 +156,92 @@ function dol_convertToWord($num, $langs, $currency=false, $centimes=false)
|
|||||||
* Function to return number or amount in text.
|
* Function to return number or amount in text.
|
||||||
*
|
*
|
||||||
* @deprecated
|
* @deprecated
|
||||||
* @param float $numero Number to convert
|
* @param float $numero Number to convert
|
||||||
* @param Lang $langs Language
|
* @param Translate $langs Language
|
||||||
* @param string $numorcurrency 'number' or 'amount'
|
* @param string $numorcurrency 'number' or 'amount'
|
||||||
* @return string Text of the number or -1 in case TOO LONG (more than 1000000000000.99)
|
* @return string Text of the number or -1 in case TOO LONG (more than 1000000000000.99)
|
||||||
*/
|
*/
|
||||||
function dolNumberToWord($numero, $langs, $numorcurrency='number')
|
function dolNumberToWord($numero, $langs, $numorcurrency = 'number')
|
||||||
{
|
{
|
||||||
// If the number is negative convert to positive and return -1 if is too long
|
// If the number is negative convert to positive and return -1 if is too long
|
||||||
if ($numero < 0) $numero *= -1;
|
if ($numero < 0) $numero *= -1;
|
||||||
if ($numero >= 1000000000001)
|
if ($numero >= 1000000000001)
|
||||||
return -1;
|
return -1;
|
||||||
// Get 2 decimals to cents, another functions round or truncate
|
// Get 2 decimals to cents, another functions round or truncate
|
||||||
$strnumber = number_format ($numero,10);
|
$strnumber = number_format($numero, 10);
|
||||||
$len=strlen($strnumber);
|
$len = strlen($strnumber);
|
||||||
for ($i=0; $i<$len; $i++)
|
for ($i = 0; $i < $len; $i++)
|
||||||
{
|
{
|
||||||
if ($strnumber[$i]=='.') {
|
if ($strnumber[$i] == '.') {
|
||||||
$parte_decimal = $strnumber[$i+1].$strnumber[$i+2];
|
$parte_decimal = $strnumber[$i + 1].$strnumber[$i + 2];
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*In dolibarr 3.6.2 (my current version) doesn't have $langs->default and
|
/*In dolibarr 3.6.2 (my current version) doesn't have $langs->default and
|
||||||
in case exist why ask $lang like a parameter?*/
|
in case exist why ask $lang like a parameter?*/
|
||||||
if (((is_object($langs) && $langs->default == 'es_MX') || (! is_object($langs) && $langs == 'es_MX')) && $numorcurrency == 'currency')
|
if (((is_object($langs) && $langs->default == 'es_MX') || (!is_object($langs) && $langs == 'es_MX')) && $numorcurrency == 'currency')
|
||||||
{
|
{
|
||||||
if ($numero>=1 && $numero<2) {
|
if ($numero >= 1 && $numero < 2) {
|
||||||
return ("UN PESO ".$parte_decimal." / 100 M.N.");
|
return ("UN PESO ".$parte_decimal." / 100 M.N.");
|
||||||
}
|
|
||||||
elseif ($numero>=0 && $numero<1){
|
|
||||||
return ("CERO PESOS ".$parte_decimal." / 100 M.N.");
|
|
||||||
}
|
|
||||||
elseif ($numero>=1000000 && $numero<1000001){
|
|
||||||
return ("UN MILLÓN DE PESOS ".$parte_decimal." / 100 M.N.");
|
|
||||||
}
|
|
||||||
elseif ($numero>=1000000000000 && $numero<1000000000001){
|
|
||||||
return ("UN BILLÓN DE PESOS ".$parte_decimal." / 100 M.N.");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$entexto ="";
|
|
||||||
$number = $numero;
|
|
||||||
if ($number >= 1000000000){
|
|
||||||
$CdMMillon = (int) ($numero / 100000000000);
|
|
||||||
$numero = $numero - $CdMMillon * 100000000000;
|
|
||||||
$DdMMillon = (int) ($numero / 10000000000);
|
|
||||||
$numero = $numero - $DdMMillon * 10000000000;
|
|
||||||
$UdMMillon = (int) ($numero / 1000000000);
|
|
||||||
$numero = $numero - $UdMMillon * 1000000000;
|
|
||||||
$entexto .= hundreds2text ($CdMMillon, $DdMMillon, $UdMMillon);
|
|
||||||
$entexto .= " MIL ";
|
|
||||||
}
|
}
|
||||||
if ($number >= 1000000){
|
elseif ($numero >= 0 && $numero < 1) {
|
||||||
$CdMILLON = (int) ($numero / 100000000);
|
return ("CERO PESOS ".$parte_decimal." / 100 M.N.");
|
||||||
$numero = $numero - $CdMILLON * 100000000;
|
|
||||||
$DdMILLON = (int) ($numero / 10000000);
|
|
||||||
$numero = $numero - $DdMILLON * 10000000;
|
|
||||||
$udMILLON = (int) ($numero / 1000000);
|
|
||||||
$numero = $numero - $udMILLON * 1000000;
|
|
||||||
$entexto .= hundreds2text ($CdMILLON, $DdMILLON, $udMILLON);
|
|
||||||
if (!$CdMMillon && !$DdMMillon && !$UdMMillon && !$CdMILLON && !$DdMILLON && $udMILLON==1)
|
|
||||||
$entexto .= " MILLÓN ";
|
|
||||||
else
|
|
||||||
$entexto .= " MILLONES ";
|
|
||||||
}
|
}
|
||||||
if ($number >= 1000) {
|
elseif ($numero >= 1000000 && $numero < 1000001) {
|
||||||
$cdm = (int) ($numero / 100000);
|
return ("UN MILLÓN DE PESOS ".$parte_decimal." / 100 M.N.");
|
||||||
$numero = $numero - $cdm * 100000;
|
}
|
||||||
$ddm = (int) ($numero / 10000);
|
elseif ($numero >= 1000000000000 && $numero < 1000000000001) {
|
||||||
$numero = $numero - $ddm * 10000;
|
return ("UN BILLÓN DE PESOS ".$parte_decimal." / 100 M.N.");
|
||||||
$udm = (int) ($numero / 1000);
|
}
|
||||||
$numero = $numero - $udm * 1000;
|
else {
|
||||||
$entexto .= hundreds2text ($cdm, $ddm, $udm);
|
$entexto = "";
|
||||||
if ($cdm || $ddm || $udm)
|
$number = $numero;
|
||||||
|
if ($number >= 1000000000) {
|
||||||
|
$CdMMillon = (int) ($numero / 100000000000);
|
||||||
|
$numero = $numero - $CdMMillon * 100000000000;
|
||||||
|
$DdMMillon = (int) ($numero / 10000000000);
|
||||||
|
$numero = $numero - $DdMMillon * 10000000000;
|
||||||
|
$UdMMillon = (int) ($numero / 1000000000);
|
||||||
|
$numero = $numero - $UdMMillon * 1000000000;
|
||||||
|
$entexto .= hundreds2text($CdMMillon, $DdMMillon, $UdMMillon);
|
||||||
$entexto .= " MIL ";
|
$entexto .= " MIL ";
|
||||||
|
}
|
||||||
|
if ($number >= 1000000) {
|
||||||
|
$CdMILLON = (int) ($numero / 100000000);
|
||||||
|
$numero = $numero - $CdMILLON * 100000000;
|
||||||
|
$DdMILLON = (int) ($numero / 10000000);
|
||||||
|
$numero = $numero - $DdMILLON * 10000000;
|
||||||
|
$udMILLON = (int) ($numero / 1000000);
|
||||||
|
$numero = $numero - $udMILLON * 1000000;
|
||||||
|
$entexto .= hundreds2text($CdMILLON, $DdMILLON, $udMILLON);
|
||||||
|
if (!$CdMMillon && !$DdMMillon && !$UdMMillon && !$CdMILLON && !$DdMILLON && $udMILLON == 1)
|
||||||
|
$entexto .= " MILLÓN ";
|
||||||
|
else
|
||||||
|
$entexto .= " MILLONES ";
|
||||||
|
}
|
||||||
|
if ($number >= 1000) {
|
||||||
|
$cdm = (int) ($numero / 100000);
|
||||||
|
$numero = $numero - $cdm * 100000;
|
||||||
|
$ddm = (int) ($numero / 10000);
|
||||||
|
$numero = $numero - $ddm * 10000;
|
||||||
|
$udm = (int) ($numero / 1000);
|
||||||
|
$numero = $numero - $udm * 1000;
|
||||||
|
$entexto .= hundreds2text($cdm, $ddm, $udm);
|
||||||
|
if ($cdm || $ddm || $udm)
|
||||||
|
$entexto .= " MIL ";
|
||||||
|
}
|
||||||
|
$c = (int) ($numero / 100);
|
||||||
|
$numero = $numero - $c * 100;
|
||||||
|
$d = (int) ($numero / 10);
|
||||||
|
$u = (int) $numero - $d * 10;
|
||||||
|
$entexto .= hundreds2text($c, $d, $u);
|
||||||
|
if (!$cdm && !$ddm && !$udm && !$c && !$d && !$u && $number > 1000000)
|
||||||
|
$entexto .= " DE";
|
||||||
|
$entexto .= " PESOS ".$parte_decimal." / 100 M.N.";
|
||||||
}
|
}
|
||||||
$c = (int) ($numero / 100);
|
return $entexto;
|
||||||
$numero = $numero - $c * 100;
|
|
||||||
$d = (int) ($numero / 10);
|
|
||||||
$u = (int) $numero - $d * 10;
|
|
||||||
$entexto .= hundreds2text ($c, $d, $u);
|
|
||||||
if (!$cdm && !$ddm && !$udm && !$c && !$d && !$u && $number>1000000)
|
|
||||||
$entexto .= " DE";
|
|
||||||
$entexto .= " PESOS ".$parte_decimal." / 100 M.N.";
|
|
||||||
}
|
}
|
||||||
return $entexto;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -237,40 +254,40 @@ function dolNumberToWord($numero, $langs, $numorcurrency='number')
|
|||||||
*/
|
*/
|
||||||
function hundreds2text($hundreds, $tens, $units)
|
function hundreds2text($hundreds, $tens, $units)
|
||||||
{
|
{
|
||||||
if ($hundreds==1 && $tens==0 && $units==0){
|
if ($hundreds == 1 && $tens == 0 && $units == 0) {
|
||||||
return "CIEN";
|
return "CIEN";
|
||||||
}
|
}
|
||||||
$centenas = array("CIENTO","DOSCIENTOS","TRESCIENTOS","CUATROCIENTOS","QUINIENTOS","SEISCIENTOS","SETECIENTOS","OCHOCIENTOS","NOVECIENTOS");
|
$centenas = array("CIENTO", "DOSCIENTOS", "TRESCIENTOS", "CUATROCIENTOS", "QUINIENTOS", "SEISCIENTOS", "SETECIENTOS", "OCHOCIENTOS", "NOVECIENTOS");
|
||||||
$decenas = array("","","TREINTA ","CUARENTA ","CINCUENTA ","SESENTA ","SETENTA ","OCHENTA ","NOVENTA ");
|
$decenas = array("", "", "TREINTA ", "CUARENTA ", "CINCUENTA ", "SESENTA ", "SETENTA ", "OCHENTA ", "NOVENTA ");
|
||||||
$veintis = array("VEINTE","VEINTIUN","VEINTIDÓS","VEINTITRÉS","VEINTICUATRO","VEINTICINCO","VEINTISÉIS","VEINTISIETE","VEINTIOCHO","VEINTINUEVE");
|
$veintis = array("VEINTE", "VEINTIUN", "VEINTIDÓS", "VEINTITRÉS", "VEINTICUATRO", "VEINTICINCO", "VEINTISÉIS", "VEINTISIETE", "VEINTIOCHO", "VEINTINUEVE");
|
||||||
$diecis = array("DIEZ","ONCE","DOCE","TRECE","CATORCE","QUINCE","DIECISÉIS","DIECISIETE","DIECIOCHO","DIECINUEVE");
|
$diecis = array("DIEZ", "ONCE", "DOCE", "TRECE", "CATORCE", "QUINCE", "DIECISÉIS", "DIECISIETE", "DIECIOCHO", "DIECINUEVE");
|
||||||
$unidades = array("UN","DOS","TRES","CUATRO","CINCO","SEIS","SIETE","OCHO","NUEVE");
|
$unidades = array("UN", "DOS", "TRES", "CUATRO", "CINCO", "SEIS", "SIETE", "OCHO", "NUEVE");
|
||||||
$entexto = "";
|
$entexto = "";
|
||||||
if ($hundreds!=0){
|
if ($hundreds != 0) {
|
||||||
$entexto .= $centenas[$hundreds-1];
|
$entexto .= $centenas[$hundreds - 1];
|
||||||
}
|
}
|
||||||
if ($tens>2){
|
if ($tens > 2) {
|
||||||
if ($hundreds!=0) $entexto .= " ";
|
if ($hundreds != 0) $entexto .= " ";
|
||||||
$entexto .= $decenas[$tens-1];
|
$entexto .= $decenas[$tens - 1];
|
||||||
if ($units!=0){
|
if ($units != 0) {
|
||||||
$entexto .= " Y ";
|
$entexto .= " Y ";
|
||||||
$entexto .= $unidades[$units-1];
|
$entexto .= $unidades[$units - 1];
|
||||||
}
|
}
|
||||||
return $entexto;
|
return $entexto;
|
||||||
}
|
}
|
||||||
elseif ($tens==2){
|
elseif ($tens == 2) {
|
||||||
if ($hundreds!=0) $entexto .= " ";
|
if ($hundreds != 0) $entexto .= " ";
|
||||||
$entexto .= " ".$veintis[$units];
|
$entexto .= " ".$veintis[$units];
|
||||||
return $entexto;
|
return $entexto;
|
||||||
}
|
}
|
||||||
elseif ($tens==1){
|
elseif ($tens == 1) {
|
||||||
if ($hundreds!=0) $entexto .= " ";
|
if ($hundreds != 0) $entexto .= " ";
|
||||||
$entexto .= $diecis[$units];
|
$entexto .= $diecis[$units];
|
||||||
return $entexto;
|
return $entexto;
|
||||||
}
|
}
|
||||||
if ($units!=0) {
|
if ($units != 0) {
|
||||||
if ($hundreds!=0 || $tens!=0) $entexto .= " ";
|
if ($hundreds != 0 || $tens != 0) $entexto .= " ";
|
||||||
$entexto .= $unidades[$units-1];
|
$entexto .= $unidades[$units - 1];
|
||||||
}
|
}
|
||||||
return $entexto;
|
return $entexto;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1826,7 +1826,6 @@ function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanag
|
|||||||
}
|
}
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
if ($object->lines[$i]->special_code == 3) return '';
|
|
||||||
if (empty($hidedetails) || $hidedetails > 1) $result.=$langs->transnoentitiesnoconv($object->lines[$i]->getLabelOfUnit('short'));
|
if (empty($hidedetails) || $hidedetails > 1) $result.=$langs->transnoentitiesnoconv($object->lines[$i]->getLabelOfUnit('short'));
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
@@ -2072,7 +2071,7 @@ function pdf_getTotalQty($object,$type,$outputlangs)
|
|||||||
*/
|
*/
|
||||||
function pdf_getLinkedObjects($object,$outputlangs)
|
function pdf_getLinkedObjects($object,$outputlangs)
|
||||||
{
|
{
|
||||||
global $hookmanager;
|
global $db, $hookmanager;
|
||||||
|
|
||||||
$linkedobjects=array();
|
$linkedobjects=array();
|
||||||
|
|
||||||
@@ -2128,8 +2127,13 @@ function pdf_getLinkedObjects($object,$outputlangs)
|
|||||||
// We concat this record info into fields xxx_value. title is overwrote.
|
// We concat this record info into fields xxx_value. title is overwrote.
|
||||||
if (empty($object->linkedObjects['commande']) && $object->element != 'commande') // There is not already a link to order and object is not the order, so we show also info with order
|
if (empty($object->linkedObjects['commande']) && $object->element != 'commande') // There is not already a link to order and object is not the order, so we show also info with order
|
||||||
{
|
{
|
||||||
$elementobject->fetchObjectLinked();
|
$elementobject->fetchObjectLinked(null, '', null, '', 'OR', 1, 'sourcetype', 0);
|
||||||
if (! empty($elementobject->linkedObjects['commande'])) $order = reset($elementobject->linkedObjects['commande']);
|
if (! empty($elementobject->linkedObjectsIds['commande'])){
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||||
|
$order = new Commande($db);
|
||||||
|
$ret = $order->fetch(reset($elementobject->linkedObjectsIds['commande']));
|
||||||
|
if ($ret < 1) { $order=null; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (! is_object($order))
|
if (! is_object($order))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1251,9 +1251,17 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
// Logo
|
// Logo
|
||||||
if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO))
|
if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO))
|
||||||
{
|
{
|
||||||
$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
|
|
||||||
if ($this->emetteur->logo)
|
if ($this->emetteur->logo)
|
||||||
{
|
{
|
||||||
|
$logodir = $conf->mycompany->dir_output;
|
||||||
|
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
|
||||||
|
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
|
||||||
|
{
|
||||||
|
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$logo = $logodir.'/logos/'.$this->emetteur->logo;
|
||||||
|
}
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
{
|
{
|
||||||
$height=pdf_getHeightForLogo($logo);
|
$height=pdf_getHeightForLogo($logo);
|
||||||
|
|||||||
@@ -1563,9 +1563,17 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
// Logo
|
// Logo
|
||||||
if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO))
|
if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO))
|
||||||
{
|
{
|
||||||
$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
|
|
||||||
if ($this->emetteur->logo)
|
if ($this->emetteur->logo)
|
||||||
{
|
{
|
||||||
|
$logodir = $conf->mycompany->dir_output;
|
||||||
|
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
|
||||||
|
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
|
||||||
|
{
|
||||||
|
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$logo = $logodir.'/logos/'.$this->emetteur->logo;
|
||||||
|
}
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
{
|
{
|
||||||
$height=pdf_getHeightForLogo($logo);
|
$height=pdf_getHeightForLogo($logo);
|
||||||
|
|||||||
@@ -1453,9 +1453,17 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
// Logo
|
// Logo
|
||||||
if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO))
|
if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO))
|
||||||
{
|
{
|
||||||
$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
|
|
||||||
if ($this->emetteur->logo)
|
if ($this->emetteur->logo)
|
||||||
{
|
{
|
||||||
|
$logodir = $conf->mycompany->dir_output;
|
||||||
|
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
|
||||||
|
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
|
||||||
|
{
|
||||||
|
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$logo = $logodir.'/logos/'.$this->emetteur->logo;
|
||||||
|
}
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
{
|
{
|
||||||
$height=pdf_getHeightForLogo($logo);
|
$height=pdf_getHeightForLogo($logo);
|
||||||
|
|||||||
@@ -1449,9 +1449,17 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
// Logo
|
// Logo
|
||||||
if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO))
|
if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO))
|
||||||
{
|
{
|
||||||
$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
|
|
||||||
if ($this->emetteur->logo)
|
if ($this->emetteur->logo)
|
||||||
{
|
{
|
||||||
|
$logodir = $conf->mycompany->dir_output;
|
||||||
|
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
|
||||||
|
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
|
||||||
|
{
|
||||||
|
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$logo = $logodir.'/logos/'.$this->emetteur->logo;
|
||||||
|
}
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
{
|
{
|
||||||
$height=pdf_getHeightForLogo($logo);
|
$height=pdf_getHeightForLogo($logo);
|
||||||
|
|||||||
@@ -766,7 +766,9 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
|||||||
|
|
||||||
$carac_client_name= pdfBuildThirdpartyName($thirdparty, $outputlangs);
|
$carac_client_name= pdfBuildThirdpartyName($thirdparty, $outputlangs);
|
||||||
|
|
||||||
$carac_client=pdf_build_address($outputlangs,$this->emetteur,$mysoc,((!empty($object->contact))?$object->contact:null),$usecontact,'target',$object);
|
$usecontact = 0;
|
||||||
|
|
||||||
|
$carac_client=pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ((!empty($object->contact))?$object->contact:null), $usecontact, 'target', $object);
|
||||||
|
|
||||||
// Show recipient
|
// Show recipient
|
||||||
$widthrecbox=90;
|
$widthrecbox=90;
|
||||||
|
|||||||
@@ -299,6 +299,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
|||||||
//Build array of quantity ordered by product
|
//Build array of quantity ordered by product
|
||||||
if (is_array($order->lines) && count($order->lines)>0) {
|
if (is_array($order->lines) && count($order->lines)>0) {
|
||||||
foreach($order->lines as $orderline) {
|
foreach($order->lines as $orderline) {
|
||||||
|
if (empty($conf->global->STOCK_SUPPORTS_SERVICES) && $orderline->product_type > 0) continue;
|
||||||
$qtyordred[$orderline->fk_product]+=$orderline->qty;
|
$qtyordred[$orderline->fk_product]+=$orderline->qty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2146,7 +2146,7 @@ class ExpenseReport extends CommonObject
|
|||||||
$sql = "SELECT DISTINCT ur.fk_user";
|
$sql = "SELECT DISTINCT ur.fk_user";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."user_rights as ur, ".MAIN_DB_PREFIX."rights_def as rd";
|
$sql.= " FROM ".MAIN_DB_PREFIX."user_rights as ur, ".MAIN_DB_PREFIX."rights_def as rd";
|
||||||
$sql.= " WHERE ur.fk_id = rd.id and rd.module = 'expensereport' AND rd.perms = 'approve'"; // Permission 'Approve';
|
$sql.= " WHERE ur.fk_id = rd.id and rd.module = 'expensereport' AND rd.perms = 'approve'"; // Permission 'Approve';
|
||||||
$sql.= "UNION";
|
$sql.= " UNION";
|
||||||
$sql.= " SELECT DISTINCT ugu.fk_user";
|
$sql.= " SELECT DISTINCT ugu.fk_user";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."usergroup_user as ugu, ".MAIN_DB_PREFIX."usergroup_rights as ur, ".MAIN_DB_PREFIX."rights_def as rd";
|
$sql.= " FROM ".MAIN_DB_PREFIX."usergroup_user as ugu, ".MAIN_DB_PREFIX."usergroup_rights as ur, ".MAIN_DB_PREFIX."rights_def as rd";
|
||||||
$sql.= " WHERE ugu.fk_usergroup = ur.fk_usergroup AND ur.fk_id = rd.id and rd.module = 'expensereport' AND rd.perms = 'approve'"; // Permission 'Approve';
|
$sql.= " WHERE ugu.fk_usergroup = ur.fk_usergroup AND ur.fk_id = rd.id and rd.module = 'expensereport' AND rd.perms = 'approve'"; // Permission 'Approve';
|
||||||
|
|||||||
@@ -27,10 +27,10 @@
|
|||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
require DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||||
require DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||||
require DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||||
require DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
||||||
|
|
||||||
$langs->loadLangs(array('bills', 'banks', 'companies', 'suppliers'));
|
$langs->loadLangs(array('bills', 'banks', 'companies', 'suppliers'));
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ if ($result > 0)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
print '<tr><td colspan="2">'.$langs->trans('Amount').'</td><td colspan="3">'.price($object->montant,'',$langs,0,0,-1,$conf->currency).'</td></tr>';
|
print '<tr><td colspan="2">'.$langs->trans('Amount').'</td><td colspan="3">'.price($object->amount,'',$langs,0,0,-1,$conf->currency).'</td></tr>';
|
||||||
|
|
||||||
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
|
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user