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

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



Revision: 4103
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4103&view=rev
Author:   einhverfr
Date:     2011-11-27 03:34:25 +0000 (Sun, 27 Nov 2011)
Log Message:
-----------
Merging from branches/1.3

Modified Paths:
--------------
    trunk/Changelog
    trunk/LedgerSMB/Database.pm
    trunk/LedgerSMB/Form.pm
    trunk/LedgerSMB/Scripts/setup.pm
    trunk/LedgerSMB/Sysconfig.pm
    trunk/LedgerSMB/Template.pm
    trunk/UI/setup/confirm_operation.html
    trunk/UI/taxform/add_taxform.html
    trunk/bin/arap.pl
    trunk/lsmb-request.pl
    trunk/sql/Pg-database.sql
    trunk/templates/demo/balance_sheet.html

Property Changed:
----------------
    trunk/
    trunk/LedgerSMB/Scripts/admin.pm
    trunk/LedgerSMB/Scripts/employee.pm
    trunk/LedgerSMB/Scripts/file.pm
    trunk/LedgerSMB/Scripts/payment.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-4087
   + /branches/1.3:3711-4102

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2011-11-27 02:32:40 UTC (rev 4102)
+++ trunk/Changelog	2011-11-27 03:34:25 UTC (rev 4103)
@@ -9,31 +9,47 @@
 Initial Release:  Monday, Oct 12 2011
 Supported Presently
 
-Changelog for LedgerSMB 1.3.7
+Changelog for LedgerSMB 1.3.7 (Categorized due to length)
+Database
 * Added foreign key of entity_credit_account.language_code (Herman V)
-* Fixed pricelist button (customer/vendor) producing error (Chris T)
-* Fixed date error when processing recurring transactions (Chris T)
+* Corrected permissions issue for editing assembly (Chris T)
+
+Code and Administration
 * Exposed LedgerSMB::Sysconfig::tempdir to configuration file (Herman V)
 * Fixed invoice tempfiles never being cleaned up (Herman V)
 * Fixed LedgerSMB.pm warnings during tests (Herman V)
-* Allow log-level to be set from config file (Herman V)
+* Backup functionality moved to database administration interface (Chris T)
+* Whitespace adjustment in Pg-database (Herman V)
+* New form unsets $form->{header} to avoid lack of headers (Herman V)
+
+User Interface
+* Fixed pricelist button (customer/vendor) producing error (Chris T)
+* Fixed date error when processing recurring transactions (Chris T)
 * Corrected 'Invalid Year-end filter' when exporting trial balance (Chris T)
 * Correcting errors attaching and retriving URL attachments (Chris T)
-* Correcting history.css not found (Chris T)
 * Correcting parse errors in pos_template.txt (Chris T)
+* Database administration interface more consistent (Chris T)
 * Corrected Action not defined error on asset import (Chris T)
-* Corrected permissions issue for editing assembly (Chris T)
-* Database administration interface more consistent (Chris T)
-* Backup functionality moved to database administration interface (Chris T)
 * Default language handling for invoices (Herman V)
 * Fixed LaTeX errors in timecard templates (Chris T)
-* Reduced warnings in logs (Chris T)
 * Fixed error when batch printing timecards (Erik H)
 * Fixed menu reversal with batch printing (Erik H)
 * Removed broken edit buttons on bank account tab of contacts form (Chris T)
 * Corrected UI glitches involving adding employee contact info (Chris T)
 * Corrected missing translation call in contact template (Chris T)
+* Corrected UI glitch when processing recurring transactions (Chris T)
+* Corrected double escaping bug in balance sheet template (Erik H)
+* Corrected filtering of customers/vendors on AR/AP screens (Chris T)
+* Added logged in username to setup utility confirm operation screen (Chris T)
 
+Logging
+* Allow log-level to be set from config file (Herman V)
+* Correcting history.css not found (Chris T)
+* Reduced warnings in logs (Chris T)
+* Logging enhancements (Herman V)
+* Corrected error regarding css file not found (Erik H)
+
+
 Changelog for LedgerSMB 1.3.6
 * Including xelatex templates under directory templates/xedemo (Chris T)
 * Fix for company name in order entry (David B)

