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

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



Revision: 3815
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3815&view=rev
Author:   einhverfr
Date:     2011-10-08 03:29:38 +0000 (Sat, 08 Oct 2011)
Log Message:
-----------
merging from branches/1.3

Modified Paths:
--------------
    trunk/LedgerSMB/Form.pm
    trunk/LedgerSMB/Template/LaTeX.pm
    trunk/LedgerSMB/Template.pm
    trunk/bin/arapprn.pl
    trunk/templates/demo/invoice.tex

Property Changed:
----------------
    trunk/


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3:3711-3812
   + /branches/1.3:3711-3814

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2011-10-08 03:21:41 UTC (rev 3814)
+++ trunk/LedgerSMB/Form.pm	2011-10-08 03:29:38 UTC (rev 3815)
@@ -1048,12 +1048,6 @@
         'order' => {
             html => [ '<',  '>', '\n', '\r' ],
             txt  => [ '\n', '\r' ],
-            tex  => [
-                quotemeta('\\'), '&', '\n', '\r',
-                '\$',            '%', '_',  '#',
-                quotemeta('^'),  '{', '}',  '<',
-                '>',             'Â'
-            ]
         },
         html => {
             '<'  => '&lt;',
@@ -1062,22 +1056,6 @@
             '\r' => '<br />'
         },
         txt => { '\n' => "\n", '\r' => "\r" },
-        tex => {
-            '&'             => '\&',
-            '$'             => '\$',
-            '%'             => '\%',
-            '_'             => '\_',
-            '#'             => '\#',
-            quotemeta('^')  => '\^\\',
-            '{'             => '\{',
-            '}'             => '\}',
-            '<'             => '$<$',
-            '>'             => '$>$',
-            '\n'            => '\newline ',
-            '\r'            => '\newline ',
-            'Â'            => '\pounds ',
-            quotemeta('\\') => '/'
-        }
     );
 
     my $key;

Modified: trunk/LedgerSMB/Template/LaTeX.pm
===================================================================
--- trunk/LedgerSMB/Template/LaTeX.pm	2011-10-08 03:21:41 UTC (rev 3814)
+++ trunk/LedgerSMB/Template/LaTeX.pm	2011-10-08 03:29:38 UTC (rev 3815)
@@ -102,7 +102,8 @@
             $vars =~ s/â/--/g;
             $vars =~ s/[ââ]/---/g;
             $vars =~ s/"(.*)"/``$1''/gs;
-            $vars =~ s/\n/\n\n/gm;
+            $vars =~ s/\n/\\\\/gm;
+            $vars =~ s/\\\\\\\\/\n\n/g;
     }
     return $vars;
 }

Modified: trunk/LedgerSMB/Template.pm
===================================================================
--- trunk/LedgerSMB/Template.pm	2011-10-08 03:21:41 UTC (rev 3814)
+++ trunk/LedgerSMB/Template.pm	2011-10-08 03:29:38 UTC (rev 3815)
@@ -259,7 +259,7 @@
 	} else {
 		$cleanvars = $format->can('preprocess')->($vars);
 	}
-
+        $cleanvars->{escape} = sub { return $format->escape(@_)};
 	if (UNIVERSAL::isa($self->{locale}, 'LedgerSMB::Locale')){
 		$cleanvars->{text} = sub { return $self->escape($self->{locale}->text(@_))};
 	} 

Modified: trunk/bin/arapprn.pl
===================================================================
--- trunk/bin/arapprn.pl	2011-10-08 03:21:41 UTC (rev 3814)
+++ trunk/bin/arapprn.pl	2011-10-08 03:29:38 UTC (rev 3815)
@@ -174,8 +174,6 @@
           $form->{"projectnumber_$i"};
         $form->{tempdescription} = $form->{"description_$i"};
 
-        $form->format_string(
-            qw(tempaccno tempaccount tempprojectnumber tempdescription));
 
         push( @{ $form->{accno} },         $form->{tempaccno} );
         push( @{ $form->{account} },       $form->{tempaccount} );

