|
From: <dai...@us...> - 2011-09-22 10:09:26
|
Revision: 4702
http://web-erp.svn.sourceforge.net/web-erp/?rev=4702&view=rev
Author: daintree
Date: 2011-09-22 10:09:20 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
number_formats
Modified Paths:
--------------
trunk/GLAccountReport.php
trunk/includes/LanguageSetup.php
trunk/includes/MiscFunctions.php
Modified: trunk/GLAccountReport.php
===================================================================
--- trunk/GLAccountReport.php 2011-09-22 02:33:04 UTC (rev 4701)
+++ trunk/GLAccountReport.php 2011-09-22 10:09:20 UTC (rev 4702)
@@ -121,9 +121,9 @@
$LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,150,$FontSize, _('Brought Forward Balance'));
if ($RunningTotal < 0 ){ //its a credit balance b/fwd
- $LeftOvers = $pdf->addTextWrap(210,$YPos,50,$FontSize, locale_money_format(-$RunningTotal,2) , 'right');
+ $LeftOvers = $pdf->addTextWrap(210,$YPos,50,$FontSize, locale_money_format(-$RunningTotal,$_SESSION['CompanyRecord']['decimalplaces']) , 'right');
} else { //its a debit balance b/fwd
- $LeftOvers = $pdf->addTextWrap(160,$YPos,50,$FontSize, locale_money_format($RunningTotal,2) , 'right');
+ $LeftOvers = $pdf->addTextWrap(160,$YPos,50,$FontSize, locale_money_format($RunningTotal,$_SESSION['CompanyRecord']['decimalplaces']) , 'right');
}
}
$PeriodTotal = 0;
Modified: trunk/includes/LanguageSetup.php
===================================================================
--- trunk/includes/LanguageSetup.php 2011-09-22 02:33:04 UTC (rev 4701)
+++ trunk/includes/LanguageSetup.php 2011-09-22 10:09:20 UTC (rev 4702)
@@ -66,14 +66,17 @@
if (defined('LC_MESSAGES')){ //it's a unix/linux server
$LocaleSet = setlocale (LC_MESSAGES, $_SESSION['Language']);
- $LocaleSet = setlocale (LC_NUMERIC, $_SESSION['Language']);
+ $LocaleSet = setlocale (LC_ALL, $_SESSION['Language']);
} else { // it's a windows server
$LocaleSet = setlocale (LC_ALL, $LanguagesArray[$_SESSION['Language']]['WindowsLocale']);
}
-//$LocaleSet = setlocale (LC_NUMERIC, 'nl_NL.utf8');
+//$LocaleSet = setlocale (LC_NUMERIC, 'fr_FR.utf8','fr_FR');
$LocaleInfo = localeconv();
+//echo '<br/>Thousands separator = ' . strlen($LocaleInfo['thousands_sep']);
+//echo '<br/>Mon Thousands separator = ' . strlen($LocaleInfo['mon_thousands_sep']);
+
if ($LocaleInfo['mon_decimal_point']==''){
$LocaleInfo['mon_decimal_point']= $LocaleInfo['decimal_point'];
}
Modified: trunk/includes/MiscFunctions.php
===================================================================
--- trunk/includes/MiscFunctions.php 2011-09-22 02:33:04 UTC (rev 4701)
+++ trunk/includes/MiscFunctions.php 2011-09-22 10:09:20 UTC (rev 4702)
@@ -329,6 +329,6 @@
function filter_number_format($Number) {
global $LocaleInfo;
$Number = trim($Number);
- return str_replace($LocaleInfo['decimal_point'],'.',str_replace($LocaleInfo['thousands_sep'],'',$Number));
+ return str_replace($LocaleInfo['decimal_point'],'.',str_replace($LocaleInfo['thousands_sep'],'',str_replace($LocaleInfo['mon_thousands_sep'],'',$Number)));
}
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|