summaryrefslogtreecommitdiff
path: root/templates/demo/invoice.tex
blob: 89a416bf161fba040ec91dae97f078f8188630b2 (plain)
  1. <?lsmb FILTER latex -?>
  2. \documentclass{scrartcl}
  3. \usepackage[utf8]{inputenc}
  4. \usepackage{tabularx}
  5. \usepackage[letterpaper,top=2cm,bottom=1.5cm,left=1.1cm,right=1.5cm]{geometry}
  6. \usepackage{graphicx}
  7. \begin{document}
  8. \pagestyle{myheadings}
  9. \thispagestyle{empty}
  10. \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
  11. \newsavebox{\ftr}
  12. \sbox{\ftr}{
  13. \parbox{\textwidth}{
  14. \tiny
  15. \rule[1.5em]{\textwidth}{0.5pt}
  16. Payment due NET <?lsmb terms ?> Days from date of Invoice. Interest on overdue amounts will acrue at the rate of 12\% per annum starting from <?lsmb duedate ?> until paid in full. Items returned are subject to a 10\% restocking charge.
  17. A return authorization must be obtained from <?lsmb company ?> before goods are returned. Returns must be shipped prepaid and properly insured.
  18. <?lsmb company ?> will not be responsible for damages during transit.
  19. }
  20. }
  21. <?lsmb INCLUDE letterhead.tex ?>
  22. % Disable old pagebreak handling
  23. %<?xlsmb pagebreak 65 27 37 ?>
  24. %\end{tabularx}
  25. %
  26. % \rule{\textwidth}{2pt}
  27. %
  28. % \vspace{0.2cm}
  29. %
  30. % \hfill
  31. % \begin{tabularx}{\textwidth}{Xr@{\hspace{1cm}}r@{}}
  32. % & Subtotal & <?xlsmb sumcarriedforward ?> \\
  33. % \end{tabularx}
  34. %
  35. %\newpage
  36. %
  37. %\markboth{<?xlsmb company ?>\hfill <?xlsmb invnumber ?>}{<?xlsmb company ?>\hfill <?xlsmb invnumber ?>}
  38. %
  39. %\begin{tabularx}{\textwidth}{@{}rlXlrlrrr@{}}
  40. % \textbf{Pos} & \textbf{Number} & \textbf{Description} & & \textbf{Qt'y} &
  41. % \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\ [0.5em]
  42. % & carried forward from page <?xlsmb lastpage ?> & & & & & & & <?xlsmb sumcarriedforward ?> \\ [0.5em]
  43. %<?xlsmb end pagebreak ?>
  44. \vspace*{0.5cm}
  45. \parbox[t]{.5\textwidth}{
  46. \textbf{To}
  47. \vspace{0.3cm}
  48. <?lsmb name ?>
  49. <?lsmb address1 ?>
  50. <?lsmb address2 ?>
  51. <?lsmb city ?>
  52. <?lsmb IF state ?>
  53. \hspace{-0.1cm}, <?lsmb state ?>
  54. <?lsmb END ?>
  55. <?lsmb zipcode ?>
  56. <?lsmb country ?>
  57. \vspace{0.3cm}
  58. <?lsmb IF contact ?>
  59. <?lsmb contact ?>
  60. \vspace{0.2cm}
  61. <?lsmb END ?>
  62. <?lsmb IF customerphone ?>
  63. Tel: <?lsmb customerphone ?>
  64. <?lsmb END ?>
  65. <?lsmb IF customerfax ?>
  66. Fax: <?lsmb customerfax ?>
  67. <?lsmb END ?>
  68. <?lsmb email ?>
  69. }
  70. \parbox[t]{.5\textwidth}{
  71. \textbf{Ship To}
  72. \vspace{0.3cm}
  73. <?lsmb shiptoname ?>
  74. <?lsmb shiptoaddress1 ?>
  75. <?lsmb shiptoaddress2 ?>
  76. <?lsmb shiptocity ?>
  77. <?lsmb IF shiptostate ?>
  78. \hspace{-0.1cm}, <?lsmb shiptostate ?>
  79. <?lsmb END ?>
  80. <?lsmb shiptozipcode ?>
  81. <?lsmb shiptocountry ?>
  82. \vspace{0.3cm}
  83. <?lsmb IF shiptocontact ?>
  84. <?lsmb shiptocontact ?>
  85. \vspace{0.2cm}
  86. <?lsmb END ?>
  87. <?lsmb IF shiptophone ?>
  88. Tel: <?lsmb shiptophone ?>
  89. <?lsmb END ?>
  90. <?lsmb IF shiptofax ?>
  91. Fax: <?lsmb shiptofax ?>
  92. <?lsmb END ?>
  93. <?lsmb shiptoemail ?>
  94. }
  95. \hfill
  96. \vspace{1cm}
  97. \textbf{I N V O I C E}
  98. \hfill
  99. \vspace{1cm}
  100. \begin{tabularx}{\textwidth}{*{7}{|X}|} \hline
  101. \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} & \textbf{Order \#}
  102. & \textbf{Salesperson} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
  103. \hline
  104. <?lsmb invnumber ?> & <?lsmb invdate ?> & <?lsmb duedate ?> & <?lsmb ordnumber ?> & <?lsmb employee ?>
  105. & <?lsmb shippingpoint ?> & <?lsmb shipvia ?> \\
  106. \hline
  107. \end{tabularx}
  108. \vspace{1cm}
  109. \begin{tabularx}{\textwidth}{@{}rlXlrlrrr@{}}
  110. \textbf{Pos} & \textbf{Number} & \textbf{Description} & & \textbf{Qt'y} &
  111. \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\ [0.5em]
  112. <?lsmb FOREACH number ?>
  113. <?lsmb lc = loop.count - 1 ?>
  114. <?lsmb runningnumber.${lc} ?> &
  115. <?lsmb number.${lc} ?> &
  116. <?lsmb description.${lc} ?> &
  117. <?lsmb deliverydate.${lc} ?> &
  118. <?lsmb qty.${lc} ?> &
  119. <?lsmb unit.${lc} ?> &
  120. <?lsmb sellprice.${lc} ?> &
  121. <?lsmb discountrate.${lc} ?> &
  122. <?lsmb linetotal.${lc} ?> \\
  123. <?lsmb END ?>
  124. \end{tabularx}
  125. \parbox{\textwidth}{
  126. \rule{\textwidth}{2pt}
  127. \vspace{0.2cm}
  128. \hfill
  129. \begin{tabularx}{7cm}{Xr@{\hspace{1cm}}r@{}}
  130. & Subtotal & <?lsmb subtotal ?> \\
  131. <?lsmb FOREACH tax ?>
  132. <?lsmb lc = loop.count - 1 ?>
  133. & <?lsmb taxdescription.${lc} ?> on <?lsmb taxbase.${lc} ?> & <?lsmb tax.${lc} ?> \\
  134. <?lsmb END ?>
  135. <?lsmb IF paid ?>
  136. & Paid & - <?lsmb paid ?> \\
  137. <?lsmb END ?>
  138. \hline
  139. <?lsmb IF total ?>
  140. & Balance Due & <?lsmb total ?>
  141. <?lsmb END ?>
  142. \end{tabularx}
  143. \vspace{0.3cm}
  144. <?lsmb text_amount ?> ***** <?lsmb decimal ?>/100
  145. \hfill
  146. All prices in \textbf{<?lsmb currency ?>}.
  147. \vspace{12pt}
  148. <?lsmb notes ?>
  149. }
  150. \vfill
  151. <?lsmb IF paid_1 ?>
  152. \begin{tabularx}{10cm}{@{}lXlr@{}}
  153. \textbf{Payments} & & & \\
  154. \hline
  155. \textbf{Date} & & \textbf{Source} & \textbf{Amount} \\
  156. <?lsmb END ?>
  157. <?lsmb FOREACH payment ?>
  158. <?lsmb lc = loop.count - 1 ?>
  159. <?lsmb paymentdate.${lc} ?> & <?lsmb paymentaccount.${lc} ?> & <?lsmb paymentsource.${lc} ?> & <?lsmb payment.${lc} ?> \\
  160. <?lsmb END ?>
  161. <?lsmb IF paid_1 ?>
  162. \end{tabularx}
  163. <?lsmb END ?>
  164. \vspace{1cm}
  165. \centerline{\textbf{Thank You for your valued business!}}
  166. \rule{\textwidth}{0.5pt}
  167. \usebox{\ftr}
  168. \end{document}
  169. <?lsmb END ?>