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

SF.net SVN: ledger-smb:[4125] branches/1.3



Revision: 4125
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4125&view=rev
Author:   einhverfr
Date:     2011-12-02 09:27:24 +0000 (Fri, 02 Dec 2011)
Log Message:
-----------
Correcting menu issue with cash/vouchers/receipts
Making template subclasses set their own stdout binmodes

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/LedgerSMB/Template/CSV.pm
    branches/1.3/LedgerSMB/Template/HTML.pm
    branches/1.3/LedgerSMB/Template/LaTeX.pm
    branches/1.3/LedgerSMB/Template/ODS.pm
    branches/1.3/LedgerSMB/Template/TXT.pm
    branches/1.3/LedgerSMB/Template/XLS.pm
    branches/1.3/LedgerSMB/Template.pm
    branches/1.3/sql/modules/Fixes.sql

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2011-12-01 21:55:16 UTC (rev 4124)
+++ branches/1.3/Changelog	2011-12-02 09:27:24 UTC (rev 4125)
@@ -2,6 +2,9 @@
 Initial Release:  Monday, Oct 12 2011
 Supported Presently
 
+Changelog for 1.3.8:
+* Fixed duplicate key error saving taxes (Herman V)
+
 Changelog for LedgerSMB 1.3.7 (Categorized due to length)
 Database
 * Added foreign key of entity_credit_account.language_code (Herman V)

Modified: branches/1.3/LedgerSMB/Template/CSV.pm
===================================================================
--- branches/1.3/LedgerSMB/Template/CSV.pm	2011-12-01 21:55:16 UTC (rev 4124)
+++ branches/1.3/LedgerSMB/Template/CSV.pm	2011-12-02 09:27:24 UTC (rev 4125)
@@ -45,8 +45,9 @@
 use Template;
 use LedgerSMB::Template::TTI18N;
 
