[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[4754] trunk



Revision: 4754
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4754&view=rev
Author:   einhverfr
Date:     2012-05-22 14:51:22 +0000 (Tue, 22 May 2012)
Log Message:
-----------
Merging from branches/1.3

Modified Paths:
--------------
    trunk/LedgerSMB/PGNumber.pm
    trunk/UI/reconciliation/report.html

Property Changed:
----------------
    trunk/
    trunk/LedgerSMB/Scripts/account.pm
    trunk/LedgerSMB/Scripts/admin.pm
    trunk/LedgerSMB/Scripts/customer.pm
    trunk/LedgerSMB/Scripts/employee.pm
    trunk/LedgerSMB/Scripts/file.pm
    trunk/LedgerSMB/Scripts/journal.pm
    trunk/LedgerSMB/Scripts/login.pm
    trunk/LedgerSMB/Scripts/menu.pm
    trunk/LedgerSMB/Scripts/payment.pm
    trunk/LedgerSMB/Scripts/recon.pm
    trunk/LedgerSMB/Scripts/setup.pm
    trunk/LedgerSMB/Scripts/taxform.pm
    trunk/LedgerSMB/Scripts/vendor.pm
    trunk/sql/upgrade/1.2-1.3-manual.sql


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3:3711-4750
   + /branches/1.3:3711-4753

Modified: trunk/LedgerSMB/PGNumber.pm
===================================================================
--- trunk/LedgerSMB/PGNumber.pm	2012-05-22 14:41:32 UTC (rev 4753)
+++ trunk/LedgerSMB/PGNumber.pm	2012-05-22 14:51:22 UTC (rev 4754)
@@ -62,16 +62,71 @@
 =cut
 
 our $lsmb_formats = {
-      "1000.00" => { thousands_sep => '',  decimal_sep => '.' },
+      "1000.00" => { thousands_sep => '',  decimal_sep => '.', 
+                         formatter => sub { return Number::Format::new(
+                                                     -thousands_sep => '',
+                                                     -decimal_point => '.',
+                                                        -neg_format => 'x'
+                                                    ); }
+                    },
 
-      "1000,00" => { thousands_sep => '',  decimal_sep => ',' },
-     "1 000.00" => { thousands_sep => ' ', decimal_sep => '.' },
-     "1 000,00" => { thousands_sep => ' ', decimal_sep => ',' },
-     "1,000.00" => { thousands_sep => ',', decimal_sep => '.' },
-     "1.000,00" => { thousands_sep => '.', decimal_sep => ',' },
-     "1'000,00" => { thousands_sep => "'", decimal_sep => ',' },
-     "1'000.00" => { thousands_sep => "'", decimal_sep => '.' },
+      "1000,00" => { thousands_sep => '',  decimal_sep => ',' ,
+                         formatter => sub { return Number::Format::new(
+                                                     -thousands_sep => '',
+                                                     -decimal_point => ',',
+                                                        -neg_format => 'x'
+                                                    ); }
+                    },
 
+     "1 000.00" => { thousands_sep => ' ', decimal_sep => '.' ,
+                         formatter => sub { return Number::Format::new(
+                                                     -thousands_sep => ' ',
+                                                     -decimal_point => '.',
+                                                        -neg_format => 'x'
+                                                    ); }
+                    },
+
+     "1 000,00" => { thousands_sep => ' ', decimal_sep => ',' ,
+                         formatter => sub { return Number::Format::new(
+                                                     -thousands_sep => ' ',
+                                                     -decimal_point => ',',
+                                                        -neg_format => 'x'
+                                                    ); }
+                    },
+
+     "1,000.00" => { thousands_sep => ',', decimal_sep => '.' ,
+                         formatter => sub { return Number::Format::new(
+                                                     -thousands_sep => ',',
+                                                     -decimal_point => '.',
+                                                        -neg_format => 'x'
+                                                    ); }
+                    },
+
+     "1.000,00" => { thousands_sep => '.', decimal_sep => ',' ,
+                         formatter => sub { return Number::Format::new(
+                                                     -thousands_sep => '.',
+                                                     -decimal_point => ',',
+                                                        -neg_format => 'x'
+                                                    ); }
+                    },
+
+     "1'000,00" => { thousands_sep => "'", decimal_sep => ',' ,
+                         formatter => sub { return Number::Format::new(
+                                                     -thousands_sep => "'",
+                                                     -decimal_point => ',',
+                                                        -neg_format => 'x'
+                                                    ); }
+                    },
+
+     "1'000.00" => { thousands_sep => "'", decimal_sep => '.' ,
+                         formatter => sub { return Number::Format::new(
+                                                     -thousands_sep => "'",
+                                                     -decimal_point => '.',
+                                                        -neg_format => 'x'
+                                                    ); }
+                    },
+
+
 };
 
 =back
@@ -136,10 +191,8 @@
         my $format = ($args{format}) ? $args{format}
                               : $LedgerSMB::App_State::User->{numberformat};
         die 'LedgerSMB::PGNumber No Format Set' if !$format;
-        my $formatter = new Number::Format(
-                    -thousands_sep => $lsmb_formats->{$format}->{thousands_sep},
-                    -decimal_point => $lsmb_formats->{$format}->{decimal_sep},
-        );
+        die "bad format: $format" if !$lsmb_formats->{$format};
+        my $formatter = &$lsmb_formats->{$format}->{formatter};
         $newval = $formatter->unformat_number($string);
         $pgnum = Math::BigFloat->new($newval);
         $self->round_mode('+inf');
@@ -195,12 +248,11 @@
     my $zfill = ($places > 0) ? 1 : 0;
     $dplaces = 10 unless defined $dplaces;
     my $ts = $lsmb_formats->{$format}->{thousands_sep};
-    my $formatter = Number::Format::new(
-                    -thousands_sep => $ts,
-                    -decimal_point => $lsmb_formats->{$format}->{decimal_sep},
-                    -decimal_fill => $zfill,
-                       -neg_format => 'x'
-                );   
+    
+    die "bad format: $format" if !$lsmb_formats->{$format};
+    warn $format;
+    warn &{$lsmb_formats->{$format}->{formatter}};
+    my $formatter = &$lsmb_formats->{$format}->{formatter};
     $str = $formatter->format_number($str, $dplaces);
 
     my $neg_format = (defined $args{neg_format}) ? $args{neg_format} : 'def';


Property changes on: trunk/LedgerSMB/Scripts/account.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/account.pm:4369-4750
/branches/1.3/scripts/account.pl:3711-4368
   + /branches/1.3/LedgerSMB/Scripts/account.pm:4369-4753
/branches/1.3/scripts/account.pl:3711-4368


Property changes on: trunk/LedgerSMB/Scripts/admin.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4750
/branches/1.3/scripts/admin.pl:3711-4678
   + /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4753
/branches/1.3/scripts/admin.pl:3711-4678


Property changes on: trunk/LedgerSMB/Scripts/customer.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/customer.pm:4288-4750
/branches/1.3/scripts/customer.pl:4273-4287
   + /branches/1.3/LedgerSMB/Scripts/customer.pm:4288-4753
/branches/1.3/scripts/customer.pl:4273-4287


Property changes on: trunk/LedgerSMB/Scripts/employee.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4750
/branches/1.3/scripts/employee.pl:3842-3843,4273-4287,4289-4310
   + /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4753
/branches/1.3/scripts/employee.pl:3842-3843,4273-4287,4289-4310


Property changes on: trunk/LedgerSMB/Scripts/file.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4750
/branches/1.3/scripts/file.pl:3711-4138
   + /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4753
/branches/1.3/scripts/file.pl:3711-4138


Property changes on: trunk/LedgerSMB/Scripts/journal.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/journal.pm:4288-4750
/branches/1.3/scripts/journal.pl:3711-4328
   + /branches/1.3/LedgerSMB/Scripts/journal.pm:4288-4753
/branches/1.3/scripts/journal.pl:3711-4328


Property changes on: trunk/LedgerSMB/Scripts/login.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/login.pm:4193-4750
/branches/1.3/scripts/login.pl:3711-4192
   + /branches/1.3/LedgerSMB/Scripts/login.pm:4193-4753
/branches/1.3/scripts/login.pl:3711-4192


Property changes on: trunk/LedgerSMB/Scripts/menu.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/menu.pm:4155-4750
/branches/1.3/scripts/menu.pl:3711-4192,4273-4287
   + /branches/1.3/LedgerSMB/Scripts/menu.pm:4155-4753
/branches/1.3/scripts/menu.pl:3711-4192,4273-4287


Property changes on: trunk/LedgerSMB/Scripts/payment.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4750
/branches/1.3/scripts/payment.pl:3711-4680
   + /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4753
/branches/1.3/scripts/payment.pl:3711-4680


Property changes on: trunk/LedgerSMB/Scripts/recon.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/recon.pm:3711-4750
/branches/1.3/scripts/recon.pl:4194-4271,4273-4287,4393-4438
   + /branches/1.3/LedgerSMB/Scripts/recon.pm:3711-4753
/branches/1.3/scripts/recon.pl:4194-4271,4273-4287,4393-4438


Property changes on: trunk/LedgerSMB/Scripts/setup.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4750
/branches/1.3/scripts/setup.pl:3711-4550
   + /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4753
/branches/1.3/scripts/setup.pl:3711-4550


Property changes on: trunk/LedgerSMB/Scripts/taxform.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/taxform.pm:4193-4750
/branches/1.3/scripts/taxform.pl:3711-4192,4273-4287
   + /branches/1.3/LedgerSMB/Scripts/taxform.pm:4193-4753
/branches/1.3/scripts/taxform.pl:3711-4192,4273-4287


Property changes on: trunk/LedgerSMB/Scripts/vendor.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/vendor.pm:4288-4750
/branches/1.3/scripts/vendor.pl:4273-4287
   + /branches/1.3/LedgerSMB/Scripts/vendor.pm:4288-4753
/branches/1.3/scripts/vendor.pl:4273-4287

Modified: trunk/UI/reconciliation/report.html
===================================================================
--- trunk/UI/reconciliation/report.html	2012-05-22 14:41:32 UTC (rev 4753)
+++ trunk/UI/reconciliation/report.html	2012-05-22 14:51:22 UTC (rev 4754)
@@ -15,6 +15,7 @@
 <tr>
   <th><?lsmb text('Reconciliation Date:') ?></th><td><?lsmb end_date ?></td>
 </tr>
+<?lsmb IF ! approved ?>
 <tr>
  <th><?lsmb text('Beginning Statement Balance:') ?></th>
  <td><?lsmb beginning_balance ?></td>
@@ -43,6 +44,7 @@
 </tr>
 <tr>
   <th><?lsmb text('Ending GL Balance:') ?></th><td><?lsmb statement_gl_calc ?></td>
+<?lsmb END ?>
 </tr>
 </table>
 <br />


Property changes on: trunk/sql/upgrade/1.2-1.3-manual.sql
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-4750
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710
   + /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-4753
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.