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

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



Revision: 3937
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3937&view=rev
Author:   einhverfr
Date:     2011-10-27 22:53:26 +0000 (Thu, 27 Oct 2011)
Log Message:
-----------
Merging from 1.3

Modified Paths:
--------------
    trunk/Changelog
    trunk/LedgerSMB/AA.pm
    trunk/LedgerSMB/Scripts/setup.pm
    trunk/LedgerSMB.pm
    trunk/UI/Contact/contact.html
    trunk/bin/aa.pl
    trunk/dists/source/build.sh

Property Changed:
----------------
    trunk/
    trunk/LedgerSMB/Scripts/admin.pm
    trunk/LedgerSMB/Scripts/employee.pm
    trunk/LedgerSMB/Scripts/setup.pm
    trunk/sql/upgrade/1.2-1.3-manual.sql


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3:3711-3926
   + /branches/1.3:3711-3936

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2011-10-27 13:48:00 UTC (rev 3936)
+++ trunk/Changelog	2011-10-27 22:53:26 UTC (rev 3937)
@@ -15,6 +15,9 @@
 * Fix for is_zero issue with latest Math::BigFloat in AR/AP trans (Chris T)
 * Fix for inability to save employee country (Chris T)
 * API inconsistency fixed (Chris T)
+* Fix for translation string standardization (Herman V)
+* Fix for AP posting issue with 1.000,00 number format (Herman V)
+* Database upgrade within 1.3 now possible from setup.pl (Chris T)
 
 Changelog for LedgerSMB 1.3.2
 * Fixed a few files where suExec fixes were not applied (Chris T)

Modified: trunk/LedgerSMB/AA.pm
===================================================================
--- trunk/LedgerSMB/AA.pm	2011-10-27 13:48:00 UTC (rev 3936)
+++ trunk/LedgerSMB/AA.pm	2011-10-27 22:53:26 UTC (rev 3937)
@@ -127,6 +127,8 @@
     my $accno;
     # add taxes
     foreach $accno (@taxaccounts) {
+        #tshvr HV parse first or problem at aa.pl create_links $form->{"${akey}_$form->{acc_trans}{$key}->[$i-1]->{accno}"}=$form->{acc_trans}{$key}->[ $i - 1 ]->{amount} * $ml; 123,45 * -1  gives 123 !!
+        $form->{"tax_$accno"}=$form->parse_amount($myconfig,$form->{"tax_$accno"});
         $form->{"tax_$accno"} *= -1 if $form->{reverse};
         $fxtax += $tax{fxamount}{$accno} = $form->{"tax_$accno"};
         $tax += $tax{fxamount}{$accno};


Property changes on: trunk/LedgerSMB/Scripts/admin.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-3926
/branches/1.3/scripts/admin.pl:3711-3903
   + /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-3936
/branches/1.3/scripts/admin.pl:3711-3903


Property changes on: trunk/LedgerSMB/Scripts/employee.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-3926
/branches/1.3/scripts/employee.pl:3842-3843
   + /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-3936
/branches/1.3/scripts/employee.pl:3842-3843

Modified: trunk/LedgerSMB/Scripts/setup.pm
===================================================================
--- trunk/LedgerSMB/Scripts/setup.pm	2011-10-27 13:48:00 UTC (rev 3936)
+++ trunk/LedgerSMB/Scripts/setup.pm	2011-10-27 22:53:26 UTC (rev 3937)
@@ -89,7 +89,15 @@
             );
             $request->{operation} = $request->{_locale}->text('Cancel?');
             $request->{next_action} = 'cancel';