Modified: trunk/LedgerSMB/Database.pm
===================================================================
--- trunk/LedgerSMB/Database.pm	2011-11-27 02:32:40 UTC (rev 4102)
+++ trunk/LedgerSMB/Database.pm	2011-11-27 03:34:25 UTC (rev 4103)
@@ -159,6 +159,9 @@
 
 =over
 
+=item username
+Set to the user of the current connection
+
 =item appname
 Set to the current application name, one of:
 
@@ -280,10 +283,16 @@
            } else {
                 $retval->{status} = 'does not exist';
            }
+           my $sth = $dbh->prepare("SELECT SESSION_USER");
+           $sth->execute;
+           $retval->{username} = $sth->fetchrow_array();
            return $retval;
    } else { # Got a db handle... try to find the version and app by a few
             # different means
        my $sth;
+       $sth = $dbh->prepare("SELECT SESSION_USER");
+       $sth->execute;
+       $retval->{username} = $sth->fetchrow_array();
        # Legacy SL and LSMB
        $sth = $dbh->prepare('SELECT version FROM defaults');
        $sth->execute();

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2011-11-27 02:32:40 UTC (rev 4102)
+++ trunk/LedgerSMB/Form.pm	2011-11-27 03:34:25 UTC (rev 4103)
@@ -127,6 +127,12 @@
     }
     $self->{action} = "" unless defined $self->{action};
 
+    if($self->{header})
+    {
+     $logger->trace("self->{header}=$self->{header}");
+     delete $self->{header};
+     $logger->trace("self->{header} unset!!");
+    }
     if ( substr( $self->{action}, 0, 1 ) !~ /( |\.)/ ) {
         $self->{action} = lc $self->{action};
         $self->{action} =~ s/( |-|,|\#|\/|\.$)/_/g;
@@ -1691,7 +1697,7 @@
 # this sub gets the id and name from $table
 sub get_name {
 
-    my ( $self, $myconfig, $table, $transdate ) = @_;
+    my ( $self, $myconfig, $table, $transdate, $entity_class) = @_;
 
     my @queryargs;
     my $where;
@@ -1724,10 +1730,11 @@
              LEFT JOIN country_tax_form ctf ON (c.taxform_id = ctf.id)
 		 WHERE (lower(e.name) LIKE ?
 		       OR c.meta_number ILIKE ?)
+                       AND coalesce(?, c.entity_class) = c.entity_class
 		$where
 		ORDER BY e.name/;
 
-    unshift( @queryargs, $name, $self->{"${table}number"} );
+    unshift( @queryargs, $name, $self->{"${table}number"} , $entity_class);
     my $sth = $self->{dbh}->prepare($query);
     $sth->execute(@queryargs) || $self->dberror($query);
 


Property changes on: trunk/LedgerSMB/Scripts/admin.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4087
/branches/1.3/scripts/admin.pl:3711-3903
   + /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4102
/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-4087
/branches/1.3/scripts/employee.pl:3842-3843
   + /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4102
/branches/1.3/scripts/employee.pl:3842-3843


Property changes on: trunk/LedgerSMB/Scripts/file.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4087
/branches/1.3/scripts/file.pl:3711-4079
   + /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4102
/branches/1.3/scripts/file.pl:3711-4079


Property changes on: trunk/LedgerSMB/Scripts/payment.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4087
/branches/1.3/scripts/payment.pl:3711-4011
   + /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4102
/branches/1.3/scripts/payment.pl:3711-4011

Modified: trunk/LedgerSMB/Scripts/setup.pm
===================================================================
--- trunk/LedgerSMB/Scripts/setup.pm	2011-11-27 02:32:40 UTC (rev 4102)
+++ trunk/LedgerSMB/Scripts/setup.pm	2011-11-27 03:34:25 UTC (rev 4103)
@@ -57,6 +57,7 @@
                 password => $creds->{password}}
     );
     my $version_info = $database->get_info();
+    $request->{login_name} = $version_info->{username};
     if ($version_info->{appname} eq 'sql-ledger'){
          $request->{message} = 
              $request->{_locale}->text("SQL-Ledger database detected.");


Property changes on: trunk/LedgerSMB/Scripts/setup.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4087
/branches/1.3/scripts/setup.pl:3711-4079
   + /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4102
/branches/1.3/scripts/setup.pl:3711-4102

Modified: trunk/LedgerSMB/Sysconfig.pm
===================================================================
--- trunk/LedgerSMB/Sysconfig.pm	2011-11-27 02:32:40 UTC (rev 4102)
+++ trunk/LedgerSMB/Sysconfig.pm	2011-11-27 03:34:25 UTC (rev 4103)
@@ -158,15 +158,15 @@
     log4perl.appender.Screen.layout = SimpleLayout
     # Filter for debug level
     log4perl.filter.MatchDebug = Log::Log4perl::Filter::LevelMatch
-    log4perl.filter.MatchDebug.LevelToMatch = DEBUG
-    log4perl.filter.MatchDebug.AcceptOnMatch = true
+    log4perl.filter.MatchDebug.LevelToMatch = INFO
+    log4perl.filter.MatchDebug.AcceptOnMatch = false
 
-    # Filter for everything but debug level
+    # Filter for everything but debug,trace level
     log4perl.filter.MatchRest = Log::Log4perl::Filter::LevelMatch
-    log4perl.filter.MatchRest.LevelToMatch = DEBUG
-    log4perl.filter.MatchRest.AcceptOnMatch = false
+    log4perl.filter.MatchRest.LevelToMatch = INFO
+    log4perl.filter.MatchRest.AcceptOnMatch = true
 
-    # layout for DEBUG messages
+    # layout for DEBUG,TRACE messages
     log4perl.appender.Debug = Log::Log4perl::Appender::Screen
     log4perl.appender.Debug.layout = PatternLayout
     log4perl.appender.Debug.layout.ConversionPattern = %d - %p - %l -- %m%n
@@ -175,7 +175,7 @@
     # layout for non-DEBUG messages
     log4perl.appender.Basic = Log::Log4perl::Appender::Screen
     log4perl.appender.Basic.layout = PatternLayout
-    log4perl.appender.Basic.layout.ConversionPattern = %d - %p %m%n
+    log4perl.appender.Basic.layout.ConversionPattern = %d - %p - %C -- %m%n
     log4perl.appender.Basic.Filter = MatchRest
 );
 #some examples of loglevel setting for modules

Modified: trunk/LedgerSMB/Template.pm
===================================================================
--- trunk/LedgerSMB/Template.pm	2011-11-27 02:32:40 UTC (rev 4102)
+++ trunk/LedgerSMB/Template.pm	2011-11-27 03:34:25 UTC (rev 4103)
@@ -347,11 +347,13 @@
 		$name =~ s#^.*/##;
 		$disposition .= qq|\nContent-Disposition: attachment; filename="$name"|;
 	}
