Annotation of RT/Invoicing/invoice.tex.tt, Revision 1.16
1.1 andrew 1: [% USE Latex -%]
2: [% FILTER latex("pdf") -%]
1.16 ! andrew 3: % $AFresh1: invoice.tex.tt,v 1.15 2012/01/27 04:13:45 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.16 ! andrew 51: [% IF total -%]
! 52: Invoice Total & [% total | format('$%.2f') | latex_encode %] \\
! 53: [%- END %]
1.3 andrew 54: [% IF past_due -%]
1.8 andrew 55: Past Due & [% past_due | format('$%.2f') | latex_encode %] \\
1.15 andrew 56: [%- END %]
57: [% IF unpaid -%]
58: Unpaid & [% unpaid | format('$%.2f') | latex_encode %] \\
1.3 andrew 59: [%- END %]
60: [%- IF total_due -%]
1.8 andrew 61: Total Due & [% total_due | format('$%.2f') | latex_encode %] \\
1.3 andrew 62: [%- END %]
1.1 andrew 63: \hline
1.11 andrew 64: \multicolumn{2}{|c|}{[% info.0 | latex_encode(except = "\\{}") %]} \\
65: \multicolumn{2}{|c|}{[% info.1 | latex_encode(except = "\\{}") %]} \\
1.1 andrew 66: \hline
67: \end{tabular}
68:
69: \end{flushright}
70:
71: \end{multicols}
72:
73: \begin{invoice}{USD}{0}
1.7 andrew 74:
75: [%- FOR p IN projects %]
1.2 andrew 76: \ProjectTitle{[% p.title | latex_encode %]}%
1.7 andrew 77: [%- IF p.detail %]
78: \\\multicolumn{5}{l}{[% p.detail | latex_encode %]}\\%
79: [% END -%]
1.2 andrew 80:
1.1 andrew 81: [%- FOR f IN p.fees %]
1.7 andrew 82: \Fee{[% f.contents | latex_encode %]}{[% f.rate | latex_encode %]}{[% f.count | latex_encode %]}%
1.2 andrew 83: [%- IF f.detail %]
1.3 andrew 84: \multicolumn{5}{l}{\small \textbullet \ [% f.detail | latex_encode %]}\\%
1.2 andrew 85: [% END -%]
1.1 andrew 86: [%- END -%]
1.7 andrew 87:
1.1 andrew 88: [%- FOR e IN p.expenses %]
1.7 andrew 89: \EBC{[% e.contents | latex_encode %]}{[% e.amount | latex_encode %]}%
1.2 andrew 90: [%- IF e.detail %]
1.3 andrew 91: \multicolumn{5}{l}{\small \textbullet \ [% e.detail | latex_encode %]}\\%
1.2 andrew 92: [% END -%]
1.1 andrew 93: [%- END -%]
1.7 andrew 94:
95: [%- END # projects %]
96:
97: [%- IF discount %]
98: \\\Discount{[% discount.contents | latex_encode %]}{[% discount.amount | latex_encode %]}\\%
99: [%- END %]
100:
1.1 andrew 101: \end{invoice}
102:
103: \end{document}
104: [% END -%]
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>