Annotation of RT/Invoicing/invoice.tex.tt, Revision 1.15
1.1 andrew 1: [% USE Latex -%]
2: [% FILTER latex("pdf") -%]
1.15 ! andrew 3: % $AFresh1: invoice.tex.tt,v 1.14 2011/12/31 02:14:32 andrew Exp $
1.1 andrew 4: \documentclass[oneside]{report}
1.13 andrew 5: \usepackage{graphicx}
1.1 andrew 6: \usepackage[top=1in, bottom=1in, left=.75in, right=.75in]{geometry}
7: \usepackage{multicol}
8: \usepackage{fancyhdr}
9: \usepackage{invoice}
10:
11: \pagestyle{fancy}
12:
1.12 andrew 13: \lhead{[% organization | latex_encode %]}
1.2 andrew 14: \chead{Invoice \#\textbf{[% id | format('%06d') | latex_encode %]}}
1.1 andrew 15: \rhead{Page {\thepage}}
16:
1.11 andrew 17: \lfoot{[% info.0 | latex_encode(except = "\\{}") %]}
1.1 andrew 18: \cfoot{}
1.11 andrew 19: \rfoot{[% info.1 | latex_encode(except = "\\{}") %]}
1.1 andrew 20:
21: \begin{document}
22: \thispagestyle{empty}
1.6 andrew 23: \vspace*{-.75in}
1.1 andrew 24: \begin{multicols}{2}
1.11 andrew 25: \parbox[t][1.625in]{\linewidth}{\large [% from | latex_encode(except = "\\{}") %] }
1.1 andrew 26:
1.11 andrew 27: \parbox[t][1.5in]{\linewidth}{\Large [% to | latex_encode(except = "\\{}") %] }
1.1 andrew 28:
29: \columnbreak
30:
31: \begin{flushright}
32:
1.13 andrew 33: \includegraphics{[% logo %]}
1.1 andrew 34:
35: \hfill
36: \vfill
37:
38: \begin{tabular}{ | r l | }
39: \hline
1.3 andrew 40: Invoice No. & \textbf{[% id | format('%06d') | latex_encode %]} \\
1.4 andrew 41: %Page & {\thepage} \\
1.14 andrew 42: [%- IF invdate %]
43: Invoice Date & [% invdate.strftime('%B %d, %Y') | latex_encode %] \\
44: [%- END %]
1.4 andrew 45: [%- IF start %]
1.14 andrew 46: From & [% start.strftime('%B %d, %Y') | latex_encode %] \\
1.4 andrew 47: [%- END %]
48: [%- IF end- %]
1.14 andrew 49: Through & [% end.strftime('%B %d, %Y') | latex_encode %] \\
1.4 andrew 50: [%- END %]
1.8 andrew 51: Invoice Total & [% total | format('$%.2f') | latex_encode %] \\
1.3 andrew 52: [% IF past_due -%]
1.8 andrew 53: Past Due & [% past_due | format('$%.2f') | latex_encode %] \\
1.15 ! andrew 54: [%- END %]
! 55: [% IF unpaid -%]
! 56: Unpaid & [% unpaid | format('$%.2f') | latex_encode %] \\
1.3 andrew 57: [%- END %]
58: [%- IF total_due -%]
1.8 andrew 59: Total Due & [% total_due | format('$%.2f') | latex_encode %] \\
1.3 andrew 60: [%- END %]
1.1 andrew 61: \hline
1.11 andrew 62: \multicolumn{2}{|c|}{[% info.0 | latex_encode(except = "\\{}") %]} \\
63: \multicolumn{2}{|c|}{[% info.1 | latex_encode(except = "\\{}") %]} \\
1.1 andrew 64: \hline
65: \end{tabular}
66:
67: \end{flushright}
68:
69: \end{multicols}
70:
71: \begin{invoice}{USD}{0}
1.7 andrew 72:
73: [%- FOR p IN projects %]
1.2 andrew 74: \ProjectTitle{[% p.title | latex_encode %]}%
1.7 andrew 75: [%- IF p.detail %]
76: \\\multicolumn{5}{l}{[% p.detail | latex_encode %]}\\%
77: [% END -%]
1.2 andrew 78:
1.1 andrew 79: [%- FOR f IN p.fees %]
1.7 andrew 80: \Fee{[% f.contents | latex_encode %]}{[% f.rate | latex_encode %]}{[% f.count | latex_encode %]}%
1.2 andrew 81: [%- IF f.detail %]
1.3 andrew 82: \multicolumn{5}{l}{\small \textbullet \ [% f.detail | latex_encode %]}\\%
1.2 andrew 83: [% END -%]
1.1 andrew 84: [%- END -%]
1.7 andrew 85:
1.1 andrew 86: [%- FOR e IN p.expenses %]
1.7 andrew 87: \EBC{[% e.contents | latex_encode %]}{[% e.amount | latex_encode %]}%
1.2 andrew 88: [%- IF e.detail %]
1.3 andrew 89: \multicolumn{5}{l}{\small \textbullet \ [% e.detail | latex_encode %]}\\%
1.2 andrew 90: [% END -%]
1.1 andrew 91: [%- END -%]
1.7 andrew 92:
93: [%- END # projects %]
94:
95: [%- IF discount %]
96: \\\Discount{[% discount.contents | latex_encode %]}{[% discount.amount | latex_encode %]}\\%
97: [%- END %]
98:
1.1 andrew 99: \end{invoice}
100:
101: \end{document}
102: [% END -%]
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>