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

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



Revision: 6134
          http://sourceforge.net/p/ledger-smb/code/6134
Author:   einhverfr
Date:     2013-10-17 04:42:20 +0000 (Thu, 17 Oct 2013)
Log Message:
-----------
Fixing batch printing not writing files to spool directory, merged from trunk

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/LedgerSMB/Template.pm

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2013-10-17 04:39:14 UTC (rev 6133)
+++ branches/1.3/Changelog	2013-10-17 04:42:20 UTC (rev 6134)
@@ -42,6 +42,7 @@
 * Fixed saving company saving incorrectly to DB (886, John L)
 * Can now search for batches/drafts without specifying a class (Erik H)
 * Added trigger to prevent transactions in closed periods (Chris T)
+* Fixed batch printing not writing files to print (Chris T)
 
 Chris T is Chris Travers
 Erik H is Erik Huelsmann

Modified: branches/1.3/LedgerSMB/Template.pm
===================================================================
--- branches/1.3/LedgerSMB/Template.pm	2013-10-17 04:39:14 UTC (rev 6133)
+++ branches/1.3/LedgerSMB/Template.pm	2013-10-17 04:42:20 UTC (rev 6134)
@@ -159,6 +159,8 @@
 use LedgerSMB::Mailer;
 use LedgerSMB::Company_Config;
 use LedgerSMB::Locale;
+use File::Copy "cp";
+use File::Copy;
 
 my $logger = Log::Log4perl->get_logger('LedgerSMB::Template');
 
@@ -357,6 +359,8 @@
         $method = '' if !defined $method;
 	if ('email' eq lc $method) {
 		$self->_email_output;
+        } elsif (defined $args{OUT}){ # To file
+                cp($self->{rendered}, $args{OUT}); 
 	} elsif ('print' eq lc $method) {
 		$self->_lpr_output;
 	} elsif (defined $self->{output} or lc $method eq 'screen') {

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


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits