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 | |
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')
-rw-r--r-- | templates/demo/ap_transaction.tex | 69 | ||||
-rw-r--r-- | templates/demo/ar_transaction.tex | 74 | ||||
-rw-r--r-- | templates/demo/bin_list.tex | 65 | ||||
-rw-r--r-- | templates/demo/check.tex | 15 | ||||
-rw-r--r-- | templates/demo/invoice.tex | 127 | ||||
-rw-r--r-- | templates/demo/packing_list.tex | 67 | ||||
-rw-r--r-- | templates/demo/pick_list.tex | 60 | ||||
-rw-r--r-- | templates/demo/purchase_order.tex | 99 | ||||
-rw-r--r-- | templates/demo/receipt.tex | 15 | ||||
-rw-r--r-- | templates/demo/request_quotation.tex | 89 | ||||
-rw-r--r-- | templates/demo/sales_order.tex | 107 | ||||
-rw-r--r-- | templates/demo/sales_quotation.tex | 88 | ||||
-rw-r--r-- | templates/demo/statement.tex | 31 | ||||
-rw-r--r-- | templates/demo/timecard.tex | 4 | ||||
-rw-r--r-- | templates/demo/work_order.tex | 72 |
15 files changed, 536 insertions, 446 deletions
diff --git a/templates/demo/ap_transaction.tex b/templates/demo/ap_transaction.tex index 7df57017..c8edaf4c 100644 --- a/templates/demo/ap_transaction.tex +++ b/templates/demo/ap_transaction.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} @@ -12,7 +12,7 @@ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont -<?lsmb include letterhead.tex ?> +<?lsmb INCLUDE letterhead.tex ?> \centerline{\textbf{A P} \hspace{0.3cm} \textbf{T R A N S A C T I O N}} @@ -26,58 +26,64 @@ <?lsmb address2 ?> <?lsmb city ?> -<?lsmb if state> +<?lsmb IF state> \hspace{-0.1cm}, <?lsmb state ?> -<?lsmb end state ?> <?lsmb zipcode ?> +<?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 vendorphone ?> +<?lsmb IF vendorphone ?> Tel: <?lsmb vendorphone ?> -<?lsmb end vendorphone ?> +<?lsmb END ?> -<?lsmb if vendorfax ?> +<?lsmb IF vendorfax ?> Fax: <?lsmb vendorfax ?> -<?lsmb end vendorfax ?> +<?lsmb END ?> <?lsmb email ?> -<?lsmb if vendortaxnumber ?> +<?lsmb IF vendortaxnumber ?> Tax Number: <?lsmb vendortaxnumber ?> -<?lsmb end vendortaxnumber ?> +<?lsmb END ?> } \hfill \begin{tabular}[t]{ll} \textbf{Invoice \#} & <?lsmb invnumber ?> \\ \textbf{Date} & <?lsmb invdate ?> \\ \textbf{Due} & <?lsmb duedate ?> \\ - <?lsmb if ponumber ?> + <?lsmb IF ponumber ?> \textbf{PO \#} & <?lsmb ponumber ?> \\ - <?lsmb end ponumber ?> - <?lsmb if ordnumber ?> + <?lsmb END ?> + <?lsmb IF ordnumber ?> \textbf{Order \#} & <?lsmb ordnumber ?> \\ - <?lsmb end ordnumber ?> + <?lsmb END ?> \textbf{Employee} & <?lsmb employee ?> \\ \end{tabular} \vspace{1cm} \begin{tabularx}{\textwidth}[t]{@{}llrX@{\hspace{1cm}}l@{}} -<?lsmb foreach amount ?> - <?lsmb accno ?> & <?lsmb account ?> & <?lsmb amount ?> & <?lsmb description ?> & <?lsmb projectnumber ?> \\ -<?lsmb end amount ?> +<?lsmb FOREACH amount ?> +<?lsmb lc = loop.count - 1 ?> + <?lsmb accno.${lc} ?> & + <?lsmb account.${lc} ?> & + <?lsmb amount.${lc} ?> & + <?lsmb description.${lc} ?> & + <?lsmb projectnumber.${lc} ?> \\ +<?lsmb END ?> \multicolumn{2}{r}{\textbf{Subtotal}} & <?lsmb subtotal ?> & \\ -<?lsmb foreach tax ?> - \multicolumn{2}{r}{\textbf{<?lsmb taxdescription ?> @ <?lsmb taxrate ?> \%}} & <?lsmb tax ?> & \\ -<?lsmb end tax ?> +<?lsmb FOREACH tax ?> +<?lsmb lc = loop.count - 1 ?> + \multicolumn{2}{r}{\textbf{<?lsmb taxdescription.${lc} ?> @ <?lsmb taxrate.${lc} ?> \%}} & <?lsmb tax.${lc} ?> & \\ +<?lsmb END ?> \multicolumn{2}{r}{\textbf{Total}} & <?lsmb invtotal ?> & \\ @@ -87,25 +93,26 @@ Tax Number: <?lsmb vendortaxnumber ?> <?lsmb text_amount ?> ***** <?lsmb decimal ?>/100 <?lsmb currency ?> -<?lsmb if notes ?> +<?lsmb IF notes ?> \vspace{0.3cm} <?lsmb notes ?> -<?lsmb end notes ?> +<?lsmb END ?> \vspace{0.3cm} -<?lsmb if paid_1 ?> +<?lsmb IF paid_1 ?> \begin{tabular}{@{}llllr@{}} \multicolumn{5}{c}{\textbf{Payments}} \\ \hline \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\ -<?lsmb end paid_1 ?> -<?lsmb foreach payment ?> - <?lsmb paymentdate ?> & <?lsmb paymentaccount ?> & <?lsmb paymentsource ?> & <?lsmb paymentmemo ?> & <?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 paymentmemo.${lc} ?> & <?lsmb payment.${lc} ?> \\ +<?lsmb END ?> +<?lsmb IF paid_1 ?> \end{tabular} -<?lsmb end paid_1 ?> +<?lsmb END ?> \end{document} diff --git a/templates/demo/ar_transaction.tex b/templates/demo/ar_transaction.tex index 95f9160d..19834aaf 100644 --- a/templates/demo/ar_transaction.tex +++ b/templates/demo/ar_transaction.tex @@ -1,5 +1,5 @@ \documentclass{scrartcl} -\usepackage[latin1]{inputenc} +\usepackage[utf8]{inputenc} \usepackage{tabularx} \usepackage[top=2cm,bottom=1.5cm,left=2cm,right=1cm]{geometry} \usepackage{graphicx} @@ -40,60 +40,66 @@ <?lsmb address2 ?> <?lsmb city ?> -<?lsmb if state ?> +<?lsmb IF state ?> , <?lsmb state ?> -<?lsmb end state ?> +<?lsmb END ?> <?lsmb zipcode ?> <?lsmb country ?> \vspace{0.3cm} -<?lsmb if contact ?> +<?lsmb IF contact ?> <?lsmb contact ?> -<?lsmb end contact ?> +<?lsmb END ?> \vspace{0.2cm} -<?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 ?> -<?lsmb if customertaxnumber ?> +<?lsmb IF customertaxnumber ?> Tax Number: <?lsmb customertaxnumber ?> -<?lsmb end customertaxnumber ?> +<?lsmb END ?> } \hfill \begin{tabular}[t]{ll} \textbf{Invoice \#} & <?lsmb invnumber ?> \\ \textbf{Date} & <?lsmb invdate ?> \\ \textbf{Due} & <?lsmb duedate ?> \\ - <?lsmb if ponumber ?> + <?lsmb IF ponumber ?> \textbf{PO \#} & <?lsmb ponumber ?> \\ - <?lsmb end ponumber ?> - <?lsmb if ordnumber ?> + <?lsmb END ?> + <?lsmb IF ordnumber ?> \textbf{Order \#} & <?lsmb ordnumber ?> \\ - <?lsmb end ordnumber ?> + <?lsmb END ?> \textbf{Employee} & <?lsmb employee ?> \\ \end{tabular} \vspace{1cm} \begin{tabularx}{\textwidth}[t]{@{}llrX@{\hspace{1cm}}l@{}} -<?lsmb foreach amount ?> - <?lsmb accno ?> & <?lsmb account ?> & <?lsmb amount ?> & <?lsmb description ?> & <?lsmb projectnumber ?> \\ -<?lsmb end amount ?> +<?lsmb FOREACH amount ?> +<?lsmb lc = loop.count - 1 ?> + <?lsmb accno.${lc} ?> & + <?lsmb account.${lc} ?> & + <?lsmb amount.${lc} ?> & + <?lsmb description.${lc} ?> & + <?lsmb projectnumber.${lc} ?> \\ +<?lsmb END ?> \multicolumn{2}{r}{\textbf{Subtotal}} & <?lsmb subtotal ?> & \\ -<?lsmb foreach tax ?> - \multicolumn{2}{r}{\textbf{<?lsmb taxdescription ?> @ <?lsmb taxrate ?> \%}} & <?lsmb tax ?> & \\ -<?lsmb end tax ?> +<?lsmb FOREACH tax ?> +<?lsmb lc = loop.count - 1 ?> + \multicolumn{2}{r}{\textbf{<?lsmb taxdescription.${lc} ?> @ <?lsmb taxrate.${lc} ?> \%}} & <?lsmb tax.${lc} ?> & \\ +<?lsmb END ?> \multicolumn{2}{r}{\textbf{Total}} & <?lsmb invtotal ?> & \\ @@ -103,31 +109,33 @@ Tax Number: <?lsmb customertaxnumber ?> <?lsmb text_amount ?> ***** <?lsmb decimal ?>/100 <?lsmb currency ?> -<?lsmb if notes ?> +<?lsmb IF notes ?> \vspace{0.3cm} <?lsmb notes ?> -<?lsmb end notes ?> +<?lsmb END ?> \vspace{0.3cm} -<?lsmb if paid_1 ?> +<?lsmb IF paid_1 ?> \begin{tabular}{@{}lllr@{}} \multicolumn{5}{c}{\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{tabular} -<?lsmb end paid_1 ?> +<?lsmb END ?> \vspace{0.5cm} -<?lsmb foreach tax ?> -\textbf{\scriptsize <?lsmb taxdescription ?> Registration <?lsmb taxnumber ?>} \\ -<?lsmb end tax ?> +<?lsmb FOREACH tax ?> +<?lsmb lc = loop.count - 1 ?> +\textbf{\scriptsize <?lsmb taxdescription.${lc} ?> Registration <?lsmb taxnumber.${lc} ?>} \\ +<?lsmb END ?> \end{document} diff --git a/templates/demo/bin_list.tex b/templates/demo/bin_list.tex index 88d4b3ce..8b96825c 100644 --- a/templates/demo/bin_list.tex +++ b/templates/demo/bin_list.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,19 +11,20 @@ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont -<?lsmb include letterhead.tex ?> +<?lsmb INCLUDE letterhead.tex ?> - -<?lsmb pagebreak 65 27 37 ?> -\end{tabularx} - -\newpage - -\markboth{<?lsmb company ?>\hfill <?lsmb ordnumber ?>}{<?lsmb company ?>\hfill <?lsmb ordnumber ?>} -\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}} - \textbf{Item} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\ -<?lsmb end pagebreak ?> +% Breaking old pagebreak directives +%<?xlsmb pagebreak 65 27 37 ?> +%\end{tabularx} +% +%\newpage +% +%\markboth{<?xlsmb company ?>\hfill <?xlsmb ordnumber ?>}{<?xlsmb company ?>\hfill <?xlsmb ordnumber ?>} +% +%\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}} +% \textbf{Item} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\ +%<?xlsmb end pagebreak ?> \vspace*{0.5cm} @@ -39,9 +40,9 @@ <?lsmb address2 ?> <?lsmb city ?> -<?lsmb if state ?> +<?lsmb IF state ?> \hspace{-0.1cm}, <?lsmb state ?> -<?lsmb end state ?> +<?lsmb END ?> <?lsmb zipcode ?> <?lsmb country ?> @@ -57,9 +58,9 @@ <?lsmb shiptoaddress2 ?> <?lsmb shiptocity ?> -<?lsmb if shiptostate ?> +<?lsmb IF shiptostate ?> \hspace{-0.1cm}, <?lsmb shiptostate ?> -<?lsmb end shiptostate ?> +<?lsmb END ?> <?lsmb shiptozipcode ?> <?lsmb shiptocountry ?> @@ -75,23 +76,23 @@ \begin{tabularx}{\textwidth}{*{6}{|X}|} \hline \textbf{Order \#} & \textbf{Date} & \textbf{Contact} - <?lsmb if warehouse ?> + <?lsmb IF warehouse ?> & \textbf{Warehouse} - <?lsmb end warehouse ?> + <?lsmb END ?> & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em] \hline <?lsmb ordnumber ?> - <?lsmb if shippingdate ?> + <?lsmb IF shippingdate ?> & <?lsmb shippingdate ?> - <?lsmb end shippingdate ?> - <?lsmb if not shippingdate ?> + <?lsmb END ?> + <?lsmb IF NOT shippingdate ?> & <?lsmb orddate ?> - <?lsmb end shippingdate ?> + <?lsmb END ?> & <?lsmb employee ?> - <?lsmb if warehouse ?> + <?lsmb IF warehouse ?> & <?lsmb warehouse ?> - <?lsmb end warehouse ?> + <?lsmb END ?> & <?lsmb shippingpoint ?> & <?lsmb shipvia ?> \\ \hline \end{tabularx} @@ -101,10 +102,18 @@ \begin{tabularx}{\textwidth}{@{}rlXllrrll@{}} \textbf{Item} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\ -<?lsmb foreach number ?> - <?lsmb runningnumber ?> & <?lsmb number ?> & <?lsmb description ?> & <?lsmb serialnumber ?> & - <?lsmb deliverydate ?> & <?lsmb qty ?> & <?lsmb ship ?> & <?lsmb unit ?> & <?lsmb bin ?> \\ -<?lsmb end number ?> +<?lsmb FOREACH number ?> +<?lsmb lc = loop.count - 1 ?> + <?lsmb runningnumber.${lc} ?> & + <?lsmb number.${lc} ?> & + <?lsmb description.${lc} ?> & + <?lsmb serialnumber.${lc} ?> & + <?lsmb deliverydate.${lc} ?> & + <?lsmb qty.${lc} ?> & + <?lsmb ship.${lc} ?> & + <?lsmb unit.${lc} ?> & + <?lsmb bin.${lc} ?> \\ +<?lsmb END ?> \end{tabularx} diff --git a/templates/demo/check.tex b/templates/demo/check.tex index a0298580..b5c8a31c 100644 --- a/templates/demo/check.tex +++ b/templates/demo/check.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} @@ -38,9 +38,9 @@ <?lsmb address2 ?> <?lsmb city ?> -<?lsmb if state ?> +<?lsmb IF state ?> \hspace{-0.1cm}, <?lsmb state ?> -<?lsmb end state ?> +<?lsmb END ?> <?lsmb zipcode ?> <?lsmb country ?> @@ -61,10 +61,11 @@ \begin{tabularx}{\textwidth}{lXrr@{}} \textbf{Invoice \#} & \textbf{Invoice Date} & \textbf{Amount Due} & \textbf{Applied} \\ -<?lsmb foreach invnumber ?> -<?lsmb invnumber ?> & <?lsmb invdate ?> \dotfill - & <?lsmb due ?> & <?lsmb paid ?> \\ -<?lsmb end invnumber ?> +<?lsmb FOREACH invnumber ?> +<?lsmb lc = loop.count - 1 ?> +<?lsmb invnumber.${lc} ?> & <?lsmb invdate.${lc} ?> \dotfill + & <?lsmb due.${lc} ?> & <?lsmb paid.${lc} ?> \\ +<?lsmb END ?> \end{tabularx} \vspace{1cm} 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} diff --git a/templates/demo/packing_list.tex b/templates/demo/packing_list.tex index 71d90b53..a1b638ec 100644 --- a/templates/demo/packing_list.tex +++ b/templates/demo/packing_list.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} @@ -23,18 +23,19 @@ returned. Returns must be shipped prepaid and properly insured. } } -<?lsmb include letterhead.tex ?> +<?lsmb INCLUDE letterhead.tex ?> -<?lsmb pagebreak 65 27 37 ?> -\end{tabularx} - -\newpage - -\markboth{<?lsmb company ?>\hfill <?lsmb ordnumber ?>}{<?lsmb company ?>\hfill <?lsmb ordnumber ?>} - -\begin{tabularx}{\textwidth}{@{}rlXllrrl@{}} - \textbf{Item} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Ship} & \\ -<?lsmb end pagebreak ?> +% Breaking old pagebreak directive +%<?xlsmb pagebreak 65 27 37 ?> +%\end{tabularx} +% +%\newpage +% +%\markboth{<?xlsmb company ?>\hfill <?xlsmb ordnumber ?>}{<?xlsmb company ?>\hfill <?xlsmb ordnumber ?>} +% +%\begin{tabularx}{\textwidth}{@{}rlXllrrl@{}} +% \textbf{Item} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Ship} & \\ +%<?xlsmb end pagebreak ?> \vspace*{0.5cm} @@ -53,9 +54,9 @@ returned. Returns must be shipped prepaid and properly insured. <?lsmb shiptoaddress2 ?> <?lsmb shiptocity ?> -<?lsmb if shiptostate ?> +<?lsmb IF shiptostate ?> \hspace{-0.1cm}, <?lsmb shiptostate ?> -<?lsmb end shiptostate ?> +<?lsmb END ?> <?lsmb shiptozipcode ?> <?lsmb shiptocountry ?> @@ -63,13 +64,13 @@ returned. Returns must be shipped prepaid and properly insured. \parbox[t]{.5\textwidth}{ <?lsmb shiptocontact ?> - <?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 ?> } @@ -84,23 +85,22 @@ returned. Returns must be shipped prepaid and properly insured. \begin{tabularx}{\textwidth}{*{7}{|X}|} \hline \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Contact} - <?lsmb if warehouse ?> + <?lsmb IF warehouse ?> & \textbf{Warehouse} - <?lsmb end warehouse ?> + <?lsmb END ?> & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em] \hline <?lsmb invnumber ?> & <?lsmb ordnumber ?> - <?lsmb if shippingdate ?> + <?lsmb IF shippingdate ?> & <?lsmb shippingdate ?> - <?lsmb end shippingdate ?> - <?lsmb if not shippingdate ?> + <?lsmb ELSE ?> & <?lsmb transdate ?> - <?lsmb end shippingdate ?> + <?lsmb END shippingdate ?> & <?lsmb employee ?> - <?lsmb if warehouse ?> + <?lsmb IF warehouse ?> & <?lsmb warehouse ?> - <?lsmb end warehouse ?> + <?lsmb END ?> & <?lsmb shippingpoint ?> & <?lsmb shipvia ?> \\ \hline \end{tabularx} @@ -110,10 +110,17 @@ returned. Returns must be shipped prepaid and properly insured. \begin{tabularx}{\textwidth}{@{}rlXllrrl@{}} \textbf{Item} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Ship} & \\ -<?lsmb foreach number ?> - <?lsmb runningnumber ?> & <?lsmb number ?> & <?lsmb description ?> & <?lsmb serialnumber ?> & - <?lsmb deliverydate ?> & <?lsmb qty ?> & <?lsmb ship ?> & <?lsmb unit ?> \\ -<?lsmb end number ?> +<?lsmb FOREACH number ?> +<?lsmb lc = loop.count - 1 ?> + <?lsmb runningnumber.${lc} ?> & + <?lsmb number.${lc} ?> & + <?lsmb description.${lc} ?> & + <?lsmb serialnumber.${lc} ?> & + <?lsmb deliverydate.${lc} ?> & + <?lsmb qty.${lc} ?> & + <?lsmb ship.${lc} ?> & + <?lsmb unit.${lc} ?> \\ +<?lsmb END ?> \end{tabularx} diff --git a/templates/demo/pick_list.tex b/templates/demo/pick_list.tex index 1b88041f..cc7f67fd 100644 --- a/templates/demo/pick_list.tex +++ b/templates/demo/pick_list.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,21 +11,22 @@ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont -<?lsmb include letterhead.tex ?> +<?lsmb INCLUDE letterhead.tex ?> - -<?lsmb pagebreak 65 27 37 ?> -\end{tabularx} - -\newpage - -\markboth{<?lsmb company ?>\hfill <?lsmb ordnumber ?>}{<?lsmb company ?>\hfill <?lsmb ordnumber ?>} - -\begin{tabularx}{\textwidth}{@{}rlXrcll@{}} - \textbf{Item} & \textbf{Number} & \textbf{Description} & - \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\ -<?lsmb end pagebreak ?> +% Breaking old pagebreak directive +%<?xlsmb pagebreak 65 27 37 ?> +%\end{tabularx} +% +%\newpage +% +%\markboth{<?xlsmb company ?>\hfill <?xlsmb ordnumber ?>}{<?xlsmb company ?>\hfill <?xlsmb ordnumber ?>} +% +%\begin{tabularx}{\textwidth}{@{}rlXrcll@{}} +% \textbf{Item} & \textbf{Number} & \textbf{Description} & +% \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\ +% +%<?xlsmb end pagebreak ?> \vspace*{0.5cm} @@ -44,9 +45,9 @@ <?lsmb shiptoaddress2 ?> <?lsmb shiptocity ?> -<?lsmb if shiptostate ?> +<?lsmb IF shiptostate ?> \hspace{-0.1cm}, <?lsmb shiptostate ?> -<?lsmb end shiptostate ?> +<?lsmb END ?> <?lsmb shiptozipcode ?> <?lsmb shiptocountry ?> @@ -54,13 +55,13 @@ \parbox[t]{.5\textwidth}{ <?lsmb shiptocontact ?> - <?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 ?> } @@ -78,12 +79,11 @@ & \textbf{Warehouse} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em] \hline <?lsmb invnumber ?> & <?lsmb ordnumber ?> - <?lsmb if shippingdate ?> + <?lsmb IF shippingdate ?> & <?lsmb shippingdate ?> - <?lsmb end shippingdate ?> - <?lsmb if not shippingdate ?> + <?lsmb ELSE ?> & <?lsmb transdate ?> - <?lsmb end shippingdate ?> + <?lsmb END ?> & <?lsmb employee ?> & <?lsmb warehouse ?> & <?lsmb shippingpoint ?> & <?lsmb shipvia ?> \\ \hline \end{tabularx} @@ -93,10 +93,14 @@ \begin{tabularx}{\textwidth}{@{}rlXrcll@{}} \textbf{Item} & \textbf{Number} & \textbf{Description} & \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\ -<?lsmb foreach number ?> - <?lsmb runningnumber ?> & <?lsmb number ?> & <?lsmb description ?> & - <?lsmb qty ?> & [\hspace{1cm}] & <?lsmb unit ?> & <?lsmb bin ?> \\ -<?lsmb end number ?> +<?lsmb FOREACH number ?> +<?lsmb lc = loop.count - 1 ?> + <?lsmb runningnumber.${lc} ?> & + <?lsmb number.${lc} ?> & + <?lsmb description.${lc} ?> & + <?lsmb qty.${lc} ?> & [\hspace{1cm}] & + <?lsmb unit.${lc} ?> & <?lsmb bin.${lc} ?> \\ +<?lsmb END ?> \end{tabularx} diff --git a/templates/demo/purchase_order.tex b/templates/demo/purchase_order.tex index 59511743..c60073a6 100644 --- a/templates/demo/purchase_order.tex +++ b/templates/demo/purchase_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} @@ -12,28 +12,29 @@ \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@{}} - & Subtotal & <?lsmb sumcarriedforward ?> \\ - \end{tabularx} - -\newpage - -\markboth{<?lsmb company ?>\hfill <?lsmb ordnumber ?>}{<?lsmb company ?>\hfill <?lsmb ordnumber ?>} - -\begin{tabularx}{\textwidth}{@{}lXrlrr@{}} - \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & - \textbf{Unit} & \textbf{Price} & \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@{}} +% & Subtotal & <?xlsmb sumcarriedforward ?> \\ +% \end{tabularx} +% +%\newpage +% +%\markboth{<?xlsmb company ?>\hfill <?xlsmb ordnumber ?>}{<?xlsmb company ?>\hfill <?xlsmb ordnumber ?>} +% +%\begin{tabularx}{\textwidth}{@{}lXrlrr@{}} +% \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & +% \textbf{Unit} & \textbf{Price} & \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 ?> Attn: <?lsmb contact ?> \vspace{0.2cm} -<?lsmb end contact ?> +<?lsmb END ?> -<?lsmb if vendorphone ?> +<?lsmb IF vendorphone ?> Tel: <?lsmb vendorphone ?> -<?lsmb end vendorphone ?> +<?lsmb END ?> -<?lsmb if vendorfax ?> +<?lsmb IF vendorfax ?> Fax: <?lsmb vendorfax ?> -<?lsmb end vendorfax ?> +<?lsmb END ?> <?lsmb email ?> } @@ -84,27 +85,27 @@ Fax: <?lsmb vendorfax ?> <?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 ?> Attn: <?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 ?> } @@ -128,10 +129,15 @@ Fax: <?lsmb shiptofax ?> \begin{tabularx}{\textwidth}{@{}lXrlrr@{}} \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & \textbf{Unit} & \textbf{Price} & \textbf{Amount} \\ -<?lsmb foreach number ?> - <?lsmb number ?> & <?lsmb description ?> & <?lsmb qty ?> & - <?lsmb unit ?> & <?lsmb sellprice ?> & <?lsmb linetotal ?> \\ -<?lsmb end number ?> +<?lsmb FOREACH number ?> +<?lsmb lc = loop.count - 1 ?> + <?lsmb number.${lc} ?> & + <?lsmb description.${lc} ?> & + <?lsmb qty.${lc} ?> & + <?lsmb unit.${lc} ?> & + <?lsmb sellprice.${lc} ?> & + <?lsmb linetotal.${lc} ?> \\ +<?lsmb END ?> \end{tabularx} @@ -143,9 +149,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} diff --git a/templates/demo/receipt.tex b/templates/demo/receipt.tex index 7bd4decd..16e88ed0 100644 --- a/templates/demo/receipt.tex +++ b/templates/demo/receipt.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} @@ -38,9 +38,9 @@ <?lsmb address2 ?> <?lsmb city ?> -<?lsmb if state ?> +<?lsmb IF state ?> \hspace{-0.1cm}, <?lsmb state ?> -<?lsmb end state ?> +<?lsmb END ?> <?lsmb zipcode ?> <?lsmb country ?> @@ -61,10 +61,11 @@ \begin{tabularx}{\textwidth}{lXrr@{}} \textbf{Invoice No.} & \textbf{Invoice Date} & \textbf{Due} & \textbf{Applied} \\ -<?lsmb foreach invnumber ?> -<?lsmb invnumber ?> & <?lsmb invdate ?> \dotfill - & <?lsmb due ?> & <?lsmb paid ?> \\ -<?lsmb end invnumber ?> +<?lsmb FOREACH invnumber ?> +<?lsmb lc = loop.count - 1 ?> +<?lsmb invnumber.${lc} ?> & <?lsmb invdate.${lc} ?> \dotfill + & <?lsmb due.${lc} ?> & <?lsmb paid.${lc} ?> \\ +<?lsmb END ?> \end{tabularx} \vspace{1cm} diff --git a/templates/demo/request_quotation.tex b/templates/demo/request_quotation.tex index f866911e..feccc631 100644 --- a/templates/demo/request_quotation.tex +++ b/templates/demo/request_quotation.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,28 +11,29 @@ \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}{@{}lXrlrr@{}} - \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & - \textbf{Unit} & \textbf{Price} & \textbf{Extended} \\ - & 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}{@{}lXrlrr@{}} +% \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & +% \textbf{Unit} & \textbf{Price} & \textbf{Extended} \\ +% & carried forward from <?xlsmb lastpage ?> & & & & <?xlsmb sumcarriedforward ?> \\ +%<?xlsmb end pagebreak ?> \vspace*{0.5cm} @@ -48,27 +49,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 vendorphone ?> +<?lsmb IF vendorphone ?> Tel: <?lsmb vendorphone ?> -<?lsmb end vendorphone ?> +<?lsmb END ?> -<?lsmb if vendorfax ?> +<?lsmb IF vendorfax ?> Fax: <?lsmb vendorfax ?> -<?lsmb end vendorfax ?> +<?lsmb END ?> <?lsmb email ?> } @@ -83,27 +84,27 @@ Fax: <?lsmb vendorfax ?> <?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 ?> } @@ -132,9 +133,13 @@ Please provide price and delivery time for the following items: \begin{tabularx}{\textwidth}{@{}lXrllrr@{}} \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & & \textbf{Delivery} & \textbf{Unit Price} & \textbf{Extended} \\ -<?lsmb foreach number ?> - <?lsmb number ?> & <?lsmb description ?> & <?lsmb qty ?> & <?lsmb unit ?> \\ -<?lsmb end number ?> +<?lsmb FOREACH number ?> +<?lsmb lc = loop.count - 1 ?> + <?lsmb number.${lc} ?> & + <?lsmb description.${lc} ?> & + <?lsmb qty.${lc} ?> & + <?lsmb unit.${lc} ?> \\ +<?lsmb END ?> \end{tabularx} 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} diff --git a/templates/demo/sales_quotation.tex b/templates/demo/sales_quotation.tex index b80ffacc..43a9fdfc 100644 --- a/templates/demo/sales_quotation.tex +++ b/templates/demo/sales_quotation.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} @@ -20,28 +20,29 @@ Special order items are subject to a 10\% cancellation fee. } } -<?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 quonumber ?>}{<?lsmb company ?>\hfill <?lsmb quonumber ?>} - -\begin{tabularx}{\textwidth}{@{}lXrlrrr@{}} - \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 quonumber ?>}{<?xlsmb company ?>\hfill <?xlsmb quonumber ?>} +% +%\begin{tabularx}{\textwidth}{@{}lXrlrrr@{}} +% \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} @@ -55,27 +56,27 @@ Special order items are subject to a 10\% cancellation fee. <?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 ?> } @@ -99,10 +100,16 @@ Fax: <?lsmb customerfax ?> \begin{tabularx}{\textwidth}{@{}lXrlrrr@{}} \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\ -<?lsmb foreach number ?> - <?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 number.${lc} ?> & + <?lsmb description.${lc} ?> & + <?lsmb qty.${lc} ?> & + <?lsmb unit.${lc} ?> & + <?lsmb sellprice.${lc} ?> & + <?lsmb discountrate.${lc} ?> & + <?lsmb linetotal.${lc} ?> \\ +<?lsmb END ?> \end{tabularx} @@ -114,9 +121,10 @@ Fax: <?lsmb customerfax ?> \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 quototal ?>\\ \end{tabularx} @@ -126,9 +134,9 @@ Fax: <?lsmb customerfax ?> \hfill All prices in \textbf{<?lsmb currency ?>}. -<?lsmb if terms ?> +<?lsmb IF terms ?> Terms: <?lsmb terms ?> days -<?lsmb end terms ?> +<?lsmb END ?> \vspace{12pt} diff --git a/templates/demo/statement.tex b/templates/demo/statement.tex index 4343c5c6..8fedc55f 100644 --- a/templates/demo/statement.tex +++ b/templates/demo/statement.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,7 +11,7 @@ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont -<?lsmb include letterhead.tex ?> +<?lsmb INCLUDE letterhead.tex ?> \parbox[t]{.5\textwidth}{ <?lsmb name ?> @@ -21,21 +21,21 @@ <?lsmb address2 ?> <?lsmb city ?> -<?lsmb if state ?> +<?lsmb IF state ?> \hspace{-0.1cm}, <?lsmb state ?> -<?lsmb end state ?> +<?lsmb END ?> <?lsmb zipcode ?> <?lsmb country ?> } \parbox[t]{.5\textwidth}{ -<?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 ?> } @@ -52,10 +52,17 @@ Fax: <?lsmb customerfax ?> \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Due} & \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90} \\ \hline -<?lsmb foreach invnumber ?> - <?lsmb invnumber ?> & <?lsmb ordnumber ?> & <?lsmb invdate ?> & <?lsmb duedate ?> & - <?lsmb c0 ?> & <?lsmb c30 ?> & <?lsmb c60 ?> & <?lsmb c90 ?> \\ -<?lsmb end invnumber ?> +<?lsmb FOREACH invnumber ?> +<?lsmb lc = loop.count - 1 ?> + <?lsmb invnumber.${lc} ?> & + <?lsmb ordnumber.${lc} ?> & + <?lsmb invdate.${lc} ?> & + <?lsmb duedate.${lc} ?> & + <?lsmb c0.${lc} ?> & + <?lsmb c30.${lc} ?> & + <?lsmb c60.${lc} ?> & + <?lsmb c90.${lc} ?> \\ +<?lsmb END ?> \multicolumn{8}{|l|}{\mbox{}} \\ \hline \textbf{Subtotal} & & & & <?lsmb c0total ?> & <?lsmb c30total ?> & <?lsmb c60total ?> & <?lsmb c90total ?> \\ diff --git a/templates/demo/timecard.tex b/templates/demo/timecard.tex index 1c54eb4f..e303ac10 100644 --- a/templates/demo/timecard.tex +++ b/templates/demo/timecard.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,7 +11,7 @@ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont -<?lsmb include letterhead.tex ?> +<?lsmb INCLUDE letterhead.tex ?> \centerline{\textbf{T I M E}\hspace{0.5cm}\textbf{C A R D}} diff --git a/templates/demo/work_order.tex b/templates/demo/work_order.tex index d3ca6959..c08a2da5 100644 --- a/templates/demo/work_order.tex +++ b/templates/demo/work_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,20 +11,21 @@ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont -<?lsmb include letterhead.tex ?> +<?lsmb INCLUDE letterhead.tex ?> -<?lsmb pagebreak 65 27 48 ?> -\end{tabularx} - -\newpage - -\markboth{<?lsmb company ?>\hfill <?lsmb ordnumber ?>}{<?lsmb company ?>\hfill <?lsmb ordnumber ?>} - -\begin{tabularx}{\textwidth}{@{}rlXrll@{}} - \textbf{Item} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & - & \textbf{Serial Number} \\ -<?lsmb end pagebreak ?> +% Break old pagebreak directive +%<?xlsmb pagebreak 65 27 48 ?> +%\end{tabularx} +% +%\newpage +% +%\markboth{<?xlsmb company ?>\hfill <?xlsmb ordnumber ?>}{<?xlsmb company ?>\hfill <?xlsmb ordnumber ?>} +% +%\begin{tabularx}{\textwidth}{@{}rlXrll@{}} +% \textbf{Item} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & +% & \textbf{Serial Number} \\ +%<?xlsmb end pagebreak ?> \vspace*{0.5cm} @@ -40,27 +41,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 ?> } @@ -75,27 +76,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 ?> } @@ -120,10 +121,15 @@ Fax: <?lsmb shiptofax ?> \begin{tabularx}{\textwidth}{@{}rlXrll@{}} \textbf{Item} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & & \textbf{Serial Number} \\ -<?lsmb foreach number ?> - <?lsmb runningnumber ?> & <?lsmb number ?> & <?lsmb description ?> & <?lsmb qty ?> & - <?lsmb unit ?> & <?lsmb serialnumber ?> \\ -<?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 serialnumber.${lc} ?> \\ +<?lsmb END ?> \end{tabularx} |