can't set $p without $cgi
[freeside.git] / sql-ledger / old / sql-ledger / templates / Brazilian_Portuguese-purchase_order.tex
1 \documentclass[twoside]{scrartcl}
2 \usepackage[frame]{xy}
3 \usepackage{tabularx}
4 \usepackage[latin1]{inputenc}
5 \setlength{\voffset}{0.5cm}
6 \setlength{\hoffset}{-2.0cm}
7 \setlength{\topmargin}{0cm}
8 \setlength{\headheight}{0.5cm}
9 \setlength{\headsep}{1cm}
10 \setlength{\topskip}{0pt}
11 \setlength{\oddsidemargin}{1.0cm}
12 \setlength{\evensidemargin}{1.0cm}
13 \setlength{\textwidth}{19.2cm}
14 \setlength{\textheight}{24.5cm}
15 \setlength{\footskip}{1cm}
16 \setlength{\parindent}{0pt}
17 \renewcommand{\baselinestretch}{1}
18 \begin{document}
19
20 \newlength{\descrwidth}\setlength{\descrwidth}{10cm}
21
22 \newsavebox{\hdr}
23 \sbox{\hdr}{
24   \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
25
26   \parbox{\textwidth}{
27     \parbox[b]{12cm}{
28       <%company%>
29       
30       <%address%>}\hfill
31     \begin{tabular}[b]{rr@{}}
32     Telefone & <%tel%>\\
33     Fax & <%fax%>
34     \end{tabular}
35
36     \rule[1.5ex]{\textwidth}{0.5pt}
37   }
38 }
39     
40 \fontfamily{cmss}\fontshape{n}\selectfont
41
42 \markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
43
44 \pagestyle{myheadings}
45 %\thispagestyle{empty}     use this with letterhead paper
46
47 <%pagebreak 90 27 48%>
48 \end{tabular*}
49
50   \rule{\textwidth}{2pt}
51   
52   \hfill
53   \begin{tabularx}{7cm}{Xr@{}}
54   \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
55   \end{tabularx}
56
57 \newpage
58
59 \markright{<%company%>\hfill <%ordnumber%>}
60
61 \vspace*{-12pt}
62
63 \begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
64   \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
65     \textbf{Unit} & \textbf{Price} & \textbf{Amount} \\
66   & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
67 <%end pagebreak%>
68
69
70 \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
71
72 \vspace*{0.5cm}
73
74 \parbox[t]{1cm}{\hfill}
75 \parbox[t]{10.5cm}{
76 \textbf{To}
77 \vspace{0.5cm}
78
79 <%name%>
80
81 <%addr1%>
82
83 <%addr2%>
84
85 <%addr3%>
86
87 <%addr4%>
88
89 \vspace{0.3cm}
90
91 <%if contact%>
92 Attn: <%contact%>
93 \vspace{0.3cm}
94 <%end contact%>
95
96 <%if customerphone%>
97 Tel: <%customerphone%>
98 <%end customerphone%>
99
100 <%if customerfax%>
101 Fax: <%customerfax%>
102 <%end customerfax%>
103
104 <%email%>
105 }
106 \parbox[t]{7.5cm}{
107 \textbf{Ship To}
108 \vspace{0.3cm}
109
110 <%shiptoname%>
111
112 <%shiptoaddr1%>
113
114 <%shiptoaddr2%>
115
116 <%shiptoaddr3%>
117
118 <%shiptoaddr4%>
119
120 \vspace{0.3cm}
121
122 <%if shiptocontact%>
123 Attn: <%shiptocontact%>
124 \vspace{0.3cm}
125 <%end shiptocontact%>
126
127 <%if shiptophone%>
128 Tel: <%shiptophone%>
129 <%end shiptophone%>
130
131 <%if shiptofax%>
132 Fax: <%shiptofax%>
133 <%end shiptofax%>
134
135 <%shiptoemail%>
136 }
137 \hfill
138
139 \vspace{1cm}
140
141 \textbf{ORDEM DE COMPRA} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
142 \hfill
143 \begin{tabular}[t]{l@{\hspace{0.3cm}}l}
144   \textbf{Data} & <%orddate%> \\
145 <%if reqdate%>
146   \textbf{Requerido por} & <%reqdate%> \\
147 <%end reqdate%>
148   \textbf{Número} & <%ordnumber%>
149 \end{tabular}
150
151 \vspace{1cm}
152
153 \begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
154   \textbf{Número} & \textbf{Descrição} & \textbf{Quant.} &
155     \textbf{Unid.} & \textbf{Preço} & \textbf{Total} \\
156 <%foreach number%>
157   <%number%> & <%description%> & <%qty%> &
158     <%unit%> & <%sellprice%> & <%linetotal%> \\
159 <%end number%>
160 \end{tabular*}
161
162
163 \parbox{\textwidth}{
164 \rule{\textwidth}{2pt}
165
166 \vspace{0.2cm}
167
168 \hfill
169 \begin{tabularx}{7cm}{Xr@{}}
170   \textbf{Subtotal} & \textbf{<%subtotal%>} \\
171 <%foreach tax%>
172   <%taxdescription%> em <%taxbase%> & <%tax%>\\
173 <%end tax%>
174   \hline
175   \textbf{Total} & \textbf{<%ordtotal%>}\\
176 \end{tabularx}
177
178 \vspace{0.3cm}
179
180 \hfill
181   Preços em \textbf{<%currency%>}.
182
183 \vspace{12pt}
184
185 <%if notes%>
186   <%notes%>
187 <%end if%>
188
189 }
190
191
192 %\renewcommand{\thefootnote}{\fnsymbol{footnote}}
193
194 %\footnotetext[1]{\tiny }
195
196 \end{document}
197
198