I'm trying to assemble invoices based on CSV data. I found this example: Combining invoice and datatool to create serial invoices
This is the code:
\documentclass{letter}
\usepackage{invoice}
\usepackage{datatool}
\address{ABC AG \\
Nonamestreet 4 \\
1100 Vienna \\
bill@example.com}
\date{16. September 2013}
\begin{document}
\DTLloaddb{bills}{billdata.csv}
\DTLforeach{bills}
{\firstname=firstname,
\lastname=lastname,
\caddress=customeraddress,
\tariffname=tariffname,
\service=service,
\rateperunit=rateperunit,
\unitcount=unitcount}
{
\begin{letter}{\firstname~ \lastname \\ \caddress}
\opening{Invoice} Dear customer \lastname! This is your current bill.
\begin{invoice}{Euro}{20}
\ProjectTitle{\tariffname}
\Fee{Regular charge} {\rateperunit} {\unitcount}
\end{invoice}
\closing{Best regards, ABC AG}
\end{letter}
\clearpage
}
\end{document}
And this is my CSV file:
firstname,lastname,customeraddress,tariffname,service,rateperunit,unitcount
John,Doe,Musterstraße 4,Tariff 1,Call,0.04,4
Andy,Ball,Molenstraat 178B,Tariff 2,Extra,56.78,5
However, looks like it cannot retrieve more data than just the first line of the CVS file.
What I'm trying to achieve is the following: - have a database with all the entries (services, quantity, price, etc...) for a single invoice
What I'm doing wrong?