-	if ($self->{mimetype} =~ /^text/) {
+        if (!$ENV{LSMB_NOHEAD}){
+ 	    if ($self->{mimetype} =~ /^text/) {
 		print "Content-Type: $self->{mimetype}; charset=utf-8$disposition\n\n";
-	} else {
+	    } else {
 		print "Content-Type: $self->{mimetype}$disposition\n\n";
-	}
+	    }
+        }
 	binmode STDOUT, ':utf8';
 	print $data;
 }

Modified: trunk/UI/setup/confirm_operation.html
===================================================================
--- trunk/UI/setup/confirm_operation.html	2011-11-27 02:32:40 UTC (rev 4102)
+++ trunk/UI/setup/confirm_operation.html	2011-11-27 03:34:25 UTC (rev 4103)
@@ -6,6 +6,7 @@
 <h2><?lsmb text('Database Management Console') ?></h2>
 <div class="listtop"><?lsmb text('Confirm Operation') ?></div>
 <?lsmb # notice, message, and operation are all localized. ?>
+<div id="username"><?lsmb text('Logged in as') ?> <?lsmb login_name ?></div>
 <div id="notice"><?lsmb notice ?></div>
 <div id="message"><?lsmb message ?></div>
 <div id="operation"><?lsmb operation ?></div>

