On 11/23/2010 8:47 AM, Jeff Kaminsky wrote:
Has anyone worked on the Laytex Templates? I got started on tinkering
with our quotations laytex templates, and the whole column, fixed width.
blah blah... doesn't seem to be working for me. Granted I know nothing
about what I am doing, but I should see some positive results. I'll
attached a copy of where I am currently at, and if you open it...

Number - my main issue here is that... if I type in a 20 digit part
number it pushes everything over 2 inches and refuses to wrap. The
consequences is that it pushes price discout and amount off the viewable
screen.
Description - my temporary fix was to have the description wrap sooner.
But... as a consequence ... if I have a quote to a customer with a
particularly short part number, everything stays too far to the left and
looks funny... and this is the example that I have furnished.

What I need is to be able to force "Number" to wrap after 15 characters
(I need a set column width). And I just don't see how to do it.

Has anyone fixed this before, or have a template that already works that
I may have?

Here is a latex template we currently use. Hope it helps.

--------------- start -----------------
%Invoice%


\documentclass[oneside|a4paper]{scrartcl}
\usepackage[frame]{xy}
\usepackage{fancyhdr}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage[latin1]{inputenc}
\usepackage{lastpage}
\setlength{\voffset}{-1.0cm} %vertical offset for your header
\setlength{\hoffset}{-2.0cm} %horizontal offset for your text
\setlength{\topmargin}{0cm}
\setlength{\headheight}{3cm}
\setlength{\headsep}{0.5cm}
\setlength{\topskip}{0pt}
\setlength{\oddsidemargin}{1.0cm}
\setlength{\evensidemargin}{1.0cm}
\setlength{\textwidth}{18.2cm}
\setlength{\textheight}{21.5cm}
\setlength{\footskip}{1.5cm}
\setlength{\parindent}{0pt}
\renewcommand{\baselinestretch}{1}
\begin{document}

\pagestyle{fancy}

\newlength{\descrwidth}\setlength{\descrwidth}{7cm}

\lhead{
\parbox[b]{2.8cm}{
%\includegraphics{/sites/normalSites/www.com.sg/app/sql-ledger/templates/CCLogo/logo.pdf}}
\parbox[b]{9cm}{
\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
\textbf{<%company%>}\\
<%address%>\\
Telephone <%tel%> Facsimile <%fax%>\\
Email: [email protected]\\
Website: www..com.sg}
}


\rhead{\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
        \begin{tabular}[b]{...@{}}
        \multicolumn{3}{r}{\underline{\Large{TAX INVOICE}}}\\
\hspace{1cm}    &       \textbf{GST Reg No:}            & 04-323-400C\\
\hspace{1cm}    &       \textbf{Date:}                  & <%invdate%>\\
\hspace{1cm}    &       \textbf{Invoice No:}            & <%invnumber%> \\
\hspace{1cm}    &       \textbf{Quotation No:}          & <%quonumber%>\\
\hspace{1cm}    &       \textbf{Purchase Order No:}     & <%ponumber%> \\
\hspace{1cm}    &       \textbf{Prepared By:}           & <%employee%>\\
\hspace{1cm}    &       \textbf{Total Pages:}           & \pageref{LastPage}
         \end{tabular}}


\lfoot{\tiny
\copyright \...@\ Copyright, \today \...@\ COMPANY NAME }

\cfoot{}

\rfoot{\thepage\ of \pageref{LastPage}}


\fontfamily{cmss}\fontshape{n}\selectfont

<%pagebreak 20 30 20%>
\end{tabular*}

  \rule{\textwidth}{2pt}

  \hfill
  \begin{tabularx}{7cm}...@{}}
  \textbf{Subtotal} & \textbf{\$<%sumcarriedforward%>} \\
  \end{tabularx}

\newpage