-            
+         
+         } elsif ($version_info->{version} eq '1.3') {
+             $request->{message} = $request->{_locale}->text(
+                 'LedgerSMB 1.3 found'   
+             );
+             $request->{operation} = $request->{_locale}->text(
+                    'Rebuild/Upgrade?'
+             );
+             $request->{next_action} = 'rebuild_modules';
          } else {
             $request->{message} = $request->{_locale}->text(
                  'Unknown version found.'
@@ -606,6 +614,48 @@
     __default(@_);
 }
 
+=item rebuild_modules
+
+This method rebuilds the modules and sets the version setting in the defaults
+table to the version of the LedgerSMB request object.  This is used when moving
+between versions on a stable branch (typically upgrading)
+
+=cut
+
+sub rebuild_modules {
+    my ($request) = @_;
+    my $creds = LedgerSMB::Auth::get_credentials();
+    my $database = LedgerSMB::Database->new(
+               {username => $creds->{username},
+            company_name => $request->{database},
+                password => $creds->{password}}
+    );
+
+    # ENVIRONMENT NECESSARY
+    $ENV{PGUSER} = $creds->{login};
+    $ENV{PGPASSWORD} = $creds->{password};
+    $ENV{PGDATABASE} = $request->{database};
+    
+    $database->load_modules('LOADORDER');
+    # Credentials set above via environment variables --CT
+    $request->{dbh} = DBI->connect("dbi:Pg:dbname=$request->{database}");
+    my $dbh = $request->{dbh};
+    my $sth = $dbh->prepare(
+          'UPDATE defaults SET value = ? WHERE setting_key = ?'
+    );
+    $sth->execute($request->{dbversion}, 'version');
+    $sth->finish;
+    $dbh->commit;
+    $dbh->disconnect;
+    my $template = LedgerSMB::Template->new(
+            path => 'UI/setup',
+            template => 'complete',
+            format => 'HTML',
+    );
+    $template->render($request);
+
+}
+
 =back
 
 =head1 COPYRIGHT


Property changes on: trunk/LedgerSMB/Scripts/setup.pm
___________________________________________________________________
Added: svn:mergeinfo
   + /branches/1.3/scripts/setup.pl:3711-3936

Modified: trunk/LedgerSMB.pm
===================================================================
--- trunk/LedgerSMB.pm	2011-10-27 13:48:00 UTC (rev 3936)
+++ trunk/LedgerSMB.pm	2011-10-27 22:53:26 UTC (rev 3937)
@@ -239,7 +239,7 @@
     $logger->debug("Begin LedgerSMB.pm");
 
     $self->{version} = $VERSION;
-    $self->{dbversion} = "1.3.0";
+    $self->{dbversion} = "1.3.3";
     
     bless $self, $type;
     $logger->debug("LedgerSMB::new: \$argstr = $argstr");

Modified: trunk/UI/Contact/contact.html
===================================================================
--- trunk/UI/Contact/contact.html	2011-10-27 13:48:00 UTC (rev 3936)
+++ trunk/UI/Contact/contact.html	2011-10-27 22:53:26 UTC (rev 3937)
@@ -96,7 +96,7 @@
                 name = "entity_id"
                value = entity_id
 } ?>	
-<div class="input" id="person_name_div"><?lsmb #text('Name:')?>&nbsp;
+<div class="input" id="person_name_div"><?lsmb #text('Name')?>&nbsp;
 <div class="input_group">
 <!-- TODO:  Add Saluatation -->
 <?lsmb PROCESS input element_data = {

Modified: trunk/bin/aa.pl
===================================================================
--- trunk/bin/aa.pl	2011-10-27 13:48:00 UTC (rev 3936)
+++ trunk/bin/aa.pl	2011-10-27 22:53:26 UTC (rev 3937)
@@ -1255,8 +1255,10 @@
     $form->{paidaccounts} = $j;
 
     $form->{creditremaining} -=
-      ( $form->{invtotal} - $totalpaid + $form->{oldtotalpaid} -
-          $form->{oldinvtotal} );
+      ( $form->parse_amount(\%myconfig, $form->{invtotal}) 
+        - $form->parse_amount(\%myconfig, $totalpaid) 
+        + $form->parse_amount(\%myconfig, $form->{oldtotalpaid}) 
+        - $form->parse_amount(\%myconfig, $form->{oldinvtotal}) );
     $form->{oldinvtotal}  = $form->{invtotal};
     $form->{oldtotalpaid} = $totalpaid;
 

Modified: trunk/dists/source/build.sh
===================================================================
--- trunk/dists/source/build.sh	2011-10-27 13:48:00 UTC (rev 3936)
+++ trunk/dists/source/build.sh	2011-10-27 22:53:26 UTC (rev 3937)
@@ -2,7 +2,7 @@
 
 # Simple script to prepare for release
 
-version="1.4-snapshot20111019";
+version="1.4-snapshot20111026";
 build_d="../release";
 
 if test -d $build_d/ledgersmb; then


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-3926
/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-3936
/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.