[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5017] branches/1.3
- Subject: SF.net SVN: ledger-smb:[5017] branches/1.3
- From: ..hidden..
- Date: Fri, 20 Jul 2012 07:09:38 +0000
Revision: 5017
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5017&view=rev
Author: einhverfr
Date: 2012-07-20 07:09:38 +0000 (Fri, 20 Jul 2012)
Log Message:
-----------
Default number format added.
This avoids cases where users have been automatically loaded but no corresponding user_preference row exists.
Previously one would see negative numbers formatted into positive ones, which is quite obviously wrong.
Modified Paths:
--------------
branches/1.3/Changelog
branches/1.3/LedgerSMB/Form.pm
Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog 2012-07-19 12:37:47 UTC (rev 5016)
+++ branches/1.3/Changelog 2012-07-20 07:09:38 UTC (rev 5017)
@@ -2,6 +2,9 @@
Initial Release: Monday, Oct 12 2011
Supported Presently
+Changelog for 1.3.21
+* Added a default numberformat in Form.pm (Chris T)
+
Changelog for 1.3.20
* Fixes for es_AR translation, duplicate keys removed (Andres B)
* Demo templates provide better handling of paragraph breaks in notes (Chris T)
Modified: branches/1.3/LedgerSMB/Form.pm
===================================================================
--- branches/1.3/LedgerSMB/Form.pm 2012-07-19 12:37:47 UTC (rev 5016)
+++ branches/1.3/LedgerSMB/Form.pm 2012-07-20 07:09:38 UTC (rev 5017)
@@ -843,13 +843,14 @@
$self = "" unless defined $self;
my $negative;
- $myconfig = "" unless defined $myconfig;
+ $myconfig = {} unless defined $myconfig;
$amount = "" unless defined $amount;
$places = "" unless defined $places;
$dash = "" unless defined $dash;
if ($self->{money_precision}){
$places= $self->{money_precision};
}
+ $myconfig->{numberformat} = '1000.00' unless $myconfig->{numberformat};
$amount = $self->parse_amount( $myconfig, $amount );
$negative = ( $amount < 0 );
$amount =~ s/-//;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.