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

SF.net SVN: ledger-smb: [1178] branches/1.2



Revision: 1178
          http://svn.sourceforge.net/ledger-smb/?rev=1178&view=rev
Author:   einhverfr
Date:     2007-05-10 16:31:38 -0700 (Thu, 10 May 2007)

Log Message:
-----------
Adding a number of bugfixes

Modified Paths:
--------------
    branches/1.2/CONTRIBUTORS
    branches/1.2/Changelog
    branches/1.2/LedgerSMB/CP.pm
    branches/1.2/LedgerSMB/Form.pm
    branches/1.2/LedgerSMB/GL.pm
    branches/1.2/LedgerSMB/IS.pm
    branches/1.2/VERSION
    branches/1.2/bin/is.pl
    branches/1.2/bin/pos.pl

Modified: branches/1.2/CONTRIBUTORS
===================================================================
--- branches/1.2/CONTRIBUTORS	2007-05-09 18:26:23 UTC (rev 1177)
+++ branches/1.2/CONTRIBUTORS	2007-05-10 23:31:38 UTC (rev 1178)
@@ -57,6 +57,9 @@
 Matt S Trout, <mst @ shadowcatsystems.co.uk> CPAN: MSTROUT, 
 IRC: mst#irc.perl.org contributed the initial Makefile.PL
 
+Ashley Gittins contributed <agittins @ purple.dropbear.id.au> has contributed 
+some performance fixes and has contributed a great deal of work to our web site.
+
 Original Authors of SQL-Ledger:
 ===================================
 Dieter Simader <dsimader @ sql-ledger.com>

Modified: branches/1.2/Changelog
===================================================================
--- branches/1.2/Changelog	2007-05-09 18:26:23 UTC (rev 1177)
+++ branches/1.2/Changelog	2007-05-10 23:31:38 UTC (rev 1178)
@@ -1,3 +1,4 @@
+
 Changelog for 1.2.5
 * Partsgroup handling corrected on POS and Sales invoice screens (Chris T)
 * Closed books handling is corrected (Chris T)
@@ -9,6 +10,7 @@
 * Corrected Exchange Rate display issue (CHris T).
 * Corrected number parsing issues with 1.000,00 formats (Chris T).
 * Corrected a number of date handling issues and added tests (Seneca).
+* Applied invoice performance patch from Ashley Gittins (Chris T)
 
 Changelog for 1.2.4
 * Fixed internal functions avgcost() and lastcost() to not use float (Joshua D)