\begin{tabular*}{\textwidt...@{}cp{2cm}p{\descrwidth}@{\extracolsep\fill}r...@{}}
\textbf{No.} & \textbf{Code} & \textbf{Description} & \textbf{Qt'y} &
        \textbf{Unit} & \textbf{Price} & \textbf{Amount} \vspace{0.5cm}  \\
& & carried forward from page <%lastpage%> & & & & <%sumcarriedforward%> \vspace{0.5cm} \\

<%end pagebreak%>

\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont

\vspace*{0.2cm}

\parbox[t]{0cm}{\hfill}
  \parbox[t]{9.1cm}{
  \textbf{To}
  \vspace{0.2cm}

<%name%>

<%address1%>

<%address2%>

<%city%>

<%state%>

<%country%> <%zipcode%>

<%if customerphone%>
Tel: <%customerphone%>
<%end customerphone%>

<%if customerfax%>
Fax: <%customerfax%>
<%end customerfax%>

\vspace{0.2cm}

<%if contact%>
\textbf{Attn: <%contact%>}
<%end contact%>

<%email%>
}
\parbox[t]{9.1cm}{
\textbf{Deliver/Ship To}
\vspace{0.2cm}

<%shiptoname%>

<%shiptoaddress1%>

<%shiptoaddress2%>

<%shiptocity%>

<%shiptostate%>

<%shiptocountry%> <%shiptozipcode%>

<%if shiptophone%>
Tel: <%shiptophone%>
<%end shiptophone%>

<%if shiptofax%>
Fax: <%shiptofax%>
<%end shiptofax%>

\vspace{0.2cm}

<%if shiptocontact%>
\textbf{Attn: <%shiptocontact%>}
<%end shiptocontact%>

<%shiptoemail%>
}
\vspace{0.8cm}

\<%if invdescription%>
\textbf{RE: <%invdescription%>}\\
<%end invdescription%>

  \rule[1.5ex]{\textwidth}{0.5pt}

\vspace{0.2cm}

\begin{tabular*}{\textwidt...@{}cp{2cm}p{\descrwidth}@{\extracolsep\fill}r...@{}}
  \textbf{No.} & \textbf{Code} & \textbf{Description} & \textbf{Qt'y} &
    \textbf{Unit} & \textbf{Price} & \textbf{Amount}\vspace{0.5cm}  \\
<%foreach number%>
<%runningnumber%> & <%number%> & <%description%> <%if serialnumber%> \newline \textbf{Serial number: }<%serialnumber%> <%end serialnumber%> & <%qty%> &
    <%unit%> & <%sellprice%> & <%linetotal%> \vspace{0.5cm}  \\
<%end number%>
\end{tabular*}


\parbox{\textwidth}{
\rule{\textwidth}{2pt}

\vspace{0.2cm}

\hfill
\begin{tabularx}{7cm}...@{}}
  \textbf{Subtotal} & \textbf{\$<%subtotal%>} \\
<%foreach tax%>
\footnotesize{<%taxdescription%>} {<%taxrate%>}\% on \footnotesize{<%taxbase%>} & <%tax%> \\
<%end tax%>
<%if paid%>
  \textbf{Paid} & - \$<%paid%> \\
<%end paid%>
  \hline
  \textbf{Balance Owing} & \textbf{\$<%total%>} \\
\end{tabularx}

\vspace{0.3cm}

\hfill
  All prices in \textbf{<%currency%>} funds.

}

\vfill

<%if paid%>
\begin{tabularx}{10c...@{}lxlr@{}}
  \textbf{Payments} & & & \\
  \hline
  \textbf{Date} & \textbf{Account} & \textbf{Source} & \textbf{Amount} \\
<%end paid%>
<%foreach payment%>
  <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%payment%> \\
<%end payment%>
<%if paid%>
\end{tabularx}
<%end paid%>

\vspace{12pt}

<%if notes%>
  <%notes%>
<%end if%>


\vspace{1cm}

\centerline{\textbf{Thank You for your valued business!}}

\renewcommand{\thefootnote}{\fnsymbol{footnote}}

\footnotetext[1]{\tiny
Interest will accrue at the rate of 1.5\% per month starting from <%duedate%> until paid in full. All Items sold are not returnable. Cheques to be made payable to : COMPANY NAME}



\end{document}





---------------- end ------------------
_______________________________________________
SQL-Ledger mailing list
[email protected]
http://lists.ledger123.com/mailman/listinfo/sql-ledger

Reply via email to