[BACK]Return to invoice.tex.tt CVS log [TXT][DIR] Up to [local] / RT / Invoicing

File: [local] / RT / Invoicing / invoice.tex.tt (download)

Revision 1.7, Mon Mar 21 20:49:44 2011 UTC (13 years, 2 months ago) by andrew
Branch: MAIN
Changes since 1.6: +16 -11 lines

lots of changes, store the invoice in the customer being the main one.

[% USE Latex -%]
[% FILTER latex("pdf") -%]
% $AFresh1: invoice.tex.tt,v 1.7 2011/03/21 20:49:44 andrew Exp $
\documentclass[oneside]{report}
\usepackage[top=1in, bottom=1in, left=.75in, right=.75in]{geometry}
\usepackage{multicol}
\usepackage{fancyhdr}
\usepackage{invoice}

\pagestyle{fancy}

\lhead{[% from.name | latex_encode %]}
\chead{Invoice \#\textbf{[% id | format('%06d') | latex_encode %]}}
\rhead{Page {\thepage}}

\lfoot{[% info.0 | latex_encode %]}
\cfoot{}
\rfoot{[% info.1 | latex_encode %]}

\begin{document}
\thispagestyle{empty}
\vspace*{-.75in}
\begin{multicols}{2}
\parbox[t][1.625in]{\linewidth}{\large
[% from.name | latex_encode %]

[% IF from.attn -%]
    [% from.attn | latex_encode %]

[% END -%]
[% from.addr1 | latex_encode %]

[% IF from.addr2 -%]
    [% from.addr2 | latex_encode %]

[% END -%]
[% from.city | latex_encode %], 
[% from.state | latex_encode %] \ [% from.zip | latex_encode %]

[% IF from.email -%]
    [% from.email| latex_encode %]

[% END -%]
}

\parbox[t][1.5in]{\linewidth}{\Large
[% to.name | latex_encode %]

[% IF to.attn -%]
    [% to.attn | latex_encode %] 

[% END -%]
[% to.addr1 | latex_encode %]

[% IF to.addr2 -%]
    [% to.addr2 | latex_encode %]

[% END -%]
[% to.city | latex_encode %], 
[% to.state | latex_encode %] \ [% to.zip | latex_encode %]
}

\columnbreak

\begin{flushright}

\begin{tabular}{ | p{3in} | }
\hline
LOGO \\
\hline
\end{tabular}

\hfill
\vfill

\begin{tabular}{ | r l | }
\hline
Invoice No.   & \textbf{[% id | format('%06d') | latex_encode %]} \\
%Page          & {\thepage} \\
Invoice Date  & \today \\
[%- IF start %]
    Start & [% start | latex_encode %] \\
[%- END %]
[%- IF end- %]
    End & [% end | latex_encode %] \\
[%- END %]
Invoice Total & [% total | format('%.2f') | latex_encode %] \\
[% IF past_due -%]
  Past Due    & [% past_due | format('%.2f') | latex_encode %] \\
[%- END %]
[%- IF total_due -%]
  Total Due   & [% total_due | format('%.2f') | latex_encode %] \\
[%- END %]
\hline
\multicolumn{2}{|c|}{[% info.0 | latex_encode %]} \\
\multicolumn{2}{|c|}{[% info.1 | latex_encode %]} \\
\hline
\end{tabular}

\end{flushright}

\end{multicols}

\begin{invoice}{USD}{0}

[%- FOR p IN projects %]
 \ProjectTitle{[% p.title | latex_encode %]}%
  [%- IF p.detail %]
   \\\multicolumn{5}{l}{[% p.detail | latex_encode %]}\\%
  [% END -%]

  [%- FOR f IN p.fees %]
   \Fee{[% f.contents | latex_encode %]}{[% f.rate | latex_encode %]}{[% f.count | latex_encode %]}%
   [%- IF f.detail %]
    \multicolumn{5}{l}{\small \textbullet \ [% f.detail | latex_encode %]}\\%
   [% END -%]
  [%- END -%]

  [%- FOR e IN p.expenses %]
   \EBC{[% e.contents | latex_encode %]}{[% e.amount | latex_encode %]}%
   [%- IF e.detail %]
    \multicolumn{5}{l}{\small \textbullet \ [% e.detail | latex_encode %]}\\%
   [% END -%]
  [%- END -%]

[%- END # projects %]

[%- IF discount %]
  \\\Discount{[% discount.contents | latex_encode %]}{[% discount.amount | latex_encode %]}\\%
[%- END %]

\end{invoice}

\end{document}
[% END -%]