Modified: branches/1.2/LedgerSMB/CP.pm
===================================================================
--- branches/1.2/LedgerSMB/CP.pm	2007-05-09 18:26:23 UTC (rev 1177)
+++ branches/1.2/LedgerSMB/CP.pm	2007-05-10 23:31:38 UTC (rev 1178)
@@ -270,7 +270,7 @@
     my $spoolfile;
 
     while ( $ref = $sth->fetchrow_hashref(NAME_lc) ) {
-
+        $form->db_parse_numeric(sth=>$sth, hashref=>$ref);
         # if this is a foreign currency transaction get exchangerate
         $ref->{exchangerate} =
           $form->get_exchangerate( $dbh, $ref->{curr}, $ref->{transdate},
@@ -394,7 +394,9 @@
 
             my $sth = $dbh->prepare($query);
             $sth->execute( $form->{currency}, $form->{"id_$i"} );
-            my ($exchangerate) = $sth->fetchrow_array();
+            my @exchange = $sth->fetchrow_array();
+            $form->db_parse_numeric(sth=>$sth, arrayref=>..hidden..);
+            my $exchangerate = shift @exchange;
 
             $exchangerate = 1 unless $exchangerate;
 

Modified: branches/1.2/LedgerSMB/Form.pm
===================================================================
--- branches/1.2/LedgerSMB/Form.pm	2007-05-09 18:26:23 UTC (rev 1177)
+++ branches/1.2/LedgerSMB/Form.pm	2007-05-10 23:31:38 UTC (rev 1178)
@@ -2328,6 +2328,7 @@
 
         # store amounts in {acc_trans}{$key} for multiple accounts
         while ( my $ref = $sth->fetchrow_hashref(NAME_lc) ) {
+            $self->db_parse_numeric(sth=>$sth, hashref=>$ref);
             $ref->{exchangerate} =
               $self->get_exchangerate( $dbh, $self->{currency},
                 $ref->{transdate}, $fld );

Modified: branches/1.2/LedgerSMB/GL.pm
===================================================================
--- branches/1.2/LedgerSMB/GL.pm	2007-05-09 18:26:23 UTC (rev 1177)
+++ branches/1.2/LedgerSMB/GL.pm	2007-05-10 23:31:38 UTC (rev 1178)
@@ -439,7 +439,7 @@
     $sth->execute || $form->dberror($query);
 
     while ( my $ref = $sth->fetchrow_hashref(NAME_lc) ) {
-
+        $form->db_parse_numeric(sth=>$sth, hashref=>$ref);
         # gl
         if ( $ref->{type} eq "gl" ) {
             $ref->{module} = "gl";
@@ -531,6 +531,7 @@
         $sth->execute( $form->{id} ) || $form->dberror($query);
 
         while ( $ref = $sth->fetchrow_hashref(NAME_lc) ) {
+            $form->db_parse_numeric(sth=>$sth, hashref=>$ref);
 
             if ( $ref->{fx_transaction} ) {
                 $form->{transfer} = 1;

Modified: branches/1.2/LedgerSMB/IS.pm
===================================================================
--- branches/1.2/LedgerSMB/IS.pm	2007-05-09 18:26:23 UTC (rev 1177)
+++ branches/1.2/LedgerSMB/IS.pm	2007-05-10 23:31:38 UTC (rev 1178)
@@ -101,6 +101,8 @@
         # account numbers
         $pth->execute( $form->{"id_$i"} );
         $ref = $pth->fetchrow_hashref(NAME_lc);
+        $form->db_parse_numeric(sth=>$pth, hashref=>$ref);
+
         for ( keys %$ref ) { $form->{"${_}_$i"} = $ref->{$_} }
         $pth->finish;
 
@@ -1307,7 +1309,7 @@
 					            transdate, source, 
 					            fx_transaction, cleared)
 					     VALUES (?, (SELECT id FROM chart
-					                   WHERE accno = >),
+					                   WHERE accno = ?),
 					            ?, ?, ?, '1', ?)|;
 
                 $sth = $dbh->prepare($query);

Modified: branches/1.2/VERSION
===================================================================
--- branches/1.2/VERSION	2007-05-09 18:26:23 UTC (rev 1177)
+++ branches/1.2/VERSION	2007-05-10 23:31:38 UTC (rev 1178)
@@ -1 +1 @@
-1.2.5 
+1.2.6 

Modified: branches/1.2/bin/is.pl
===================================================================
--- branches/1.2/bin/is.pl	2007-05-09 18:26:23 UTC (rev 1177)
+++ branches/1.2/bin/is.pl	2007-05-10 23:31:38 UTC (rev 1178)
@@ -105,8 +105,7 @@
 
     $form->{oldlanguage_code} = $form->{language_code};
 
-    $form->get_partsgroup( \%myconfig,
-        { language_code => $form->{language_code}, searchitems => 'nolabor' } );
+    $form->get_partsgroup( \%myconfig, { all => 1 });
 
     if ( @{ $form->{all_partsgroup} } ) {
         $form->{selectpartsgroup} = "<option>\n";

Modified: branches/1.2/bin/pos.pl
===================================================================
--- branches/1.2/bin/pos.pl	2007-05-09 18:26:23 UTC (rev 1177)
+++ branches/1.2/bin/pos.pl	2007-05-10 23:31:38 UTC (rev 1178)
@@ -278,13 +278,7 @@
         if ( $form->{language_code} ne $form->{oldlanguage_code} ) {
 
             # rebuild partsgroup
-            $form->get_partsgroup(
-                \%myconfig,
-                {
-                    language_code => $form->{language_code},
-                    searchitems   => 'nolabor'
-                }
-            );
+            $form->get_partsgroup(\%myconfig, { all => 1});
             $form->{partsgroup} = "";
             for ( @{ $form->{all_partsgroup} } ) {
                 $form->{partsgroup} .= "$_->{partsgroup}--$_->{translation}\n";


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