About
Shop
LaTeX
Software
Books
Gallery
News
Contact
Blog
Settings
Account
Latest news 2024-10-15: New blog post: Tales for Our Times Book Launch.

Exercise 14: Custom Invoice (Solution)

This is a solution to the easy part of Exercise 14.

\documentclass{isodoc}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{longtable}
\usepackage{array}
\usepackage{booktabs}

\setupdocument
{
  language={en-GB},
  company={University of Somewhere},
  who={Mr Big Head},
  street={Academic Lane},
  city={Some City},
  zip={AB3 4YZ},
  country={United Kingdom},
  countrycode={GB},
  areacode={44},
  cityzip,
  date=20140301,
  accountname={Big Head},
  accountno={123456},
  subject={Invoice Number 2},
  currency={\pounds},
  iban=ex1234,
  vatno=1234,
  bic=abc123,
  term=28,
  accept,
  acceptaccount={123456789},
  accepteuros={388},
  acceptcents={08},
  acceptreference={1000 2000 3000 4000},
  acceptdescription={Invoice 2}
}

\begin{document}

\invoice
[
  to={Jos\'e Arara\\Nenhuma Rua\\S\~ao Paulo\\123457\\Brazil}
]
{
    \begin{longtable}{>{\raggedright}p{0.3\linewidth}rrrr}
    \bfseries Item &
    \bfseries Quantity &
    \bfseries Unit Price (\pounds) &
    \bfseries VAT \% &
    \bfseries Price (\pounds)\\
    \midrule
    \endhead
    ``\,`Duck and Goose': an allegory for modern times?''
    (hardback) &
    1 & 59.99 & 0 & 59.99\\
    ``My Friend is a Duck'' (paperback) &
    20 & 14.99 & 0 & 299.80\\
    ``Annotated Notes on the `Duck and Goose' Chronicles''
    (ebook) &
    1 & 8.99 & 20 & 8.99\\
    \midrule
    \multicolumn{4}{r}{\bfseries Sub-Total} &
    368.78\\
    \multicolumn{4}{r}{\bfseries VAT} &
    1.80\\
    \multicolumn{4}{r}{\bfseries Postage and Packaging} &
    20.00\\
    \multicolumn{4}{r}{\bfseries Promotional Discount} &
    $-2.50$\\
    \midrule
    \multicolumn{4}{r}{\bfseries Total} & 388.08
  \end{longtable}
}

\end{document}

Download invoice-longtable-easy.tex or invoice-longtable-easy.pdf.

© 2015 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Cookies Site Map FAQs