diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-05-26 23:57:13 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-05-26 23:57:13 +0000 |
commit | b9982a0314b74a8fb342a20568a3e15b90d625bc (patch) | |
tree | 9cfe46d004c4f776babefe0eb7fbadb7435491bc /templates/demo/invoice.tex | |
parent | 5f4e46ad636f986668a65aeaa7ce7ae314365378 (diff) |
Adding PDF and Postscript support to LedgerSMB::Template
Removing all calls to $form->parse_template
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1241 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'templates/demo/invoice.tex')
-rw-r--r-- | templates/demo/invoice.tex | 127 |
1 files changed, 69 insertions, 58 deletions
diff --git a/templates/demo/invoice.tex b/templates/demo/invoice.tex index a34120fb..36af8d88 100644 --- a/templates/demo/invoice.tex +++ b/templates/demo/invoice.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} @@ -22,29 +22,30 @@ A return authorization must be obtained from <?lsmb company ?> before goods are } } -<?lsmb include letterhead.tex ?> - -<?lsmb pagebreak 65 27 37 ?> -\end{tabularx} - - \rule{\textwidth}{2pt} - - \vspace{0.2cm} - - \hfill - \begin{tabularx}{\textwidth}{Xr@{\hspace{1cm}}r@{}} - & Subtotal & <?lsmb sumcarriedforward ?> \\ - \end{tabularx} - -\newpage - -\markboth{<?lsmb company ?>\hfill <?lsmb invnumber ?>}{<?lsmb company ?>\hfill <?lsmb invnumber ?>} - -\begin{tabularx}{\textwidth}{@{}rlXlrlrrr@{}} - \textbf{Pos} & \textbf{Number} & \textbf{Description} & & \textbf{Qt'y} & - \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\ [0.5em] - & carried forward from page <?lsmb lastpage ?> & & & & & & & <?lsmb sumcarriedforward ?> \\ [0.5em] -<?lsmb end pagebreak ?> +<?lsmb INCLUDE letterhead.tex ?> + +% Disable old pagebreak handling +%<?xlsmb pagebreak 65 27 37 ?> +%\end{tabularx} +% +% \rule{\textwidth}{2pt} +% +% \vspace{0.2cm} +% +% \hfill +% \begin{tabularx}{\textwidth}{Xr@{\hspace{1cm}}r@{}} +% & Subtotal & <?xlsmb sumcarriedforward ?> \\ +% \end{tabularx} +% +%\newpage +% +%\markboth{<?xlsmb company ?>\hfill <?xlsmb invnumber ?>}{<?xlsmb company ?>\hfill <?xlsmb invnumber ?>} +% +%\begin{tabularx}{\textwidth}{@{}rlXlrlrrr@{}} +% \textbf{Pos} & \textbf{Number} & \textbf{Description} & & \textbf{Qt'y} & +% \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\ [0.5em] +% & carried forward from page <?xlsmb lastpage ?> & & & & & & & <?xlsmb sumcarriedforward ?> \\ [0.5em] +%<?xlsmb end pagebreak ?> \vspace*{0.5cm} @@ -60,27 +61,27 @@ A return authorization must be obtained from <?lsmb company ?> before goods are <?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 ?> } @@ -95,27 +96,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 ?> } @@ -142,10 +143,18 @@ Fax: <?lsmb shiptofax ?> \begin{tabularx}{\textwidth}{@{}rlXlrlrrr@{}} \textbf{Pos} & \textbf{Number} & \textbf{Description} & & \textbf{Qt'y} & \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\ [0.5em] -<?lsmb foreach number ?> - <?lsmb runningnumber ?> & <?lsmb number ?> & <?lsmb description ?> & <?lsmb deliverydate ?> & - <?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 deliverydate.${lc} ?> & + <?lsmb qty.${lc} ?> & + <?lsmb unit.${lc} ?> & + <?lsmb sellprice.${lc} ?> & + <?lsmb discountrate.${lc} ?> & + <?lsmb linetotal.${lc} ?> \\ +<?lsmb END ?> \end{tabularx} @@ -157,16 +166,17 @@ 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 if paid ?> +<?lsmb FOREACH tax ?> +<?lsmb lc = loop.count - 1 ?> + & <?lsmb taxdescription.${lc} ?> on <?lsmb taxbase.${lc} ?> & <?lsmb tax.${lc} ?> \\ +<?lsmb END ?> +<?lsmb IF paid ?> & Paid & - <?lsmb paid ?> \\ -<?lsmb end paid ?> +<?lsmb END ?> \hline -<?lsmb if total ?> +<?lsmb IF total ?> & Balance Due & <?lsmb total ?> -<?lsmb end total ?> +<?lsmb END ?> \end{tabularx} \vspace{0.3cm} @@ -182,18 +192,19 @@ All prices in \textbf{<?lsmb currency ?>}. \vfill -<?lsmb if paid_1 ?> +<?lsmb IF paid_1 ?> \begin{tabularx}{10cm}{@{}lXlr@{}} \textbf{Payments} & & & \\ \hline \textbf{Date} & & \textbf{Source} & \textbf{Amount} \\ -<?lsmb end paid_1 ?> -<?lsmb foreach payment ?> - <?lsmb paymentdate ?> & <?lsmb paymentaccount ?> & <?lsmb paymentsource ?> & <?lsmb payment ?> \\ -<?lsmb end payment ?> -<?lsmb if paid_1 ?> +<?lsmb END ?> +<?lsmb FOREACH payment ?> +<?lsmb lc = loop.count - 1 ?> + <?lsmb paymentdate.${lc} ?> & <?lsmb paymentaccount.${lc} ?> & <?lsmb paymentsource.${lc} ?> & <?lsmb payment.${lc} ?> \\ +<?lsmb END ?> +<?lsmb IF paid_1 ?> \end{tabularx} -<?lsmb end paid_1 ?> +<?lsmb END ?> \vspace{1cm} |