-binmode STDOUT, ':utf8';
-binmode STDERR, ':utf8';
+my $binmode = ':utf8';
+binmode STDOUT, $binmode;
+binmode STDERR, $binmode;
 
 sub get_template {
 	my $name = shift;
@@ -89,6 +90,7 @@
 	my $template;
 	my $source;
 	my $output;
+        $parent->{binmode} = $binmode;
 
 	if ($parent->{outputfile}) {
 		$output = "$parent->{outputfile}.csv";

Modified: branches/1.3/LedgerSMB/Template/HTML.pm
===================================================================
--- branches/1.3/LedgerSMB/Template/HTML.pm	2011-12-01 21:55:16 UTC (rev 4124)
+++ branches/1.3/LedgerSMB/Template/HTML.pm	2011-12-02 09:27:24 UTC (rev 4125)
@@ -51,8 +51,9 @@
 use Template;
 use LedgerSMB::Template::TTI18N;
 
-binmode STDOUT, ':utf8';
-binmode STDERR, ':utf8';
+my $binmode = ':utf8';
+binmode STDOUT, $binmode;
+binmode STDERR, $binmode;
 
 sub get_template {
     my $name = shift;
@@ -103,6 +104,8 @@
 	my $template;
 	my $output;
 	my $source;
+        $parent->{binmode} = $binmode;
+         
 	
 	if ($parent->{outputfile}) {
 		$output = "$parent->{outputfile}.html";

Modified: branches/1.3/LedgerSMB/Template/LaTeX.pm
===================================================================
--- branches/1.3/LedgerSMB/Template/LaTeX.pm	2011-12-01 21:55:16 UTC (rev 4124)
+++ branches/1.3/LedgerSMB/Template/LaTeX.pm	2011-12-02 09:27:24 UTC (rev 4125)
@@ -58,6 +58,10 @@
 use Template::Latex;
 use LedgerSMB::Template::TTI18N;
 
+my $binmode = undef;
+binmode STDOUT, $binmode;
+binmode STDERR, $binmode;
+
 my $logger = Log::Log4perl->get_logger('LedgerSMB::Template::LaTeX');
 
 sub get_template {
@@ -118,6 +122,7 @@
 	$parent->{outputfile} ||=
 		"${LedgerSMB::Sysconfig::tempdir}/$parent->{template}-output-$$";
 
+        $parent->{binmode} = $binmode;
 	if (ref $parent->{template} eq 'SCALAR') {
 		$source = $parent->{template};
 	} elsif (ref $parent->{template} eq 'ARRAY') {

Modified: branches/1.3/LedgerSMB/Template/ODS.pm
===================================================================
--- branches/1.3/LedgerSMB/Template/ODS.pm	2011-12-01 21:55:16 UTC (rev 4124)
+++ branches/1.3/LedgerSMB/Template/ODS.pm	2011-12-02 09:27:24 UTC (rev 4125)
@@ -55,6 +55,10 @@
 use OpenOffice::OODoc;
 use LedgerSMB::Template::TTI18N;
 
+my $binmode = undef;
+binmode STDOUT, $binmode;
+binmode STDERR, $binmode;
+
 # SC: The ODS handlers need these vars in common
 my $ods;
 my $rowcount;
@@ -825,6 +829,7 @@
 	my $source;
 	my $tempdir = ${LedgerSMB::Sysconfig::tempdir};
 	my $output = '';
+        $parent->{binmode} = $binmode;
 	$parent->{outputfile} ||= "$tempdir/$parent->{template}-output-$$";
 
 	if (ref $parent->{template} eq 'SCALAR') {

Modified: branches/1.3/LedgerSMB/Template/TXT.pm
===================================================================
--- branches/1.3/LedgerSMB/Template/TXT.pm	2011-12-01 21:55:16 UTC (rev 4124)
+++ branches/1.3/LedgerSMB/Template/TXT.pm	2011-12-02 09:27:24 UTC (rev 4125)
@@ -48,6 +48,10 @@
 use Template;
 use LedgerSMB::Template::TTI18N;
 
+my $binmode = ':utf8';
+binmode STDOUT, $binmode;
+binmode STDERR, $binmode;
+
 sub get_extension {
     my ($parent) = shift;
     if ($parent->{format_args}->{extension}){
@@ -74,6 +78,7 @@
 	my $template;
 	my $source;
 	my $output;
+        $parent->{binmode} = $binmode;
 	if ($parent->{outputfile}) {
 		$output = "$parent->{outputfile}.". get_extension($parent);
 	} else {

Modified: branches/1.3/LedgerSMB/Template/XLS.pm
===================================================================
--- branches/1.3/LedgerSMB/Template/XLS.pm	2011-12-01 21:55:16 UTC (rev 4124)
+++ branches/1.3/LedgerSMB/Template/XLS.pm	2011-12-02 09:27:24 UTC (rev 4125)
@@ -55,7 +55,11 @@
 use CGI::Simple::Standard qw(:html);
 use Excel::Template::Plus;
 use LedgerSMB::Template::TTI18N;
+my $binmode = ':utf8';
+binmode STDOUT, $binmode;
+binmode STDERR, $binmode;
 
+
 sub get_template {
 	my $name = shift;
 	return "${name}.xlst";
@@ -92,6 +96,7 @@
 	my $template;
 	my $source;
 	my $tempdir = ${LedgerSMB::Sysconfig::tempdir};
+        $parent->{binmode} = $binmode;
 	$parent->{outputfile} ||= "$tempdir/$parent->{template}-output-$$";
 
 	if (ref $parent->{template} eq 'SCALAR') {

Modified: branches/1.3/LedgerSMB/Template.pm
===================================================================
--- branches/1.3/LedgerSMB/Template.pm	2011-12-01 21:55:16 UTC (rev 4124)
+++ branches/1.3/LedgerSMB/Template.pm	2011-12-02 09:27:24 UTC (rev 4125)
@@ -153,6 +153,7 @@
 	$self->{language} = $args{language};
 	$self->{no_escape} = $args{no_escape};
 	$self->{debug} = $args{debug};
+        $self->{binmode} = undef;
 	$self->{outputfile} =
 		"${LedgerSMB::Sysconfig::tempdir}/$args{output_file}" if
 		$args{output_file};
@@ -333,15 +334,7 @@
 		$data = "";
                 $logger->trace("begin DATA < self->{rendered}=$self->{rendered} \$self->{format}=$self->{format}");
 		open (DATA, '<', $self->{rendered});
-                #avoiding utf8 "\xCD" does not map to Unicode at LedgerSMB/Template.pm line 342, <DATA> line 155.
-                if($self->{format} eq 'LaTeX')
-                {
-                 binmode DATA, ':raw';
-                }
-                else
-                {
-                 binmode DATA, ':utf8';
-                }
+                binmode DATA, $self->{binmode};
 		while (my $line = <DATA>){
 			$data .= $line;
 		}
@@ -364,15 +357,7 @@
 		print "Content-Type: $self->{mimetype}$disposition\n\n";
 	    }
         }
-        $logger->trace("begin print to STDOUT");
-        if($self->{format} eq 'LaTeX')
-        {
-         binmode STDOUT, ':raw';
-        }
-        else
-        {
-         binmode STDOUT, ':utf8';
-        }
+	binmode STDOUT, $self->{binmode};
 	print $data;
         $logger->trace("end print to STDOUT");
 }

Modified: branches/1.3/sql/modules/Fixes.sql
===================================================================
--- branches/1.3/sql/modules/Fixes.sql	2011-12-01 21:55:16 UTC (rev 4124)
+++ branches/1.3/sql/modules/Fixes.sql	2011-12-02 09:27:24 UTC (rev 4125)
@@ -35,6 +35,9 @@
 DELETE FROM menu_attribute WHERE node_id BETWEEN 133 AND 135;
 DELETE FROM menu_node      WHERE id      BETWEEN 133 AND 135;
 
+-- bad batch type for receipt batches
+update menu_attribute set value = 'receipt' where node_id = 203 and attribute='batch_type';
+
 COMMIT;
 
 BEGIN;

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