summaryrefslogtreecommitdiff
path: root/templates/demo/sales_order.tex
diff options
context:
space:
mode:
Diffstat (limited to 'templates/demo/sales_order.tex')
-rw-r--r--templates/demo/sales_order.tex107
1 files changed, 58 insertions, 49 deletions
diff --git a/templates/demo/sales_order.tex b/templates/demo/sales_order.tex
index 7bcb0dce..2d382cb2 100644
--- a/templates/demo/sales_order.tex
+++ b/templates/demo/sales_order.tex
@@ -1,5 +1,5 @@
\documentclass{scrartcl}
-\usepackage[latin1]{inputenc}
+\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\usepackage[letterpaper,top=2cm,bottom=1.5cm,left=1.1cm,right=1.5cm]{geometry}
\usepackage{graphicx}
@@ -11,29 +11,30 @@
\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-<?lsmb include letterhead.tex ?>
-
-
-<?lsmb pagebreak 65 27 48 ?>
-\end{tabularx}
-
- \rule{\textwidth}{2pt}
-
- \hfill
- \begin{tabularx}{7cm}{Xr@{\hspace{1cm}}r@{}}
- & \textbf{Subtotal} & \textbf{<?lsmb sumcarriedforward ?>} \\
- \end{tabularx}
-
-\newpage
-
-\markboth{<?lsmb company ?>\hfill <?lsmb ordnumber ?>}{<?lsmb company ?>\hfill <?lsmb ordnumber ?>}
-
-
-\begin{tabularx}{\textwidth}{@{}rlXrlrrr@{}}
- \textbf{Item} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
- \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
- & carried forward from <?lsmb lastpage ?> & & & & & <?lsmb sumcarriedforward ?> \\
-<?lsmb end pagebreak ?>
+<?lsmb INCLUDE letterhead.tex ?>
+
+
+% Breaking old pagebreak directive
+%<?xlsmb pagebreak 65 27 48 ?>
+%\end{tabularx}
+%
+% \rule{\textwidth}{2pt}
+%
+% \hfill
+% \begin{tabularx}{7cm}{Xr@{\hspace{1cm}}r@{}}
+% & \textbf{Subtotal} & \textbf{<?xlsmb sumcarriedforward ?>} \\
+% \end{tabularx}
+%
+%\newpage
+%
+%\markboth{<?xlsmb company ?>\hfill <?xlsmb ordnumber ?>}{<?xlsmb company ?>\hfill <?xlsmb ordnumber ?>}
+%
+%
+%\begin{tabularx}{\textwidth}{@{}rlXrlrrr@{}}
+% \textbf{Item} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+% \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+% & carried forward from <?xlsmb lastpage ?> & & & & & <?xlsmb sumcarriedforward ?> \\
+%<?xlsmb end pagebreak ?>
\vspace*{0.5cm}
@@ -49,27 +50,27 @@
<?lsmb address2 ?>
<?lsmb city ?>
-<?lsmb if state ?>
+<?lsmb IF state ?>
\hspace{-0.1cm}, <?lsmb state ?>
-<?lsmb end state ?>
+<?lsmb END ?>
<?lsmb zipcode ?>
<?lsmb country ?>
\vspace{0.3cm}
-<?lsmb if contact ?>
+<?lsmb IF contact ?>
<?lsmb contact ?>
\vspace{0.2cm}
-<?lsmb end contact ?>
+<?lsmb END ?>
-<?lsmb if customerphone ?>
+<?lsmb IF customerphone ?>
Tel: <?lsmb customerphone ?>
-<?lsmb end customerphone ?>
+<?lsmb END ?>
-<?lsmb if customerfax ?>
+<?lsmb IF customerfax ?>
Fax: <?lsmb customerfax ?>
-<?lsmb end customerfax ?>
+<?lsmb END ?>
<?lsmb email ?>
}
@@ -84,27 +85,27 @@ Fax: <?lsmb customerfax ?>
<?lsmb shiptoaddress2 ?>
<?lsmb shiptocity ?>
-<?lsmb if shiptostate ?>
+<?lsmb IF shiptostate ?>
\hspace{-0.1cm}, <?lsmb shiptostate ?>
-<?lsmb end shiptostate ?>
+<?lsmb END ?>
<?lsmb shiptozipcode ?>
<?lsmb shiptocountry ?>
\vspace{0.3cm}
-<?lsmb if shiptocontact ?>
+<?lsmb IF shiptocontact ?>
<?lsmb shiptocontact ?>
\vspace{0.2cm}
-<?lsmb end shiptocontact ?>
+<?lsmb END ?>
-<?lsmb if shiptophone ?>
+<?lsmb IF shiptophone ?>
Tel: <?lsmb shiptophone ?>
-<?lsmb end shiptophone ?>
+<?lsmb END ?>
-<?lsmb if shiptofax ?>
+<?lsmb IF shiptofax ?>
Fax: <?lsmb shiptofax ?>
-<?lsmb end shiptofax ?>
+<?lsmb END ?>
<?lsmb shiptoemail ?>
}
@@ -129,10 +130,17 @@ Fax: <?lsmb shiptofax ?>
\begin{tabularx}{\textwidth}{@{}rlXrlrrr@{}}
\textbf{Item} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
\textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
-<?lsmb foreach number ?>
- <?lsmb runningnumber ?> & <?lsmb number ?> & <?lsmb description ?> & <?lsmb qty ?> &
- <?lsmb unit ?> & <?lsmb sellprice ?> & <?lsmb discountrate ?> & <?lsmb linetotal ?> \\
-<?lsmb end number ?>
+<?lsmb FOREACH number ?>
+<?lsmb lc = loop.count - 1 ?>
+ <?lsmb runningnumber.${lc} ?> &
+ <?lsmb number.${lc} ?> &
+ <?lsmb description.${lc} ?> &
+ <?lsmb qty.${lc} ?> &
+ <?lsmb unit.${lc} ?> &
+ <?lsmb sellprice.${lc} ?> &
+ <?lsmb discountrate.${lc} ?> &
+ <?lsmb linetotal.${lc} ?> \\
+<?lsmb END ?>
\end{tabularx}
@@ -144,9 +152,10 @@ Fax: <?lsmb shiptofax ?>
\hfill
\begin{tabularx}{7cm}{Xr@{\hspace{1cm}}r@{}}
& Subtotal & <?lsmb subtotal ?> \\
-<?lsmb foreach tax ?>
- & <?lsmb taxdescription ?> on <?lsmb taxbase ?> & <?lsmb tax ?>\\
-<?lsmb end tax ?>
+<?lsmb FOREACH tax ?>
+<?lsmb lc = loop.count - 1 ?>
+ & <?lsmb taxdescription.${lc} ?> on <?lsmb taxbase.${lc} ?> & <?lsmb tax.${lc} ?>\\
+<?lsmb END ?>
\hline
& Total & <?lsmb ordtotal ?>\\
\end{tabularx}
@@ -157,9 +166,9 @@ Fax: <?lsmb shiptofax ?>
\hfill
All prices in \textbf{<?lsmb currency ?>}.
-<?lsmb if terms ?>
+<?lsmb IF terms ?>
Terms: <?lsmb terms ?> days
-<?lsmb end terms ?>
+<?lsmb END ?>
\vspace{12pt}