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