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

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



Revision: 1336
          http://svn.sourceforge.net/ledger-smb/?rev=1336&view=rev
Author:   einhverfr
Date:     2007-06-27 08:57:40 -0700 (Wed, 27 Jun 2007)

Log Message:
-----------
* Fixed ..hidden.. logins
* Fixed closed books detection 
* Fixed AR/AP print and post endless loop 

Modified Paths:
--------------
    branches/1.2/Changelog
    branches/1.2/LedgerSMB/Form.pm
    branches/1.2/LedgerSMB/Mailer.pm
    branches/1.2/LedgerSMB/Session/DB.pm
    branches/1.2/VERSION
    branches/1.2/bin/arapprn.pl
    branches/1.2/dists/rpm/ledgersmb.spec
    branches/1.2/dists/source/build.sh

Modified: branches/1.2/Changelog
===================================================================
--- branches/1.2/Changelog	2007-06-27 15:54:11 UTC (rev 1335)
+++ branches/1.2/Changelog	2007-06-27 15:57:40 UTC (rev 1336)
@@ -1,3 +1,8 @@
+Changelog for 1.2.7
+* Fixed ..hidden.. logins (Chris T)
+* Fixed closed books detection (Chris T)
+* Fixed AR/AP print and post endless loop (Chris T)
+
 Changelog for 1.2.6
 * More date tests added (Seneca)
 * Fixed customer_id error in AP transactions (Chris T)
@@ -7,6 +12,7 @@
 * Fixed error searching for customer by address (Chris T)
 * Fixed error db error saving items with custom fields (Chris T)
 * Fixed db error saving project with NULL customer id (Chris T)
+* Improved upgrade_templates' tag handling (Seneca)
 
 Changelog for 1.2.5
 * Partsgroup handling corrected on POS and Sales invoice screens (Chris T)

Modified: branches/1.2/LedgerSMB/Form.pm
===================================================================
--- branches/1.2/LedgerSMB/Form.pm	2007-06-27 15:54:11 UTC (rev 1335)
+++ branches/1.2/LedgerSMB/Form.pm	2007-06-27 15:57:40 UTC (rev 1336)
@@ -76,14 +76,14 @@
         $self->{nextsub} =~ s/( |-|,|\#|\/|\.$)/_/g;
     }
 
-    $self->{login} =~ s/[^a-zA-Z0-9._+@'-]//g;
+    $self->{login} =~ s/[^a-zA-Z0-9._+\@'-]//g;
 
     $self->{menubar} = 1 if $self->{path} =~ /lynx/i;
 
     #menubar will be deprecated, replaced with below
     $self->{lynx} = 1 if $self->{path} =~ /lynx/i;
 
-    $self->{version}   = "1.2.6";
+    $self->{version}   = "1.2.7";
     $self->{dbversion} = "1.2.0";
 
     bless $self, $type;
@@ -2340,32 +2340,26 @@
 
         $sth->finish;
 
-        for (qw(curr closedto revtrans)) {
-            $query = qq|
-				SELECT value FROM defaults 
-				 WHERE setting_key = '$_'|;
 
-            $sth = $dbh->prepare($query);
-            $sth->execute || $self->dberror($query);
-
-            ($val) = $sth->fetchrow_array();
-            if ( $_ eq 'curr' ) {
-                $self->{currencies} = $val;
-            }
-            else {
-                $self->{$_} = $val;
-            }
-            $sth->finish;
-        }
-
     }
     else {
 
-        for (qw(curr closedto revtrans)) {
-            $query = qq|
+        if ( !$self->{"$self->{vc}_id"} ) {
+            $self->lastname_used( $myconfig, $dbh, $vc, $module );
+        }
+    }
+        for (qw(current_date curr closedto revtrans)) {
+            if ($_ eq 'current_date'){
+                $query = "SELECT $_";
+            } elsif ($_ eq 'closedto'){
+                $query = qq|
+				SELECT value::date FROM defaults 
+				 WHERE setting_key = '$_'|;
+            } else {
+                $query = qq|
 				SELECT value FROM defaults 
 				 WHERE setting_key = '$_'|;
-
+            }
             $sth = $dbh->prepare($query);
             $sth->execute || $self->dberror($query);
 
@@ -2378,13 +2372,7 @@
             }
             $sth->finish;
         }
-        
-	$self->{transdate} = $self->current_date;
-        if ( !$self->{"$self->{vc}_id"} ) {
-            $self->lastname_used( $myconfig, $dbh, $vc, $module );
-        }
-    }
-
+    $self->{transdate} = $self->{current_date} if (!$self->{id});
     $self->all_vc( $myconfig, $vc, $module, $dbh, $self->{transdate}, $job );
     $self->{dbh}->commit;
 }