Modified: trunk/UI/taxform/add_taxform.html
===================================================================
--- trunk/UI/taxform/add_taxform.html	2011-11-27 02:32:40 UTC (rev 4102)
+++ trunk/UI/taxform/add_taxform.html	2011-11-27 03:34:25 UTC (rev 4103)
@@ -2,7 +2,7 @@
 	titlebar = text('Add TaxForm') # '
         stylesheet = stylesheet
 	include_stylesheet = [
-		"css/scriptsearch_resultss/create_batch.css"
+		"css/scripts/create_batch.css"
         ]
 ?>
 <?lsmb PROCESS 'elements.html'  # Include form elements helper. ?>

Modified: trunk/bin/arap.pl
===================================================================
--- trunk/bin/arap.pl	2011-11-27 02:32:40 UTC (rev 4102)
+++ trunk/bin/arap.pl	2011-11-27 03:34:25 UTC (rev 4103)
@@ -101,12 +101,18 @@
             $form->{oldinvtotal}  = 0;
             $form->{oldtotalpaid} = 0;
             $form->{calctax}      = 1;
+            if ($form->{vc} eq 'customer'){
+                $form->{entity_class} = 2;
+            } elsif ($form->{vc} eq 'vendor'){
+                $form->{entity_class} = 1;
+            }
 
             # return one name or a list of names in $form->{name_list}
             if (
                 (
                     $rv =
-                    $form->get_name( \%myconfig, $name, $form->{transdate} )
+                    $form->get_name( \%myconfig, $name, $form->{transdate} ,
+                                     $form->{entity_class})
                 ) > 1
               )
             {

Modified: trunk/lsmb-request.pl
===================================================================
--- trunk/lsmb-request.pl	2011-11-27 02:32:40 UTC (rev 4102)
+++ trunk/lsmb-request.pl	2011-11-27 03:34:25 UTC (rev 4103)
@@ -38,16 +38,17 @@
 
 my $logger = Log::Log4perl->get_logger('LedgerSMB::Handler');
 
-$logger->debug("Begin lsmb-request.pl");
+$logger->debug("Begin");
 
 # for custom preprocessing logic
 eval { require "custom.pl"; };
 
-$logger->debug("lsmb-request.pl: getting request");
+$logger->debug("getting request");
 
 my $request = new LedgerSMB;
 
-$logger->debug("lsmb-request.pl: Got request");
+$logger->debug("Got request");
+$logger->trace("\$request=".Data::Dumper::Dumper($request));
 
 $request->{action} = '__default' if (!$request->{action});
 
@@ -78,7 +79,7 @@
 # Prevent flooding the error logs with undestroyed connection warnings
 $request->{dbh}->disconnect()
     if defined $request->{dbh};
-$logger->debug("End lsmb-request.pl");
+$logger->debug("End");
 
 
 sub call_script {

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2011-11-27 02:32:40 UTC (rev 4102)
+++ trunk/sql/Pg-database.sql	2011-11-27 03:34:25 UTC (rev 4103)
@@ -679,7 +679,7 @@
     middle_name text,
     last_name text check (last_name ~ '[[:alnum:]_]') NOT NULL,
     created date not null default current_date,
-    unique(entity_id) -- needed due to entity_emplyee assumptions --CT
+    unique(entity_id) -- needed due to entity_employee assumptions --CT
  );
  
 COMMENT ON TABLE person IS $$ Every person, must have an entity to derive a common or display name. The correct way to get class information on a person would be person.entity_id->entity_class_to_entity.entity_id. $$;


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-4087
/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-4102
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710

Modified: trunk/templates/demo/balance_sheet.html
===================================================================
--- trunk/templates/demo/balance_sheet.html	2011-11-27 02:32:40 UTC (rev 4102)
+++ trunk/templates/demo/balance_sheet.html	2011-11-27 03:34:25 UTC (rev 4103)
@@ -152,7 +152,7 @@
 </tr>
 
 <tr valign="top">
-  <th align="left" colspan="2" style="text-transform: uppercase"><?lsmb escape(text('Total Liabilities & Equity')) ?></th>
+  <th align="left" colspan="2" style="text-transform: uppercase"><?lsmb text('Total Liabilities & Equity') ?></th>
   <td align="right"><?lsmb total_this_period ?><br /><hr noshade="noshade" size="2" /></td>
   <td align="right"><?lsmb total_last_period ?><br /><hr noshade="noshade" size="2" /></td>
 </tr>

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