=================================================================== RCS file: /cvs/RT/Invoicing/invoice.tex.tt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RT/Invoicing/invoice.tex.tt 2011/03/19 23:27:16 1.1 +++ RT/Invoicing/invoice.tex.tt 2011/03/20 02:34:42 1.2 @@ -1,6 +1,6 @@ [% USE Latex -%] [% FILTER latex("pdf") -%] -% $AFresh1$ +% $AFresh1: invoice.tex.tt,v 1.1.1.1 2011/03/19 22:27:16 andrew Exp $ \documentclass[oneside]{report} \usepackage[top=1in, bottom=1in, left=.75in, right=.75in]{geometry} \usepackage{multicol} @@ -9,13 +9,13 @@ \pagestyle{fancy} -\lhead{[% from.name %]} -\chead{Invoice \#\textbf{[% id | format('%06d') %]}} +\lhead{[% from.name | latex_encode %]} +\chead{Invoice \#\textbf{[% id | format('%06d') | latex_encode %]}} \rhead{Page {\thepage}} -\lfoot{[% info1 %]} +\lfoot{[% info1 | latex_encode %]} \cfoot{} -\rfoot{[% info2 %]} +\rfoot{[% info2 | latex_encode %]} \begin{document} \thispagestyle{empty} @@ -23,37 +23,37 @@ \begin{multicols}{2} {\large -[% from.name %] +[% from.name | latex_encode %] [% IF from.attn -%] - [% from.attn %] + [% from.attn | latex_encode %] [% END -%] -[% from.addr1 %] +[% from.addr1 | latex_encode %] [% IF from.addr2 -%] - [% from.addr2 %] + [% from.addr2 | latex_encode %] [% END -%] -[% from.city %], [% from.state %] \ [% from.zip %] +[% from.city | latex_encode %], [% from.state | latex_encode %] \ [% from.zip | latex_encode %] } \vspace{.75in} {\Large -[% to.name %] +[% to.name | latex_encode %] [% IF to.attn -%] - [% to.attn %] + [% to.attn | latex_encode %] [% END -%] -[% to.addr1 %] +[% to.addr1 | latex_encode %] [% IF to.addr2 -%] - [% to.addr2 %] + [% to.addr2 | latex_encode %] [% END -%] -[% to.city %], [% to.state %] \ [% to.zip %] +[% to.city | latex_encode %], [% to.state | latex_encode %] \ [% to.zip | latex_encode %] } \columnbreak @@ -71,12 +71,12 @@ \begin{tabular}{ | r l | } \hline -Invoice No. & \textbf{[% id | format('%06d') %]} \\ +Invoice No. & \textbf{[% id | format('%06d') | latex_encode %]} \\ Invoice Date & \today \\ Page & {\thepage} \\ \hline -\multicolumn{2}{|c|}{[% info1 %]} \\ -\multicolumn{2}{|c|}{[% info2 %]} \\ +\multicolumn{2}{|c|}{[% info1 | latex_encode %]} \\ +\multicolumn{2}{|c|}{[% info2 | latex_encode %]} \\ \hline \end{tabular} @@ -86,15 +86,28 @@ \begin{invoice}{USD}{0} [%- FOR p IN projects %] - \ProjectTitle{[% p.title %]} + \ProjectTitle{[% p.title | latex_encode %]}% + [%- IF p.detail %] + \\\multicolumn{5}{l}{[% p.detail | latex_encode %]}% + [% END -%] + [%- FOR f IN p.fees %] - \Fee{[% f.contents %]}{[% f.rate %]}{[% f.count %]} + \Fee{[% f.contents | latex_encode %]}{[% f.rate | latex_encode %]}{[% f.count | latex_encode %]} + [%- IF f.detail %] + {\small [% f.detail | latex_encode %]} + [% END -%] [%- END -%] [%- FOR e IN p.expenses %] - \EBC{[% e.contents %]}{[% e.amount %]} + \EBC{[% e.contents | latex_encode %]}{[% e.amount | latex_encode %]} + [%- IF e.detail %] + {\small [% e.detail | latex_encode %]} + [% END -%] [%- END -%] [%- FOR d IN p.discounts %] - \Discount{[% d.contents %]}{[% d.amount %]} + \Discount{[% d.contents | latex_encode %]}{[% d.amount | latex_encode %]} + [%- IF d.detail %] + {\small [% d.detail | latex_encode %]} + [% END -%] [%- END -%] [%- END %] \end{invoice}