Modified: branches/1.2/LedgerSMB/Mailer.pm
===================================================================
--- branches/1.2/LedgerSMB/Mailer.pm	2007-06-27 15:54:11 UTC (rev 1335)
+++ branches/1.2/LedgerSMB/Mailer.pm	2007-06-27 15:57:40 UTC (rev 1336)
@@ -50,10 +50,13 @@
     my ($self) = @_;
 
     my $domain = $self->{from};
+    my $boundary = time;
+    $boundary = "LSMB-$boundary";
     $domain =~ s/(.*?\@|>)//g;
     my $msgid = "..hidden..";
 
     $self->{contenttype} = "text/plain" unless $self->{contenttype};
+    my $msgid = "..hidden..";
 
     my %h;
     for (qw(from to cc bcc)) {
@@ -77,7 +80,9 @@
         'Subject' => $self->{subject},
         'Type'    => 'TEXT',
         'Data'    => $self->{message},
+        'Message-ID' => $msg_id,
     );
+    $msg->attr("Content-Type" => $self->{contenttype});
     $msg->add( 'Disposition-Notification-To' => $self->{from} )
       if $self->{notify};
     $msg->replace( 'X-Mailer' => "LedgerSMB $self->{version}" );

Modified: branches/1.2/LedgerSMB/Session/DB.pm
===================================================================
--- branches/1.2/LedgerSMB/Session/DB.pm	2007-06-27 15:54:11 UTC (rev 1335)
+++ branches/1.2/LedgerSMB/Session/DB.pm	2007-06-27 15:57:40 UTC (rev 1336)
@@ -170,7 +170,7 @@
 # this is assuming that $form->{login} is safe, which might be a bad assumption
 # so, I'm going to remove some chars, which might make previously valid logins invalid
     my $login = $form->{login};
-    $login =~ s/[^a-zA-Z0-9._+@'-]//g;
+    $login =~ s/[^a-zA-Z0-9._+\@'-]//g;
 
     #delete any existing stale sessions with this login if they exist
     if ( !$myconfig{timeout} ) {
@@ -211,7 +211,7 @@
     my ($form) = @_;
 
     my $login = $form->{login};
-    $login =~ s/[^a-zA-Z0-9._+@'-]//g;
+    $login =~ s/[^a-zA-Z0-9._+\@'-]//g;
 
     # use the central database handle
     my $dbh = ${LedgerSMB::Sysconfig::GLOBALDBH};
@@ -236,7 +236,7 @@
 
     my ( $form, $username, $password ) = @_;
 
-    $username =~ s/[^a-zA-Z0-9._+@'-]//g;
+    $username =~ s/[^a-zA-Z0-9._+\@'-]//g;
 
     # use the central database handle
     my $dbh = ${LedgerSMB::Sysconfig::GLOBALDBH};

Modified: branches/1.2/VERSION
===================================================================
--- branches/1.2/VERSION	2007-06-27 15:54:11 UTC (rev 1335)
+++ branches/1.2/VERSION	2007-06-27 15:57:40 UTC (rev 1336)
@@ -1 +1 @@
-1.2.6 
+1.2.7 

Modified: branches/1.2/bin/arapprn.pl
===================================================================
--- branches/1.2/bin/arapprn.pl	2007-06-27 15:54:11 UTC (rev 1335)
+++ branches/1.2/bin/arapprn.pl	2007-06-27 15:57:40 UTC (rev 1336)
@@ -132,6 +132,8 @@
     }
 
     if ( $form->{printandpost} ) {
+        delete $form->{printandpost};
+        $form->{action} = 'post';
         &post;
     }
     else {

Modified: branches/1.2/dists/rpm/ledgersmb.spec
===================================================================
--- branches/1.2/dists/rpm/ledgersmb.spec	2007-06-27 15:54:11 UTC (rev 1335)
+++ branches/1.2/dists/rpm/ledgersmb.spec	2007-06-27 15:57:40 UTC (rev 1336)
@@ -1,7 +1,7 @@
 # RPM spec written for and tested on Fedora Core 6
 Summary: LedgerSMB - Open Source accounting software
 Name: ledgersmb
-Version: 1.2.6
+Version: 1.2.7
 Release: 1
 License: GPL
 URL: http://www.ledgersmb.org/

Modified: branches/1.2/dists/source/build.sh
===================================================================
--- branches/1.2/dists/source/build.sh	2007-06-27 15:54:11 UTC (rev 1335)
+++ branches/1.2/dists/source/build.sh	2007-06-27 15:57:40 UTC (rev 1336)
@@ -9,8 +9,8 @@
    pgdoc="true";
 fi
 
-version="1.2.6";
-rpmversion="1.2.6";
+version="1.2.7";
+#rpmversion="1.2.6";
 build_d="../release";
 
 if test -d blib; then


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