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

SF.net SVN: ledger-smb:[4113] branches/1.3/LedgerSMB/Tax.pm



Revision: 4113
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4113&view=rev
Author:   tshvr
Date:     2011-11-28 22:24:43 +0000 (Mon, 28 Nov 2011)
Log Message:
-----------
comment unused var,comment method to empty array,logging

Modified Paths:
--------------
    branches/1.3/LedgerSMB/Tax.pm

Modified: branches/1.3/LedgerSMB/Tax.pm
===================================================================
--- branches/1.3/LedgerSMB/Tax.pm	2011-11-28 14:36:15 UTC (rev 4112)
+++ branches/1.3/LedgerSMB/Tax.pm	2011-11-28 22:24:43 UTC (rev 4113)
@@ -29,21 +29,25 @@
 
 use Math::BigFloat;
 
+my $logger = Log::Log4perl->get_logger('Tax');
+
 sub init_taxes {
     my ( $form, $taxaccounts, $taxaccounts2 ) = @_;
     my $dbh = $form->{dbh};
     @taxes = ();
     my @accounts = split / /, $taxaccounts;
     if ( defined $taxaccounts2 ) {
-        my @tmpaccounts = @accounts;
-        $#accounts = -1;
+        #my @tmpaccounts = @accounts;#unused var
+        $#accounts = -1;# empty @accounts,@accounts=();
         for my $acct ( split / /, $taxaccounts2 ) {
             if ( $taxaccounts =~ /\b$acct\b/ ) {
                 push @accounts, $acct;
             }
         }
-
     }
+    else{
+     $logger->trace("taxaccounts2 undefined");
+    }
     my $query = qq|
 		SELECT t.taxnumber, c.description,
 			t.rate, t.chart_id, t.pass, m.taxmodulename
@@ -79,7 +83,7 @@
         $tax->value( Math::BigFloat->bzero() );
 
         push @taxes, $tax;
-        $sth->finish;
+        $sth->finish;#should this not be out of foreach loop?, to examine
     }
     return @taxes;
 }

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