Modified: trunk/templates/demo/invoice.tex
===================================================================
--- trunk/templates/demo/invoice.tex	2011-10-08 03:21:41 UTC (rev 3814)
+++ trunk/templates/demo/invoice.tex	2011-10-08 03:29:38 UTC (rev 3815)
@@ -14,13 +14,21 @@
 
 \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
 
+<?lsmb BLOCK multiline -?>
+\begin{minipage}{2in}
+\medskip
+\raggedright
+<?lsmb string ?>
+\end{minipage}
+<?lsmb- END -?>
+
 \newsavebox{\ftr}
 \sbox{\ftr}{
   \parbox{\textwidth}{
   \tiny
   \rule[1.5em]{\textwidth}{0.5pt}
 <?lsmb text('Payment due NET [_1] Days from date of Invoice.', terms) ?>
-<?lsmb text('Interest on overdue amounts will acrue at the rate of 12\% per annum starting from [_1] until paid in full. Items returned are subject to a 10\% restocking charge.', duedate) ?>
+<?lsmb text('Interest on overdue amounts will acrue at the rate of 12% per annum starting from [_1] until paid in full. Items returned are subject to a 10% restocking charge.', duedate) ?>
 <?lsmb text('A return authorization must be obtained from [_1] before goods are returned. Returns must be shipped prepaid and properly insured. [_1] will not be responsible for damages during transit.', company) ?>
   }
 }
@@ -136,7 +144,7 @@
 <?lsmb lc = loop.count - 1 ?>
   <?lsmb runningnumber.${lc} ?> & 
   <?lsmb number.${lc} ?> & 
-  <?lsmb description.${lc} ?> & 
+  <?lsmb INCLUDE multiline string = description.${lc} ?> & 
   <?lsmb deliverydate.${lc} ?> &
   <?lsmb qty.${lc} ?> & 
   <?lsmb unit.${lc} ?> &
@@ -144,29 +152,31 @@
   <?lsmb discountrate.${lc} ?> &
   <?lsmb linetotal.${lc} ?> \\
 <?lsmb END ?>
+\hline \hline
+\multicolumn{8}{r|}{<?lsmb text('Subtotal') ?>} & <?lsmb subtotal ?> \\*
+<?lsmb FOREACH tax ?>
+<?lsmb lc = loop.count - 1 ?>
+\multicolumn{8}{r|}{<?lsmb taxdescription.${lc} 
+                    ?>  on <?lsmb taxbase.${lc} ?> }
+ & <?lsmb tax.${lc} ?> \\*
+<?lsmb END ?>
+<?lsmb IF paid ?>
+\multicolumn{8}{r|}{ <?lsmb text('Paid') ?> } & - <?lsmb paid ?> \\*
+<?lsmb END ?>
+<?lsmb IF total ?>
+  \hline
+  \hline
+\multicolumn{8}{r|}{<?lsmb text('Balance Due') ?>} & <?lsmb total ?>\\
+<?lsmb END ?>
+
 \end{longtable}
 
 
 \parbox{\textwidth}{
-\rule{\textwidth}{2pt}
 
 \vspace{0.2cm}
 
 \hfill
..hidden..@{}}
-  & Subtotal & <?lsmb subtotal ?> \\
-<?lsmb FOREACH tax ?>
-<?lsmb lc = loop.count - 1 ?>
-  & <?lsmb taxdescription.${lc} ?> on <?lsmb taxbase.${lc} ?> & <?lsmb tax.${lc} ?> \\
-<?lsmb END ?>
-<?lsmb IF paid ?>
-  & <?lsmb text('Paid') ?> & - <?lsmb paid ?> \\
-<?lsmb END ?>
-  \hline
-<?lsmb IF total ?>
-  & <?lsmb text('Balance Due') ?> & <?lsmb total ?>
-<?lsmb END ?>
-\end{tabularx}
 
 \vspace{0.3cm}
 

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